WIP: Per-user configurable inbox auto-clear window #289

Closed
toasterson wants to merge 1 commit from claude/wi-019f1779-per-user-configurable-inbox-auto-clear-w into main
Owner

Anima work item 019f1779-78d3-7563-8250-1d671cee86ec.

What to build

Make the Attention Inbox auto-clear window a per-user setting instead of a server-wide default. The user picks, on the Settings page, how long resolved/hand-off inbox rows linger before ageing out; build_dashboard reads that user's value when filtering slice_done / deliverable_review rows.

End-to-end: Settings → Preferences shows an "Inbox auto-clear" control → changing it persists (server) → the dashboard inbox now ages hand-off rows out using my value, not the global default.

Pushed context

  • Design fixed by ADR 0015 (the inbox) + ADR 0016 (user-settings model) + CONTEXT.mdAttention feed / User settings. Read both ADRs.
  • The user-settings subsystem (store + typed registry + SettingsRepo + SettingsService gRPC + Settings page wiring) is delivered by the foundation WI — build on it, don't rebuild it. This WI only adds one registry entry + one control + one server read swap.
  • Registry: add inbox_clear_window to the settings registry (a duration; sensible default matching the slice-3 server constant, e.g. ~7d; validate to a reasonable range, e.g. 1h–90d). Per ADR 0016 the registry is the source of truth — defaults + validation live there.
  • Server: in crates/anima-server/src/services/dashboard.rs, build_dashboard currently applies a server-default window constant (introduced by the slice-done trigger WI) to slice_done and deliverable_review items. Replace that constant with SettingsRepo::get_value(caller_user_id, inbox_clear_window) (value-or-default). State-derived triggers (wi_parked, decision_pending) are unaffected — they don't use the window.
  • PWA: add an "Inbox auto-clear" control to anima-pwa/src/pages/Settings/Settings.tsx Preferences card, reading/writing via the foundation's getUserSettings/setUserSetting. Match the existing toggle's pattern.

Acceptance criteria

  • inbox_clear_window exists in the settings registry with a default + range validation.
  • build_dashboard ages out slice_done / deliverable_review rows using the caller's per-user window (value-or-default), no longer a hardcoded constant.
  • Settings page exposes the control; changing it persists and changes which hand-off rows the inbox shows.
  • cargo check clean; npm run verify green (test: two users with different windows see different age-out behaviour, or a unit test on the window resolution).

Blocked by

  • WI "User-settings foundation (store + registry + gRPC) via show_empty_projects" (019f17e4-cb7e-71a0-bafc-1d85d2f69215).
  • WI "Attention Inbox: slice-done trigger + time-based auto-clear" (019f1778-57ad-7500-ad1a-869be806ac82) — introduces the window this setting overrides.
