Skip to content

feat: apply PathInputField and SharedToggle to Terminal settings (PR #5/8)#73

Merged
eyelock merged 1 commit into
mainfrom
feat/pr5-terminal-path-toggles
Jan 18, 2026
Merged

feat: apply PathInputField and SharedToggle to Terminal settings (PR #5/8)#73
eyelock merged 1 commit into
mainfrom
feat/pr5-terminal-path-toggles

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 18, 2026

Summary

Applies reusable UI components from PRs #1-2 to Terminal settings tab, improving consistency and user experience across settings interfaces.

Changes

PathInputField for Working Directory

  • Replaced TextField+Button combination with PathInputField component
  • Adds path validation with warning icon for invalid paths
  • Provides consistent folder browser experience

SharedToggle for Security Settings

Replaced three manual toggle patterns with SharedToggle component:

  • "Allow Agent Prompts" (renamed from "Allow Autorun" for clarity)
  • "Confirm External Modifications"
  • "Allow OSC Clipboard"

All toggles now:

  • Disable when global setting is off
  • Show consistent disabled message: "Disabled globally - enable in Settings > Data & Security"
  • Follow unified visual pattern from Environment tab (PR fix: switch to new terminal after creation #3)

Technical Updates

  • Updated AppStorage keys to match global settings from PR feat: add pinned terminals with quick-switch tabs #2
  • Reordered security toggles to match Global Settings order
  • Removed obsolete browseDirectory() function (handled by PathInputField)
  • Added localization strings for Agent Prompts and disabled messages
  • Added translations to all 40 language files
  • Fixed line length warnings in Strings.swift

Testing

✅ PathInputField: Path validation, folder browser, invalid path warnings
✅ SharedToggle: All three security toggles use consistent component
✅ Global gates: Toggles disable correctly when global setting is off
✅ State persistence: Toggle states save and restore correctly
✅ Visual consistency: Order matches Global Settings
✅ All 521 tests pass

Screenshots

Terminal Details > Security section now matches Global Settings order and uses SharedToggle pattern.

Part of Settings UI improvement series (PR #5 of 8)

🤖 Generated with Claude Code

…/8)

Apply reusable UI components from PRs #1-2 to Terminal settings tab,
improving consistency and user experience across settings interfaces.

Changes:
- Replace Working Directory TextField+Button with PathInputField component
  - Adds path validation with warning icon for invalid paths
  - Provides consistent folder browser experience
- Replace three security toggle patterns with SharedToggle component:
  - "Allow Agent Prompts" (renamed from "Allow Autorun" for clarity)
  - "Confirm External Modifications"
  - "Allow OSC Clipboard"
- Update AppStorage keys to match global settings from PR #2:
  - enableTerminalAutorun → globalAllowAgentPrompts
  - confirmExternalLLMModifications → globalAllowExternalModifications
  - Added globalAllowOscClipboard
- Reorder security toggles to match Global Settings order for consistency
- Add localization strings for Agent Prompts and disabled messages
- Fix line length warnings in Strings.swift

Technical details:
- Removed obsolete browseDirectory() function (handled by PathInputField)
- Consistent disabled messaging when global settings are off
- Matches visual patterns established in Environment tab (PR #3)
- All security toggles now use unified SharedToggle component
- Added translations to all 40 language files

Part of Settings UI improvement series (PR #5 of 8)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Jan 18, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@eyelock eyelock merged commit a289618 into main Jan 18, 2026
6 checks passed
@eyelock eyelock deleted the feat/pr5-terminal-path-toggles branch January 18, 2026 23:28
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