Skip to content

fix: don't show (detected) after manual framework pick - #1213

Open
ShobhanKarthish wants to merge 2 commits into
PostHog:mainfrom
ShobhanKarthish:fix/wizard-manual-framework-detected-label
Open

fix: don't show (detected) after manual framework pick#1213
ShobhanKarthish wants to merge 2 commits into
PostHog:mainfrom
ShobhanKarthish:fix/wizard-manual-framework-detected-label

Conversation

@ShobhanKarthish

Copy link
Copy Markdown

Problem

When auto-detection fails and the user picks a framework from the fallback picker, the intro still shows Framework ✔ <name> (detected). That is the one path where detection definitely failed, so the suffix is misleading.

The "Change framework" menu path already sets manuallySelected (which suppresses the suffix). The detection-failed FrameworkPicker confirm path never did.

Changes

  • On fallback (and change-framework) picker confirm, set manuallySelected so the Framework row omits (detected).
  • Extract frameworkRowSuffix for the row suffix logic and cover it with unit tests.

Test plan

  • vitest run src/ui/tui/screens/__tests__/PostHogIntegrationIntroScreen.test.ts (14 tests passed)
  • Manually: force detection failure → pick a framework from the fallback picker → confirm intro shows Framework ✔ <name> without (detected)
  • Manually: successful auto-detect still shows (detected); Change framework still omits it

Closes #944

When auto-detection fails and the user picks a framework from the
fallback picker, set manuallySelected so the intro Framework row
omits the (detected) suffix — matching the Change framework path.
Copilot AI lite review requested due to automatic review settings September 5, 2026 08:47
@ShobhanKarthish
ShobhanKarthish requested a review from a team as a code owner September 5, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped to the described UX bug and is covered by focused unit tests.

Pull request overview

Fixes a UX inconsistency in the PostHog integration intro screen where the Framework row could incorrectly display “(detected)” after the user manually chose a framework via the detection-failed fallback picker.

Changes:

  • Set manuallySelected when the fallback FrameworkPicker completes, suppressing the misleading “(detected)” suffix.
  • Extract framework row suffix logic into frameworkRowSuffix and add unit tests for it.
File summaries
File Description
src/ui/tui/screens/PostHogIntegrationIntroScreen.tsx Marks fallback framework selection as manual and extracts suffix formatting into a helper.
src/ui/tui/screens/tests/PostHogIntegrationIntroScreen.test.ts Adds unit tests covering the extracted suffix logic.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/ui/tui/screens/PostHogIntegrationIntroScreen.tsx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Intro shows "(detected)" after a manual pick from the detection-failed picker

2 participants