Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.

fix: improve init onboarding UX for app add step#562

Merged
WcaleNieWolny merged 1 commit into
mainfrom
fix/init-onboarding-ux-improvements
Mar 23, 2026
Merged

fix: improve init onboarding UX for app add step#562
WcaleNieWolny merged 1 commit into
mainfrom
fix/init-onboarding-ux-improvements

Conversation

@WcaleNieWolny
Copy link
Copy Markdown
Contributor

@WcaleNieWolny WcaleNieWolny commented Mar 23, 2026

Summary

  • Merge two redundant confirm prompts into a single select: Add com.example.app to Capgo? with ✅ Yes, add it / ❌ No, use a different app ID
  • Fix duplicate app ID error not being caught — Supabase returns "duplicate key value violates unique constraint" (code 23505), but the handler only checked for "already exist". Now the existing recovery flow (suggest alternatives) triggers correctly
  • Skip checkAlerts() in addAppInternal when called with silent=true from init, preventing clack output from flashing during the Ink session

Test plan

  • Run node dist/index.js i — app add step should show a single select prompt, not two confirms
  • Try adding an app ID that already exists — should show alternative suggestions instead of crashing
  • No version warning should flash during the app add spinner

Summary by CodeRabbit

  • Improvements

    • Streamlined the app addition workflow with a single selection prompt, allowing users to either add the current app ID or change it in one step—eliminating unnecessary confirmation dialogs.
  • Bug Fixes

    • Enhanced duplicate app detection to recognize additional error patterns, improving reliability when identifying already-registered apps.

- Merge two redundant confirm prompts ("Is this the correct app ID?" +
  "Add in Capgo?") into a single select with emoji labels
- Fix duplicate app ID error not being caught (Supabase returns
  "duplicate key" / code 23505, not "already exist")
- Skip checkAlerts() in addAppInternal when called silently from init
  to avoid flashing clack output during Ink session
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 23, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b916353d-6cb2-449d-a8c3-23bf365bb4c2

📥 Commits

Reviewing files that changed from the base of the PR and between c497367 and 3610e73.

📒 Files selected for processing (2)
  • src/app/add.ts
  • src/init/command.ts

📝 Walkthrough

Walkthrough

Two refinements to app initialization: checkAlerts() in add.ts now runs conditionally when silent is false, and command.ts consolidates app-ID confirmation from two prompts into a single choice with extended duplicate-app error detection.

Changes

Cohort / File(s) Summary
Alert Check Condition
src/app/add.ts
Wrapped checkAlerts() call with if (!silent) guard to skip alerts when silent mode is enabled.
App ID Confirmation Flow
src/init/command.ts
Replaced two sequential confirmation prompts with a single pSelect choice; added branching logic to prompt for new app ID when user selects 'change', saving it to Capacitor config; extended duplicate-app detection to match 'duplicate key' and '23505' error patterns alongside existing 'already exist' check.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Two prompts collapse into one graceful choice,
Alerts bow silent when whispers take voice,
Error detection grows keen—catching duplicates near,
The onboarding path clears, bright and sincere! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/init-onboarding-ux-improvements

Comment @coderabbitai help to get the list of available commands and usage tips.

@WcaleNieWolny WcaleNieWolny merged commit ac6e730 into main Mar 23, 2026
13 of 14 checks passed
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3610e73218

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/init/command.ts
Comment on lines +1061 to +1064
options: [
{ value: 'yes', label: '✅ Yes, add it' },
{ value: 'change', label: '❌ No, use a different app ID' },
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve a path to continue onboarding without app creation

This select now only offers yes or change, which removes the previous doAdd === false branch that let users skip app creation and continue onboarding. In environments where users intentionally postpone server-side changes (or temporarily can’t create the app), step 1 becomes a hard blocker and the only escape is canceling onboarding entirely, which is a functional regression from the prior flow.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant