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:
@@ -1,15 +1,15 @@
|
||||
# Aether Development SOP (Frontend)
|
||||
> **Version:** 1.0 (2026-02-11)
|
||||
> **Version:** 1.1 (2026-02-16)
|
||||
> **Location:** documentation/GUIDE__DEVELOPMENT.md
|
||||
|
||||
## 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.
|
||||
|
||||
### Required Checks:
|
||||
### Required Checks
|
||||
1. **Svelte Integrity:** `npx svelte-check`
|
||||
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`.
|
||||
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
|
||||
- **Atomic Commits:** One component or one logic fix per commit. Do not batch unrelated changes.
|
||||
@@ -19,15 +19,17 @@
|
||||
## 3. 🤝 The Handshake (Coordination)
|
||||
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.
|
||||
- **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
|
||||
Before starting work:
|
||||
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.
|
||||
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.
|
||||
|
||||
@@ -144,10 +144,11 @@
|
||||
.toArray();
|
||||
|
||||
// Sort local results matching UI selection (Refactored 2026-02-16)
|
||||
if ($idaa_loc.recovery_meetings.qry__order_by === 'name') {
|
||||
local_results.sort((a, b) =>
|
||||
(a.name ?? '').localeCompare(b.name ?? '')
|
||||
);
|
||||
const sort_mode = $idaa_loc.recovery_meetings.qry__order_by;
|
||||
if (sort_mode === 'name_asc' || sort_mode === '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 {
|
||||
// Robust Chronological Sort using pre-computed tmp_sort_1
|
||||
// Handles Priority, Manual Sort, and the updated_on/created_on fallback
|
||||
|
||||
@@ -83,8 +83,10 @@
|
||||
.limit(limit > 0 ? limit : 500)
|
||||
.toArray();
|
||||
|
||||
if (order_by === 'name') {
|
||||
if (order_by === 'name_asc' || order_by === '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 {
|
||||
// Robust Chronological Sort using pre-computed tmp_sort_1 (Refactored 2026-02-16)
|
||||
// This handles Group > Priority > Manual Sort > Date (with updated_on fallback)
|
||||
|
||||
@@ -356,26 +356,33 @@
|
||||
id="qry_order_by__events"
|
||||
bind:value={$idaa_loc.recovery_meetings.qry__order_by}
|
||||
onchange={() => {
|
||||
if (
|
||||
$idaa_loc.recovery_meetings.qry__order_by ==
|
||||
'updated_on'
|
||||
) {
|
||||
const mode = $idaa_loc.recovery_meetings.qry__order_by;
|
||||
if (mode === 'updated_on') {
|
||||
$idaa_loc.recovery_meetings.qry__order_by_li = {
|
||||
priority: 'DESC',
|
||||
sort: 'DESC',
|
||||
updated_on: 'DESC',
|
||||
created_on: 'DESC',
|
||||
name: 'ASC'
|
||||
}; // For the SQL query
|
||||
} else {
|
||||
};
|
||||
} else if (mode === 'name_asc') {
|
||||
$idaa_loc.recovery_meetings.qry__order_by_li = {
|
||||
priority: 'DESC',
|
||||
sort: 'DESC',
|
||||
name: 'ASC',
|
||||
updated_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="
|
||||
select w-40 text-sm inline-block
|
||||
@@ -386,7 +393,8 @@
|
||||
"
|
||||
>
|
||||
<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>
|
||||
</label>
|
||||
</span>
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
</label>
|
||||
<label class="label">
|
||||
<span class="text-sm font-bold opacity-70"
|
||||
>Sort Group</span
|
||||
>Journal Group (text)</span
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
|
||||
Reference in New Issue
Block a user