Expanded Recovery Meeting sort options and refined development SOP.

Implemented 'Meeting Name (A-Z)' and 'Meeting Name (Z-A)' sorting for Recovery Meetings, including UI dropdown updates and client-side re-sorting logic.

Updated documentation/GUIDE__DEVELOPMENT.md to v1.1 with clarified verification steps and inter-agent coordination protocols.

Minor label cleanup in Journal editor.
This commit is contained in:
Scott Idem
2026-02-16 15:58:17 -05:00
parent f34e24aa02
commit 4711f41c34
5 changed files with 33 additions and 20 deletions

View File

@@ -1,15 +1,15 @@
# Aether Development SOP (Frontend) # Aether Development SOP (Frontend)
> **Version:** 1.0 (2026-02-11) > **Version:** 1.1 (2026-02-16)
> **Location:** documentation/GUIDE__DEVELOPMENT.md > **Location:** documentation/GUIDE__DEVELOPMENT.md
## 1. 🛡️ Verification (The "Test-First" Mandate) ## 1. 🛡️ Verification (The "Test-First" Mandate)
**Rule:** No code is to be committed unless it has passed local verification. Skipping this is a violation of the Aether Dev Protocol. **Rule:** No code is to be committed unless it has passed local verification. Skipping this is a violation of the Aether Dev Protocol.
### Required Checks: ### Required Checks
1. **Svelte Integrity:** `npx svelte-check` 1. **Svelte Integrity:** `npx svelte-check`
2. **Type Safety:** Ensure interfaces in `src/lib/types/ae_types.ts` match backend schemas. 2. **Type Safety:** Ensure interfaces in `src/lib/types/ae_types.ts` match backend schemas.
3. **Reactivity Check:** Verify Svelte 5 runes (`$state`, `$derived`) are not creating race conditions with Dexie `liveQuery`. 3. **Reactivity Check:** Verify Svelte 5 runes (`$state`, `$derived`) are not creating race conditions with Dexie `liveQuery`.
4. **Build Check:** For major changes, run `npm run build` to ensure no SSR or build-time failures. 4. **Build Check:** For major changes, run `npm run build:staging` to ensure no SSR or build-time failures.
## 2. 📝 Commit & Sync Policy ## 2. 📝 Commit & Sync Policy
- **Atomic Commits:** One component or one logic fix per commit. Do not batch unrelated changes. - **Atomic Commits:** One component or one logic fix per commit. Do not batch unrelated changes.
@@ -19,15 +19,17 @@
## 3. 🤝 The Handshake (Coordination) ## 3. 🤝 The Handshake (Coordination)
You are not working in a vacuum. You MUST coordinate with the Backend Agent. You are not working in a vacuum. You MUST coordinate with the Backend Agent.
### Mandatory Messaging Triggers: ### Mandatory Messaging Triggers
- **Data Requirements:** When a UI feature requires a new field or endpoint. - **Data Requirements:** When a UI feature requires a new field or endpoint.
- **API Failures:** When a V3 endpoint returns unexpected data or 500s. - **API Failures:** When a V3 endpoint returns unexpected data or 500s.
- **Status:** Update your shared Journal in `~/agents_sync/aether/journals/` after significant milestones. - **Status:** IGNORE THIS FOR NOW: ~~Update your shared Journal in `~/agents_sync/aether/journals/` after significant milestones.~~
- **Stuck in Loop or Insufficient Information: ** If you find yourself in a loop or lacking information, ask Scott and or use the `message` tool to ask for clarification or assistance from the Backend Agent.
**Tool:** Use the `message` tool to communicate with the Backend Agent. **Tool:** Use the `message` tool to communicate with the Backend Agent or Scott's other agents.
## 🧠 Continuity ## 🧠 Continuity
Before starting work: Before starting work:
1. Read `~/agents_sync/README.md` to understand the fleet status and cross-agent tasks. 1. Read `~/agents_sync/README.md` to understand the fleet status and cross-agent tasks.
2. Check `README.md` in the project root for technical specs. 2. Check `README.md` in the project root for technical specs.
3. Review your local `documentation/AGENT_TODO.md` for active tasks. 3. Review your local `documentation/AGENT_TODO.md` for active tasks.
4. Be sure to describe the plan before you start making code changes to one or more files.

