Skip to content

feat(settings): turn agent pins on by default - #891

Closed
willowite wants to merge 2 commits into
devswha:mainfrom
willowite:feat/agent-pins-default
Closed

willowite wants to merge 2 commits into
devswha:mainfrom
willowite:feat/agent-pins-default

Conversation

@willowite

Copy link
Copy Markdown
Contributor

Closes #882

Change

The pin star in the Agents list is hidden until a user finds Settings → Appearance → Pin agents, so most users never see the feature.

agentPins now defaults to true. sanitizeSettings keeps any saved boolean, so an explicitly saved false stays false; a value that is not a boolean (null, "true", 1) takes the default. The setting, its toggle and the star are otherwise unchanged. The server needs no change.

Shared settings (#854)

agentPins is a shared setting, and the server holds no defaults: PreferenceStore keeps only the settings some browser has changed, and a browser sends only what differs from its baseline. So the new default works out like this:

  • A server holding no agentPins value. Every browser that has no stored choice shows the stars. Opening a page writes nothing, and nothing is sent for the default.
  • A server holding agentPins: false. A browser takes it on load, so the stars stay off for everyone who shares that server.
  • Turning the stars off in a browser. This is a change from the default, so it is shared like any other, and the other browsers follow.
  • A browser that already stored agentPins: false. It keeps it. Settings are saved as one record, so a browser that saved any setting before this change also stored agentPins: false, and that cannot be told apart from a deliberate choice. Those browsers need to turn the setting on once. Only browsers with no stored settings get the new default.

src/lib/preferencesSync.test.ts covers the first two cases and the third.

No other text needed an update: the docs, the README and the site demo do not describe pins as off by default (the released 0.4.x changelog entry that says so stays as history), and the demo opens with no stored settings, so it now shows the stars.

Validation

All commands ran in the worktree on Windows 11 with Bun 1.4.3.

RED, on the old default (the new test against unchanged src/lib/settings.ts):

  • HERDR_TEST_MODE=unit bun test ./src/lib/settings.test.ts: exit 1, expect(DEFAULT_SETTINGS.agentPins).toBe(true) received false (58 pass, 1 fail).
  • bun scripts/sidebar-activity-demo-regression.ts: exit 1, every agent offers a pin by default (0 !== 5).

GREEN, with the change:

  • HERDR_TEST_MODE=unit bun test ./src/lib/settings.test.ts ./src/lib/preferencesSync.test.ts ./server/preferences.test.ts: exit 0, 73 pass, 0 fail. The sanitizeSettings cases cover a missing value → true, false → false, true → true, and null, "true", "false", 0, 1 → true.
  • bun run typecheck: exit 0.
  • bun run build: exit 0.
  • bun scripts/sidebar-activity-demo-regression.ts (builds the demo app, loopback only, no herdr session): exit 0, all eight sections pass, including by default the Agents list is flat, in herdr's order, with pin stars.
  • bun scripts/sidebar-spacing-demo-regression.ts and bun scripts/deep-link-demo-regression.ts, which draw the Agents list with default settings: exit 0 each.

One unrelated failure: server/telemetry.test.ts "the notice sends the install once, and a restart on the same version sends nothing" fails on Windows, and fails the same way on unmodified main. The full unit suite was not run.

Changelog: one line under Unreleased → Changed.

🤖 Generated with Claude Code

The pin star in the Agents list stayed hidden until a user found the Pin agents
setting, so most never saw the feature. agentPins now defaults to true, and the
sanitizer keeps any saved boolean, so an explicit false stays false. A value that is
not a boolean takes the default.

Closes devswha#882

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1625ef65-4bd1-414f-80a4-1b5b3603fcf0

📥 Commits

Reviewing files that changed from the base of the PR and between ba0159a and c775cad.


📒 Files selected for processing (5)
  • CHANGELOG.md
  • scripts/sidebar-activity-demo-regression.ts
  • src/lib/preferencesSync.test.ts
  • src/lib/settings.test.ts
  • src/lib/settings.ts

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devswha

devswha commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Thanks for this. Closing it: #1120 removes the Pin agents setting, so pins no longer need a default. An agent is pinned from its row's ⋯ menu or a right-click instead.

@devswha devswha closed this Oct 14, 2026
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.

Agent pins on by default

2 participants