Skip to content

feat(web): set daemon settings per daemon, with batch apply - #381

Closed
futrime wants to merge 1 commit into
mainfrom
feat/web-settings-per-daemon
Closed

futrime wants to merge 1 commit into
mainfrom
feat/web-settings-per-daemon

Conversation

@futrime

@futrime futrime commented Oct 12, 2026

Copy link
Copy Markdown
Member

Summary

This is unit 8 of the multi-daemon and notifications batch: it splits Settings and makes the daemon side of it per daemon.

  • Two groups in the nav. App holds Themes, plus Daemons and Notifications. Those two are optional pages from unit 9 and appear only once their modules import. Daemon holds General, Accounts, Fallback, Runtimes, Backup, Workspace and Usage.
  • Daemon selector (data-hmz="settings-daemon").
    • It lists GET /api/daemons, and shows only Local when that endpoint is absent.
    • It defaults to the current daemon (api.daemon() when unit 6 provides it, else local).
    • It changes only which daemon these pages use: requests go to /d/<name>/api/..., or to plain /api/... for the daemon the page is on.
    • It is kept in the address as ?daemon=<name>, and the nav links carry it.
    • Shared helpers now take that prefix: readBackends(workspace, from) in pickers.js and pathPicker({from}) in paths.js. So the agent, place and path pickers also read the picked daemon.
  • Batch apply (data-hmz="batch-apply"). It opens a dialog of the other daemons with All, POSTs the page's payload to each daemon ticked, and shows each daemon's result: Applied, or the refusal's sentence.
    • General sends the form as it stands.
    • Backup sends every target and the defaults.
    • Fallback sends each step, and Runtimes each runtime with replace: true. Both overwrite or add, and never remove anything.
    • Accounts: the button is disabled, marked "Secrets stay put".
    • Workspace and Usage have no button.
  • Phone-width CSS is in a /* settings daemons */ block.
  • docs/user/web.md is updated.

Test plan

  • tests/integration/test_web_settings_daemons.py runs in chromium and webkit. It covers the grouping, the selector scoping reads and writes, ?daemon= in the address, batch apply POSTing to each daemon ticked with its result, accounts disabled, and phone width.
  • Every tests/integration/test_web_*.py passes, including the settings tests in test_web_page.py.
  • uv run pytest tests/unit passes.
  • Pre-commit passes, except pyright's existing Linux-only errors on macOS.
  • Live hmz web check: a Playwright script with routed fake daemons, screenshots at full width and at phone width.

🤖 Generated with Claude Code

Settings now has two groups. App holds this page's own settings (Themes, and Daemons and
Notifications once their pages exist). Daemon holds the rest, read from and written to the
daemon picked above them: the one on screen by default, kept in the address as
?daemon=<name>. General, Fallback, Runtimes and Backup gain Batch apply, which sends what
the page holds to each daemon ticked and says what each answered. Accounts say their
secrets stay put.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@futrime

futrime commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Landed together in #385.

@futrime futrime closed this Oct 12, 2026
@futrime
futrime deleted the feat/web-settings-per-daemon branch October 12, 2026 23:56
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.

2 participants