Skip to content

Rules submenu in the menu bar - #21

Merged
jnahian merged 1 commit into
mainfrom
feat/menu-rules
Sep 27, 2026
Merged

jnahian merged 1 commit into
mainfrom
feat/menu-rules

Conversation

@jnahian

@jnahian jnahian commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Replaces #18, which is stacked on a base branch that no longer leads to main. Same change, rebased onto main.

What

A Rules submenu in the menu-bar menu, between Recent Links and Settings:

  • Every rule in match order. A checkmark means it's enabled, and clicking a rule turns it on or off.
  • "No rules yet" when the list is empty.
  • Edit Rules… opens Settings on the Rules pane.

How

  • The menu is already rebuilt each time it opens (menuNeedsUpdate), so the checkmarks always reflect the current config.
  • Toggling goes through AppState.updateConfig, the same path as the Rules pane toggle, so the file is saved and the engine rebuilt as usual.
  • Rule ids aren't saved to the file, and the file can change while the menu is open. So each item carries its position and name, and a click only applies if the rule at that position still has that name.
  • "Edit Rules…" posts a new junctionShowRules notification to the settings window's existing jumpToRules, instead of reusing the prefill notification, which carries a URL.

Testing

  • swift build and swift test pass. cd web && npm test && npm run build pass.
  • No unit test: the menu is built inside StatusItemController against a live AppState, and there is no test seam for it.
  • Not exercised in the running app.
  • Added a changelog Added: entry and a "Rules" entry in the docs' menu-bar section.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Y9gVVaoGd4dCz42XkXkpP

A Rules submenu shows every rule in match order with a checkmark for
enabled. Clicking one flips `enabled` through AppState.updateConfig, the
same path as the Rules pane toggle. Rule ids aren't persisted and the
config can change while the menu is open, so the item carries its
position and name, and the click only applies if they still match.

"Edit Rules…" posts a new junctionShowRules notification that the
settings window already knows how to handle (jumpToRules).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Y9gVVaoGd4dCz42XkXkpP
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junction Building Building Preview Sep 27, 2026 6:05am UTC

@jnahian
jnahian merged commit bd41b76 into main Sep 27, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 88001414 Deployed Sep 27, 2026 by vercel[bot]
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