Repository navigation
fix(header): mark the Alerts menu item with a check while alerts are on - #1000
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
## Change CHANGELOG.md's `## [Unreleased]` lists are the repo's most frequent merge conflict: every PR appends to the same Added/Changed/Fixed lists, and a conflict resolver once pushed the markers (devswha#838). A PR now adds one small file to `changelog.d/` instead, so two PRs never touch the same lines. - **Format** (`changelog.d/README.md`): a lowercase `name.md` holding exactly the lines it would have in CHANGELOG.md: `### Added|Changed|Removed|Fixed|Maintenance` headings, `- ` entries, two-space continuations. No PR link or credit needed. - **Fold** (`scripts/changelog-fold.ts`): the release PR runs `bun scripts/changelog-fold.ts X.Y.Z [YYYY-MM-DD]` (the date defaults to the local one). It turns the Unreleased notes into `## [X.Y.Z] - date` under an empty `## [Unreleased]` (the shape of devswha#853), with the existing Unreleased entries first, then the fragments sorted by file name, sections in release order (any other heading the old notes used is kept after them). It links each fragment's entries to the PR whose squash merge added the file (from `git log --follow --diff-filter=A`, so a later rename does not take the link) unless the entry already links that PR, moves the compare links on, deletes the fragments, and prints what still needs a link plus the reminder to add `by @login` credits. It refuses rather than drops a line it cannot place. - **Release gate**: `scripts/release-notes.ts`, which release.yml runs before tagging, refuses while `changelog.d/` still holds a fragment (one merged after the release PR folded them would otherwise ship without a line in the notes), and says to move its entries into the version by hand. - **Transition**: the ~30 open PRs that still append to Unreleased need no rework; their lines are folded together with the fragments. CHANGELOG.md content is unchanged in this PR. `scripts/release-notes.ts`, `server/release-notes.ts` and `scripts/update-browser-qa.ts` read the same shape as before. - **Guards** (`scripts/changelog-fold.test.ts`, unit suite): every fragment parses (known section, at least one non-empty entry, no stray text, lowercase `.md` name); CHANGELOG.md and the fragments hold no conflict markers; today's Unreleased notes plus fragments fold for the next release, so an old PR's malformed entry fails at its own PR rather than at release. Failure messages name the file and line and point at `changelog.d/README.md`. Not enforced yet: that a PR leaves CHANGELOG.md alone. A ratchet or a `changes`-job check would fail the ~30 open PRs that still append there (or turn main red when one of them merges on a stale green run), so it is a planned follow-up once they have drained; AGENTS.md says so. - **Docs**: CONTRIBUTING.md (changelog bullet), AGENTS.md maintainer workflow (one line, pointing at the test), docs/development.md Releasing step 1, the PR template comment. No CHANGELOG entry or fragment: not user-visible. ## Validation - `bun run check fast`: workflow syntax, generated types, typecheck (the fold script added to `tsconfig.tools.json`), build, unit (3032 pass, 0 fail, 8 skip). - `bun test scripts/changelog-fold.test.ts scripts/release-notes.test.ts`: 18 pass, including one where `releaseNotes()` reads a folded changelog. - `git log --follow --diff-filter=A` checked on a throwaway branch: after `x (devswha#1000)` adds a fragment and `chore: rename (devswha#1001)` renames it, it reports devswha#1000 (without `--follow`, devswha#1001). - Dry run on this branch with a probe fragment: `bun scripts/changelog-fold.ts 0.4.9 2026-10-13` changed CHANGELOG.md by only the new heading, the probe line at the end of Fixed and the two compare links (+5/-1), and deleted the fragment. Reverted afterwards. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Closes #922
Change
The header menu's Alerts row is a switch (
menuitemcheckbox, a pressed button in the phone's sheet), but it drew only an icon, a label and a state in words, so it read as a link to Settings → Alerts while a click turned alerts on or off at once.A menu item with
checked: truenow draws a check mark after its hint, in the popover and in the sheet. Alerts is the only such item today. No CSS was added: the mark takes the menu's existing icon size and color.Not in this PR, from the issue's proposal: a stateful label ("Alerts: On/Off") and an undo toast after turning alerts off. The hint already says the state in words.
Validation
bun run typecheck, and the i18n, conventions and changelog-fold unit tests: pass (macOS arm64, Bun 1.4.0).bun run check run --build bun scripts/ui-regression.ts: 65 PASS.It runs the Alerts item through
scripts/header-more.ts, which checks the item's state against its words.