Skip to content

refactor: deepen modules across rust core + react widget#4

Merged
archae0pteryx merged 6 commits intomainfrom
dev/developer-6jatq
May 1, 2026
Merged

refactor: deepen modules across rust core + react widget#4
archae0pteryx merged 6 commits intomainfrom
dev/developer-6jatq

Conversation

@archae0pteryx
Copy link
Copy Markdown
Contributor

Summary

  • 11 small refactor commits that deepen modules across the Rust workspace and the React widget. Each commit is independently reviewable; task check is green at every step.
  • New seams: CapNotifier trait + CapEvaluator (commands crate) replace inline cap notification in the Tauri shell. ProposalLifecycle owns proposal accept/reject end-to-end, replacing the ProposalDispatcher + per-kind appliers. useAppState composes the React widget's three async readers under one readiness contract.
  • Net: applier strategy traits and MonitorState removed; one install_change_handlers helper replaces the mix of inline-closure and per-watcher helper; proposal-reader errors now surface to the UI instead of being silently swallowed.
  • Plus: arduino/setup-task@v2 now authenticated via GITHUB_TOKEN to avoid runner-IP rate limits (caused the original PR's CI to fail).

(Replaces PR #3, which was auto-closed when its source branch was renamed.)

Test plan

  • task check (lint + typecheck + Rust unit tests + web unit tests) green on the tip of the branch
  • New tests added: 5 CapEvaluator tests, 6 ProposalLifecycle tests, 4 useAppState tests
  • Smoke-run task dev and exercise: create focus, run /checkpoint, accept/reject proposal, hit a cap

@archae0pteryx archae0pteryx merged commit b1841a2 into main May 1, 2026
1 check passed
@archae0pteryx archae0pteryx deleted the dev/developer-6jatq branch May 1, 2026 15:49
archae0pteryx added a commit that referenced this pull request May 4, 2026
- Log DisplayConfigState lock failure instead of silently ignoring (#3)
- set_debug_overlay: only emit event when lock succeeds, not on failure (#4)
- SettingsWindow: wrap onToggleDevtools in arrow to explicitly drop the
  boolean arg from ToggleRow onChange (#5)
- Update 032 issue spec to match implemented tray/display behavior (#1)
archae0pteryx added a commit that referenced this pull request May 4, 2026
* [032] Preferences window: settings UI, tray simplification, debug overlay control

- Add on-demand Preferences window (Cmd-,  / tray → Settings…)
  - Sections: General (caps), Widget, Displays, Alerts, Debug
  - Auto-sizes to content via ResizeObserver + Tauri setSize
  - Reopens cleanly after close: destroys stale label, creates fresh window
- Simplify tray: replace Settings submenu with single Settings… item
- Add Tauri commands: get/update settings, get monitors, get/set debug overlay,
  toggle/query devtools
- Debug overlay off by default; toggled via Settings > Debug > Debug Overlay
  using backend app.emit for reliable cross-window event delivery
- DebugOverlayState managed in app; devtools toggle uses is_devtools_open

* fix: address CR comments on 032 preferences window

- Log DisplayConfigState lock failure instead of silently ignoring (#3)
- set_debug_overlay: only emit event when lock succeeds, not on failure (#4)
- SettingsWindow: wrap onToggleDevtools in arrow to explicitly drop the
  boolean arg from ToggleRow onChange (#5)
- Update 032 issue spec to match implemented tray/display behavior (#1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant