Skip to content

Rules submenu in the menu bar - #18

Closed
jnahian wants to merge 2 commits into
feat/picker-appearancefrom
feat/menu-rules
Closed

jnahian wants to merge 2 commits into
feat/picker-appearancefrom
feat/menu-rules

Conversation

@jnahian

@jnahian jnahian commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Stacked on #17 (which is on #16). Merge those first, then retarget to main. All three add to ## Unreleased in CHANGELOG.md, so expect small conflicts there.

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

@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 Ready Ready Preview Sep 27, 2026 6:05am UTC

jnahian and others added 2 commits September 27, 2026 12:04
…size (#20)

The picker was one fixed shape, a vertical list of 22pt icons with names.
A new optional `picker` config block (layout, labels, iconSize) sets it
globally, edited under Settings → Browsers → Picker appearance.

- Horizontal lays choices out in a grid sized to the screen (at most 9
  columns). ←/→ step one choice, ↑/↓ jump a row.
- Icon-only drops the names; digits sit on the icon corner, and a line
  above the choices names the selected one so same-icon profiles stay
  distinguishable. Vertical + icon-only narrows the panel to the icon
  column with icon buttons in the footer.
- iconSize is clamped to 16–64 on load. Unknown layout/labels values fail
  to parse, and parse errors from bad values now name their location.
- The block stays out of the file until the user changes it.

Closes #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: 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
@jnahian

jnahian commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #21 (same change, rebased onto main after #16 and #20 merged).

@jnahian jnahian closed this Sep 27, 2026

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