Skip to content

fix(settings): Path inputs and LLM prompt injection UX improvements#85

Merged
eyelock merged 4 commits into
mainfrom
fix-settings-path-inputs
Jan 25, 2026
Merged

fix(settings): Path inputs and LLM prompt injection UX improvements#85
eyelock merged 4 commits into
mainfrom
fix-settings-path-inputs

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 25, 2026

Summary

Comprehensive Settings UI improvements addressing path input UX issues and LLM prompt injection normalization discovered during Phase 2 stabilization testing.

Changes

1. Path Input Improvements

  • Replace Picker dropdowns with PathInputField component for CLI/MCP install paths
  • Add "Custom Path" option allowing users to specify any install location
  • Fix TermQ Data Folder field to use PathInputField (now selectable/pastable)
  • Consistent path validation across all Settings path inputs

2. LLM Prompt Injection UX Normalization

  • Standardize all LLM settings to "LLM Prompt Auto-injection" naming theme
  • Move "Enable LLM Prompt Auto-injection" from Tools → Data & Security tab
  • Fix confirmExternalLLMModifications key mismatch bug
  • Fix LLM_PROMPT token always injecting regardless of permissions
  • Change shell escaping from single quotes to double-quote context escaping
  • Add quotes to Command Generator templates for transparency
  • Users can now customize: claude "{{LLM_PROMPT}} {{LLM_NEXT_ACTION}}" --flag

3. Localization

  • Update all 40 language files (en + 39 others) with new LLM strings
  • English translations complete, other languages have English fallbacks

Security Fixes

  • LLM_PROMPT now correctly respects both global AND per-terminal permissions
  • Double-quote escaping prevents injection while allowing user customization
  • Settings grouped logically in Data & Security tab

Testing

  • ✅ Phase 2.3: SharedToggle Components - All toggles work, state persists
  • ✅ Phase 2.4: PathInputField Components - Custom paths, browse, validation all working
  • ✅ Phase 2.5: Tags Editor - Add/remove tags, display on cards
  • ✅ Phase 2.6: StatusIndicator Components - tmux/MCP status clear and functional

Related Issues

  • Addresses Phase 2 stabilization testing findings
  • Fixes path input inconsistencies discovered during testing
  • Resolves LLM settings cognitive confusion

🤖 Generated with Claude Code

David Collie and others added 4 commits January 25, 2026 10:12
Issues fixed:
1. Check for Updates button always greyed out - initialized canCheckForUpdates to true
2. CLI install path not configurable - added custom path option with PathInputField
3. MCP install path not configurable - added custom path option with PathInputField
4. TermQ Data Folder not pastable/selectable - replaced manual implementation with PathInputField

Changes:
- SettingsDataSecurityView: Replace manual path UI with PathInputField component
- ToolsTabContent: Add custom path toggle and PathInputField for CLI and MCP
- SettingsView: Add custom path state and update install functions
- TermQApp: Initialize canCheckForUpdates to true instead of false

All path inputs now use the consistent PathInputField component with proper validation,
browse functionality, and text selection support.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Simplified Settings path inputs based on user feedback and fixed
validation/reinstall errors discovered during Phase 2.1 testing.

Changes:
- Simplified CLI/MCP install path UI: removed confusing toggle/radio
  button pattern, replaced with single editable PathInputField that
  shows current install location or sensible default
- Fixed PathInputField validation warnings by using directory path
  (location.path) instead of full binary path (location.fullPath)
- Fixed reinstall errors caused by installer receiving full binary
  path instead of directory path
- Replaced manual path UI in SettingsDataSecurityView with
  PathInputField for consistency
- Reduced state management from 10+ variables to 4 for path handling

Files modified:
- Sources/TermQ/Views/SettingsView.swift: Simplified state, updated
  refresh functions to use directory paths, install/uninstall now
  always use path from binding
- Sources/TermQ/Views/ToolsTabContent.swift: Removed toggle/picker UI,
  replaced with single PathInputField in both install and installed
  views

Testing: Manually verified in Settings → Tools tab:
- Path fields show correct directory paths with no validation warnings
- Browse button works correctly
- Reinstall button works without errors
- Paths are editable and update correctly

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Standardize LLM-related settings with consistent "LLM Prompt Auto-injection"
naming across UI, fix permission enforcement bugs, and improve transparency.

Changes:
- Normalize all LLM settings to "LLM Prompt Auto-injection" theme
- Move "Enable LLM Prompt Auto-injection" from Tools to Data & Security tab
- Fix confirmExternalLLMModifications key mismatch bug
- Fix LLM_PROMPT token always injecting regardless of permissions
- Change shell escaping from single quotes to double-quote context escaping
- Add quotes to Command Generator templates for transparency
- Update localization strings (English only, 39 languages pending)

Security fixes:
- LLM_PROMPT now correctly respects both global and per-terminal permissions
- Double-quote escaping prevents injection while allowing user customization
- Users can now add CLI flags: claude "{{LLM_PROMPT}} {{LLM_NEXT_ACTION}}" --flag

UX improvements:
- Settings grouped logically in Data & Security tab
- Templates show exact command structure (no hidden transformations)
- Users maintain full control over init command customization

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add English strings as fallback for new LLM prompt auto-injection labels
across all 39 supported languages. Proper translations to be done later.

Updated strings:
- settings.enable.terminal.autorun
- settings.enable.terminal.autorun.help
- editor.allow.agent.prompts
- editor.allow.agent.prompts.help
- editor.allow.agent.prompts.disabled.globally
- settings.confirm.external.modifications
- settings.confirm.external.modifications.help
- editor.confirm.external.modifications
- editor.confirm.external.modifications.help
- editor.confirm.external.modifications.disabled.globally

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

claude Bot commented Jan 25, 2026

Code review

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

@eyelock eyelock merged commit d72db9f into main Jan 25, 2026
8 checks passed
@eyelock eyelock deleted the fix-settings-path-inputs branch January 25, 2026 15:20
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