Skip to content

feat(discover): disable Discover settings while discovery is switched off - #382

Merged
linroid merged 1 commit into
mainfrom
feat/discover-settings-follow-switch
Oct 4, 2026
Merged

linroid merged 1 commit into
mainfrom
feat/discover-settings-follow-switch

Conversation

@linroid

@linroid linroid commented Oct 4, 2026

Copy link
Copy Markdown
Owner

What changed

  • On Settings → Discover, everything under the AI discovery switch is disabled while the switch is off: content filter, page access (mode, trusted sites, Add), provider chips, API key, model, endpoint, Test and web search. "Disabled" means greyed out and not clickable or editable; no values change, and what was entered is still there when the switch is turned back on. The switch itself stays usable.
  • While it's off, the status line under the switch reads "Lets Discover find downloads for you." before naming any missing key or search credentials, and the settings list summary reads "Off" rather than "Not set up". Nothing below the switch can be changed then, so prompting to finish setup would be misleading.

Why

Since #378 discovery is on by default and the switch is how users opt out. Leaving the form editable while it's off suggested the settings were in effect.

Notes for reviewers

  • This drops one behaviour: Test used to work with the switch off so a key could be checked before turning discovery on. Now it needs the switch on. docs/ai-discovery.md is updated. AiSettingsController.testConnection still supports a switched-off test; only the UI no longer offers it.
  • The render test checks the controls carry the disabled semantics rather than clicking them, because firing a click through semantics bypasses Compose's enabled = false. Real pointer and touch input is blocked.

Testing

  • ./gradlew :app:shared:jvmTest passes.
  • New tests:
    • AiDiscoverySettingsRenderTest.switchOff_disablesEverythingButTheSwitch: switching off disables the page access field, provider chips and access menu but not the switch; switching back on re-enables them and keeps the trusted sites.
    • SettingsPageTest.discoverSummary_switchedOffWithoutKeys_saysOff.
  • New snapshot settings-discover-off, rendered with -Psnapshots and checked.

… off

Everything under the AI discovery switch follows it, and what was entered is
kept. The status line and the settings summary say Off before naming anything
missing, since nothing below can be changed then.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T09:53:25.628458Z fea9709 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 4, 2026

Copy link
Copy Markdown

Code review

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

@linroid
linroid merged commit e9a7914 into main Oct 4, 2026
10 checks passed
@linroid
linroid deleted the feat/discover-settings-follow-switch branch October 4, 2026 09:52
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