Skip to content

feat(settings): add general preferences and update schedules - #136

Merged
nixuuu merged 1 commit into
devfrom
feat/settings-expansion-1
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/settings-expansion-1

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

Stage 1 of 3: a new Settings → General page.

  • Notifications (this device):
    • System alerts when a thread finishes, fails or needs you, only while Canopy is open.
    • In-app alerts from other threads.
    • A browser block shows as an inline warning.
  • Sidebar (account): group by project, project order, and a collapsible Working section.
  • Confirmations (account): before unpinning, archiving or deleting a thread.
  • Display: a time format, plus the time zone moved here from Appearance.
  • Desktop app:
    • How often the desktop app checks for updates, including "Never".
    • How often workers check the Claude, Codex and Grok CLIs, including "Never". There is a per-worker override in Workers.
    • The quit shortcut, moved here from App updates. App updates now holds only updates.
  • Resets: each preference has a reset, and there is a "Restore device defaults" button.

Proto changes are additive only; there are no migrations. The map of settings is in docs/settings-map.md.

Copy audit (docs/copy.md §8):

  • Scope is stated once per section, not on every row.
  • Descriptions are one sentence.
  • On/off settings use a Switch.
  • The browser block is a warning inside its row.

@nixuuu
nixuuu added this pull request to stack #139 November 5, 2026 06:25
@nixuuu
nixuuu marked this pull request as ready for review November 5, 2026 06:29
@nixuuu
nixuuu merged commit a831d72 into dev Nov 5, 2026
10 checks passed
@nixuuu
nixuuu deleted the feat/settings-expansion-1 branch November 5, 2026 06:29
nixuuu added a commit that referenced this pull request Nov 5, 2026
In Settings → General (Agent CLI updates) and App updates (Update check
frequency), the notes under a row looked detached: the divider line sat
right on top of the text with no gap, and the indent didn't match the
row.

**Cause:** the notes ("Checks never install updates…", "Last checked … ·
Next check …") were siblings of the row inside the divided card list, so
they became separate list items.

**Fix:** they now render inside the row, under its description, through
`PreferenceRow`'s content slot. Times use `tabular-nums`.

Copy audit (`docs/copy.md` §8):
- "Checks never install updates. Manual checks remain available." →
"Checks never install updates. You can still check manually." (§2.5
plain words)
- "Automatic downloads are off; use Check for updates…" → two sentences
(§2.1)

Related: #136
nixuuu added a commit that referenced this pull request Nov 5, 2026
Every Settings field now saves and takes effect. Settings with no
working feature behind them are disabled and marked **Soon**.

**Thread notifications did not stick on desktop.** The desktop web UI
started on a new random port at every launch. The page origin therefore
changed, and with it the browser storage behind every "This device"
setting, so notifications, fonts, diffs, time format and keybindings all
reset after a restart. The app now saves the port in `userData/web-port`
and reuses it. If that port is taken, it picks and saves a new one, and
device settings reset once.

**Notifications**
- The window permission policy also allows `notifications`, for the
app's own pages only. Everything else stays denied.
- A thread with an unseen result alerted twice: when the next turn
started and when it ended. It now alerts once, when the turn ends.
- In the browser, a denied or dismissed permission now shows why
notifications stay off, instead of silently resetting.

**Other fixes**
- **Time format** now applies to bot chats, linked-computer presence and
date fields.
- **Contrast "Strong"** now strengthens muted text in dark mode. Borders
still do not change.
- **Providers:** unsaved edits are kept when the page reloads its data.
- **Worktrees and pairing:** "Inactive for days" accepts only whole
numbers from 0 to 3650, and pairing inputs stay valid.
- **Phone width:** long settings titles are truncated instead of
stretching the row past the screen.

**Soon** (a `soon` prop on the settings row: a badge after the title,
the control disabled, the reset hidden, the stored value untouched)
- Worktrees → Branch naming → Thread title: new threads send no title,
and branches are never renamed.
- Worktrees → Keep worktrees with local changes: cleanup always keeps
local work, so the switch only changed a label.

`docs/settings-map.md` no longer lists settings that do not exist:
worker limits and directories, the listen address, project rename and
schedule deletion.

**Tests**
- `apps/desktop/test/web-port.test.ts`: the port survives restarts, and
a taken or invalid saved port is replaced.
- `apps/desktop/test/window-permissions.test.ts`: only clipboard writes
and notifications are allowed, and only for the app's own origins.
- `check:tmp`: 1208 passed, 0 failed.

**Copy audit (§8)**
- "This device · Only while a Canopy window is open." (closing the
window stops alerts on macOS)
- "Notifications stay off until you allow them. Choose again, then
select Allow."
- The existing "Blocked by your browser…" message is reused.
- The badge text is "Soon".
- No glossary violations. Checked with long titles at phone and desktop
width, light and dark.

**Manual check on a Mac after the nightly**
- Choose "Notifications with sound", quit and relaunch: the choice
stays. Expect one reset after upgrading from an older build.
- A thread that finishes, fails or asks for approval gives exactly one
notification. Sound plays only with sound on.
- Canopy needs alerts allowed in System Settings → Notifications.

Fixes: #136
Fixes: #137
Fixes: #96
nixuuu added a commit that referenced this pull request Nov 16, 2026
## Change

A thread could display `Working` while staying outside the Working
section because it or a child had an unread result. Let ongoing turns
take precedence over results from earlier turns, and keep finished
subagent results inside their parent thread. Apply the same attention
rule to project grouping so hidden subagent results do not create a
misleading Needs attention section.

User-directed questions and unread results from finished user threads
still keep the tree visible outside Working. Pins remain separate, and
the counter counts only trees in Working. The shared selector covers
web, desktop and mobile. Update the Polish behavior documentation and
add regression coverage.

Fixes: #136

## Verification

- `bun run check:tmp ./packages/domain/src/sidebar-threads.test.ts`: 9
passed, 39 assertions; no temporary files left.
- Typechecks for `@canopy/domain` and `@canopy/web` passed; Svelte
reported zero errors and warnings.
- Formatting and lint passed for both edited TypeScript files; `git diff
--check` passed.
- Inspected the actual sidebar components in an isolated Chromium
preview at 1440 px and 390 px, in light and dark themes, with short and
long titles. Checked the counter, expand/collapse, finishing and
restarting a turn, and a subagent question moving its parent out of
Working and back after the answer. No horizontal overflow.
- Independent review found no issues.
- Copy audit (§8): no UI text changed.
- Full repository checks and builds are left to required CI. The branch
includes current `dev`; the additional upstream automation changes do
not alter the verified selector or its inputs.
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