Skip to content

feat(ui): wire Welcome onSetup CTA to external browser (#14)#44

Merged
ilmoniemi merged 3 commits into
mainfrom
feature/14
May 12, 2026
Merged

feat(ui): wire Welcome onSetup CTA to external browser (#14)#44
ilmoniemi merged 3 commits into
mainfrom
feature/14

Conversation

@ilmoniemi
Copy link
Copy Markdown
Contributor

What

Replace the TODO(#14) placeholder in MainActivity.kt's composable(Routes.Welcome) block with an Intent.ACTION_VIEW launch of https://pyryco.de/setup via LocalContext.current. The URL is held in a file-scope private const val SetupUrl next to Routes.

  • WelcomeScreen's onSetup: () -> Unit parameter shape is unchanged; previews continue to pass onSetup = {} no-ops.
  • Mirrors the existing onPaired wiring pattern at the same call site.
  • No new dependencies; Intent, Uri, and LocalContext are already on the classpath.

Issue

Closes #14

Testing

  • ./gradlew assembleDebug — BUILD SUCCESSFUL
  • ./gradlew lint — BUILD SUCCESSFUL
  • ./gradlew test — BUILD SUCCESSFUL
  • No new tests added (per architecture spec): the change is a single SDK call wired to a callback; previews cover the screen visually; manual on-device verification covers the tap behavior.

Architecture compliance

Follows the spec at docs/specs/architecture/14-welcome-onsetup-external-browser.md exactly:

  • File-scope SetupUrl constant adjacent to Routes, not inside it.
  • LocalContext.current captured in the composable { ... } body and closed over by the onSetup lambda — same shape as the koinInject / rememberCoroutineScope reads in the Scanner route.
  • Uri.parse(SetupUrl) over toUri() per the spec's idiom preference.
  • No try/catch for ActivityNotFoundException — explicitly deferred per ticket's Out of Scope section ([[Evidence-Based Fix Selection]]).

🤖 Generated with Claude Code

ilmoniemi and others added 2 commits May 12, 2026 21:34
Replace the TODO(#14) placeholder at the Routes.Welcome composable with
an Intent.ACTION_VIEW launch of https://pyryco.de/setup via the
Compose-local Context, mirroring the onPaired wiring shape.

Closes #14

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ilmoniemi
Copy link
Copy Markdown
Contributor Author

Code Review: #14

Decision: PASS

Findings

  • [NIT] MainActivity.kt:131SetupUrl uses PascalCase, while the project's CLAUDE.md prescribes UPPER_SNAKE_CASE for top-level const val (i.e. SETUP_URL). The architect spec explicitly chose SetupUrl and it mirrors the in-file PascalCase used inside private object Routes, so this isn't worth a re-roll, but worth surfacing for future const-naming alignment.
  • [NIT] PR description references the spec path as docs/specs/architecture/14-welcome-onsetup-external-browser.md, but the file was committed as 14-welcome-setup-cta.md. Cosmetic mismatch only.

Summary

The diff is minimal, focused, and matches the architecture spec line-for-line: file-scope SetupUrl constant adjacent to Routes; LocalContext.current captured in the composable(Routes.Welcome) { ... } body and closed over by the onSetup lambda; Intent.ACTION_VIEW + Context.startActivity synchronous fire-and-forget; no try/catch (deferred per ticket's Out of Scope, [[Evidence-Based Fix Selection]] principle); WelcomeScreen signature and previews untouched. Uri.parse over toUri() per spec preference.

codegraph_callers WelcomeScreen confirms the only call sites are MainActivity + the in-file previews — no missed signature-change ripple. All ACs are satisfied; builds, lint, and tests pass per the PR description.

Adds docs/knowledge/codebase/14.md and refreshes welcome-screen.md +
navigation.md to reflect that the onSetup CTA now launches
Intent.ACTION_VIEW at https://pyryco.de/setup.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ilmoniemi ilmoniemi merged commit 3627e1a into main May 12, 2026
@ilmoniemi ilmoniemi deleted the feature/14 branch May 12, 2026 18:42
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.

feat(ui): wire Welcome screen CTAs to Scanner navigation + external browser

1 participant