View File

@@ -144,10 +144,11 @@
.toArray(); .toArray();
// Sort local results matching UI selection (Refactored 2026-02-16) // Sort local results matching UI selection (Refactored 2026-02-16)
if ($idaa_loc.recovery_meetings.qry__order_by === 'name') { const sort_mode = $idaa_loc.recovery_meetings.qry__order_by;
local_results.sort((a, b) => if (sort_mode === 'name_asc' || sort_mode === 'name') {
(a.name ?? '').localeCompare(b.name ?? '') local_results.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? ''));
); } else if (sort_mode === 'name_desc') {
local_results.sort((a, b) => (b.name ?? '').localeCompare(a.name ?? ''));
} else { } else {
// Robust Chronological Sort using pre-computed tmp_sort_1 // Robust Chronological Sort using pre-computed tmp_sort_1
// Handles Priority, Manual Sort, and the updated_on/created_on fallback // Handles Priority, Manual Sort, and the updated_on/created_on fallback

View File

@@ -83,8 +83,10 @@
.limit(limit > 0 ? limit : 500) .limit(limit > 0 ? limit : 500)
.toArray(); .toArray();
if (order_by === 'name') { if (order_by === 'name_asc' || order_by === 'name') {
results.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '')); results.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? ''));
} else if (order_by === 'name_desc') {
results.sort((a, b) => (b.name ?? '').localeCompare(a.name ?? ''));
} else { } else {
// Robust Chronological Sort using pre-computed tmp_sort_1 (Refactored 2026-02-16) // Robust Chronological Sort using pre-computed tmp_sort_1 (Refactored 2026-02-16)
// This handles Group > Priority > Manual Sort > Date (with updated_on fallback) // This handles Group > Priority > Manual Sort > Date (with updated_on fallback)

View File

@@ -356,26 +356,33 @@
id="qry_order_by__events" id="qry_order_by__events"
bind:value={$idaa_loc.recovery_meetings.qry__order_by} bind:value={$idaa_loc.recovery_meetings.qry__order_by}
onchange={() => { onchange={() => {
if ( const mode = $idaa_loc.recovery_meetings.qry__order_by;
$idaa_loc.recovery_meetings.qry__order_by == if (mode === 'updated_on') {
'updated_on'
) {
$idaa_loc.recovery_meetings.qry__order_by_li = { $idaa_loc.recovery_meetings.qry__order_by_li = {
priority: 'DESC', priority: 'DESC',
sort: 'DESC', sort: 'DESC',
updated_on: 'DESC', updated_on: 'DESC',
created_on: 'DESC', created_on: 'DESC',
name: 'ASC' name: 'ASC'
}; // For the SQL query };
} else { } else if (mode === 'name_asc') {
$idaa_loc.recovery_meetings.qry__order_by_li = { $idaa_loc.recovery_meetings.qry__order_by_li = {
priority: 'DESC', priority: 'DESC',
sort: 'DESC', sort: 'DESC',
name: 'ASC', name: 'ASC',
updated_on: 'DESC', updated_on: 'DESC',
created_on: 'DESC' created_on: 'DESC'
}; // For the SQL query };
} else if (mode === 'name_desc') {
$idaa_loc.recovery_meetings.qry__order_by_li = {
priority: 'DESC',
sort: 'DESC',
name: 'DESC',
updated_on: 'DESC',
created_on: 'DESC'
};
} }
handle_search_trigger();
}} }}
class=" class="
select w-40 text-sm inline-block select w-40 text-sm inline-block
@@ -386,7 +393,8 @@
" "
> >
<option value="updated_on">Last Updated</option> <option value="updated_on">Last Updated</option>
<option value="name">Meeting Name</option> <option value="name_asc">Meeting Name (A-Z)</option>
<option value="name_desc">Meeting Name (Z-A)</option>
</select> </select>
</label> </label>
</span> </span>

View File

@@ -316,7 +316,7 @@
</label> </label>
<label class="label"> <label class="label">
<span class="text-sm font-bold opacity-70" <span class="text-sm font-bold opacity-70"
>Sort Group</span >Journal Group (text)</span
> >
<input <input
type="text" type="text"