Anima work item `019f1779-78d3-7563-8250-1d671cee86ec`. ## What to build Make the Attention Inbox auto-clear window a **per-user setting** instead of a server-wide default. The user picks, on the Settings page, how long resolved/hand-off inbox rows linger before ageing out; `build_dashboard` reads that user's value when filtering `slice_done` / `deliverable_review` rows. End-to-end: Settings → Preferences shows an "Inbox auto-clear" control → changing it persists (server) → the dashboard inbox now ages hand-off rows out using my value, not the global default. ## Pushed context - Design fixed by **ADR 0015** (the inbox) + **ADR 0016** (user-settings model) + `CONTEXT.md` → *Attention feed* / *User settings*. Read both ADRs. - The user-settings subsystem (store + typed registry + `SettingsRepo` + `SettingsService` gRPC + Settings page wiring) is delivered by the foundation WI — **build on it, don't rebuild it.** This WI only adds one registry entry + one control + one server read swap. - **Registry:** add `inbox_clear_window` to the settings registry (a duration; sensible default matching the slice-3 server constant, e.g. ~7d; validate to a reasonable range, e.g. 1h–90d). Per ADR 0016 the registry is the source of truth — defaults + validation live there. - **Server:** in `crates/anima-server/src/services/dashboard.rs`, `build_dashboard` currently applies a server-default window constant (introduced by the slice-done trigger WI) to `slice_done` and `deliverable_review` items. Replace that constant with `SettingsRepo::get_value(caller_user_id, inbox_clear_window)` (value-or-default). State-derived triggers (`wi_parked`, `decision_pending`) are unaffected — they don't use the window. - **PWA:** add an "Inbox auto-clear" control to `anima-pwa/src/pages/Settings/Settings.tsx` Preferences card, reading/writing via the foundation's `getUserSettings`/`setUserSetting`. Match the existing toggle's pattern. ## Acceptance criteria - [ ] `inbox_clear_window` exists in the settings registry with a default + range validation. - [ ] `build_dashboard` ages out `slice_done` / `deliverable_review` rows using the caller's per-user window (value-or-default), no longer a hardcoded constant. - [ ] Settings page exposes the control; changing it persists and changes which hand-off rows the inbox shows. - [ ] `cargo check` clean; `npm run verify` green (test: two users with different windows see different age-out behaviour, or a unit test on the window resolution). ## Blocked by - WI "User-settings foundation (store + registry + gRPC) via show_empty_projects" (019f17e4-cb7e-71a0-bafc-1d85d2f69215). - WI "Attention Inbox: slice-done trigger + time-based auto-clear" (019f1778-57ad-7500-ad1a-869be806ac82) — introduces the window this setting overrides.
toasterson force-pushed claude/wi-019f1779-per-user-configurable-inbox-auto-clear-w from 136e996b49 to 9d5508ce10 2026-07-05 01:28:32 +00:00 Compare
toasterson force-pushed claude/wi-019f1779-per-user-configurable-inbox-auto-clear-w from 9d5508ce10 to 4969841934 2026-07-06 07:12:36 +00:00 Compare
toasterson force-pushed claude/wi-019f1779-per-user-configurable-inbox-auto-clear-w from 4969841934 to 9e001ea238 2026-07-06 07:57:43 +00:00 Compare
toasterson force-pushed claude/wi-019f1779-per-user-configurable-inbox-auto-clear-w from 9e001ea238 to 1bb497f69b 2026-07-07 21:08:33 +00:00 Compare
Author
Owner

Closing as superseded by main.

This branch is stacked on the user-settings foundation from #290, which main has since replaced with a more capable SettingsService (project-scoped, with a SettingDef registry). It carries that whole superseded foundation with it — add/add conflicts on proto/anima/v1/settings.proto, services/settings.rs and repo/settings.rs, plus 19 conflict regions overall including the generated PWA bindings and dashboard.proto.

Rebasing it would mean re-implementing the auto-clear window on top of main's settings API, not resolving a merge.

The underlying want — a per-user configurable inbox auto-clear window — is still reasonable and is now a small change: register a SettingDef and read it via SettingsRepo::list_for_user_project. Worth re-filing at that size against current main. WI-263 (low priority) is being cancelled in favour of that.

Context: 2026-07-28 sweep of the 11 open PRs that could no longer rebase onto main. 12 branches were rebased and landed; this is one of three left for a decision.

Closing as **superseded by `main`**. This branch is stacked on the user-settings foundation from #290, which `main` has since replaced with a more capable `SettingsService` (project-scoped, with a `SettingDef` registry). It carries that whole superseded foundation with it — `add/add` conflicts on `proto/anima/v1/settings.proto`, `services/settings.rs` and `repo/settings.rs`, plus 19 conflict regions overall including the generated PWA bindings and `dashboard.proto`. Rebasing it would mean re-implementing the auto-clear window on top of `main`'s settings API, not resolving a merge. The underlying want — a per-user configurable inbox auto-clear window — is still reasonable and is now a small change: register a `SettingDef` and read it via `SettingsRepo::list_for_user_project`. Worth re-filing at that size against current `main`. WI-263 (low priority) is being cancelled in favour of that. Context: 2026-07-28 sweep of the 11 open PRs that could no longer rebase onto `main`. 12 branches were rebased and landed; this is one of three left for a decision.
toasterson closed this pull request 2026-07-28 08:44:05 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/Anima!289
No description provided.