Skip to content

feat(security): segmented choices, and built-in tool rules whose action can be set - #97

Merged
fylorn merged 1 commit into
devfrom
feat/security-segmented
Sep 21, 2026
Merged

fylorn merged 1 commit into
devfrom
feat/security-segmented

Conversation

@fylorn

@fylorn fylorn commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Two follow-ups to #96, from looking at it in the app.

Single choices look like the appearance setting

These were rows of separate outlined buttons:

  • the protection modes (off / observe / enforce);
  • the log's type filter;
  • the time range;
  • the overview's chart measure (tokens / cost);
  • the routing probes' modes;
  • the action in the rule dialogs.

They are now one segmented control, the one the appearance and notification settings already use. Joined segments read as one choice among a few; separate buttons read as separate actions. Segmented moves to src/ui/, the old import path re-exports it, and it takes an accessible label.

A built-in tool-call rule's action can be set

A built-in rule supplies the pattern and a factory action. Whether a match is cut off in enforce mode is now set in the rule's dialog, as it is for a custom rule. When the setting differs from the factory one, the dialog says what the factory setting was. The row menu offers Edit for these rules; Copy as a custom rule stays, for changing the pattern.

This pins core v0.19.0, which carries ThinkWatchProject/ThinkWatch-Core#88 for the action. It also carries ThinkWatchProject/ThinkWatch-Core#87, so a key right after a JSON escape, such as one at the start of a line, is found again.

Checks

  • tsc, vitest (181 passed) and build pass.
  • cargo clippy -D warnings and cargo test pass in src-tauri.
  • Checked in the mock preview and in an isolated instance running core v0.19.0:
    • the segmented controls;
    • setting rm-rf-root to cut off and back;
    • a key at the start of a line, and one after an escaped full-width colon, being recorded.

🤖 Generated with Claude Code

…on can be set

Single choices across the app become one segmented control, like the
appearance setting: the protection modes, the log's type filter, the
time range, the overview's chart measure, the routing probes' modes and
the action in the rule dialog. A row of separate buttons reads as
separate actions; joined, it reads as one choice among a few.

A built-in tool-call rule's action on enforce (cut off or record only)
can now be set in its dialog, which shows the factory setting when it
differs. Built-in rules supply the pattern; what happens on a match is
the user's call, without copying the rule first. Pins core v0.19.0,
which also finds a key right after a JSON escape.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fylorn
fylorn merged commit eeaca9e into dev Sep 21, 2026
2 checks passed
@fylorn
fylorn deleted the feat/security-segmented branch September 21, 2026 18:32
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