Repository navigation
Conversation
|
Intent: Let a user whose managed-launch device-code expired generate a fresh code, and stop the half-set-up instance from trapping them behind the wrong "install CLI" screen with no way back. |
Design Review (Fable 5) — 🔴 BLOCK (blocking)Design-level review of Design-Verdict: BLOCK Cannot evaluate: missing screenshot or recording of the three new UI states — the description itself says screenshots are pending. BlockersRequired rendered evidence missing for a reshaped user-visible surface Suggestions
[DESIGN-REVIEWED] 1573995 |
UX Review (Fable 5) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK cannot evaluate: missing every screenshot — blind read not performed; the PR admits "Screenshots pending" while adding a button, a full-screen state, and four new copy states. Evidence gaps
Watch
Suggestions
[UX-REVIEWED] 1573995 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify merge order with #9840: whichever lands second must thread Identity Center flags through the refresh call, or regenerated codes reach the wrong portal. Not justified as shipped
What this change shipsInventory (10 items) — 7 justifiedIntent: unstick a user whose device sign-in code expired mid-launch, instead of forcing cancel-and-relaunch — fundamentally a FIX (reproduction written in the description; existing
[FIRST-PRINCIPLES-REVIEWED] 1573995 |
Opus 4.8 Review — 🔴 changes requested (blocking)Reviewed Confirmed. Candidate 1 is a real violation of the BLOCKING — a failed sign-in-refresh request is rendered in a hand-written [BLOCK-MERGE] 1c7b5ed
[OPUS-REVIEWED] 1c7b5ed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 5.6 Review — 🔴 changes requested (blocking)GPT 5.6 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/dashboard/handlers_cloud.py:594 -- Active launch worker overwrites the refreshed code Adjudication (Opus 4.8) — is blocking on each finding proportionate?The adjudicable block is empty. One fenced finding, F1, to annotate. F1 — Conditions confirmed this run:
Recovery path: the job proceeds to Harm rung: LOW. The clobbered value is an ephemeral device code that reverts to an expired one — no credential is exposed (the stale code is useless), no irreversible loss; the user sees a non-working code and clicks refresh again. The fix ("reject refresh until terminal") would defeat the endpoint's core purpose (refresh during [ADJUDICATION] 1573995 total=0 uphold=0 downgrade=0 🏷️ Fenced finding(s) machine-flagged as likely edge caseThe security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.
False positive or not applicable? A repository writer can comment: |
1c7b5ed to
1573995
Compare
When a managed EC2 crew launch runs past the device-code timeout, the displayed code expires with no way to get a fresh one, and switching to the half-set-up instance shows the generic "install Kiro CLI" gate with no escape. Add a signin-refresh route, a "Generate new code" button, a purpose-built embedded gate screen, and a tab-strip escape hatch.
1573995 to
1d64e1c
Compare
GPT 5.6 Review —
|
|
Converting this to a draft and handing the work off to a feature request: #10903. Rather than owning this feature to completion, filing it as a tracked request. This branch stays as a reference implementation — it has the working backend route, the UI, and passing tests — but two open items need engineering decisions that are better made by someone with the concurrency context:
Screenshots for the Design/UX gates were also not captured. #10903 documents all three. Anyone is welcome to pick up this branch from here. |
|
Thanks for tackling this, @molladair — regenerating an expired remote sign-in code is a real gap worth closing. I'm closing this one because the current shape is much larger than the feature needs: ~540 lines across 10 files, including a new A much smaller version would likely go green far more easily: a single "regenerate" action wired onto the existing expired-code state, reusing the current You're very welcome to reopen this or open a smaller PR along those lines — happy to see the feature land. Thanks again. |
Problem / Motivation
When you launch a managed EC2 crew, one step is "Sign in to Kiro" — the instance shows a device code you approve in your browser. That code expires in about 10 minutes. If you miss the window, you are stuck three ways:
Why it matters
The only escape today is to cancel the whole launch and pay for a fresh instance. A user who steps away for eleven minutes loses the instance they just made. This hits exactly the users most likely to be interrupted mid-setup.
What changed (motivation → approach → change)
The code expires and nothing lets you make a new one, so add a way to make a new one, and stop the dead-end screens from trapping you.
POST /api/cloud/launch/{id}/signin/refreshroute restartskiro-cli login --use-device-flowon the already-running instance over SSM and returns a fresh URL + code. It only runs once the instance exists (409 before that, or on a cancelled job), surfaces an SSM failure as a 502, and handles the race where you approve the old code just as the refresh fires (reports "already signed in" instead of a code you no longer need).start_device_loginalready kills any stale login process before starting a new one, so calling it again is safe.postMessage, since an iframe cannot navigate its parent). The gate also keeps polling in this state so it clears itself the moment you approve, no "Check again" needed.mc-navigatemessage from that button, switching back to Local first so the settings page is not hidden behind the pane overlay.flowchart TD subgraph before["Before — code expires"] B1[Code expires]:::ctx --> B2[Dashboard shows dead code]:::removed B1 --> B3[Embedded pane: 'Install Kiro CLI']:::removed B3 --> B4[Check again → nothing]:::removed B2 --> B5[Only exit: cancel + relaunch]:::removed end subgraph after["After"] A1[Code expires]:::ctx --> A2[Generate new code]:::added A1 --> A3[Embedded pane: 'Finish signing in']:::added A3 --> A4[Open Remote Instances settings]:::added A2 --> A5[Fresh code, keep the instance]:::added end classDef added fill:#DCFCE7,stroke:#16A34A; classDef changed fill:#FEF3C7,stroke:#D97706; classDef removed fill:#FEE2E2,stroke:#DC2626,stroke-dasharray:4 3; classDef ctx fill:#E0F2FE,stroke:#0284C7;🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged
The picture: instead of a dead code and two dead-end screens, an expired code now has a "make a new one" button and the embedded pane sends you where the code lives.
Files
src/kiro_crew/dashboard/handlers_cloud.pysrc/kiro_crew/dashboard/routes/connections.pywebsite/src/api/client.tswebsite/src/pages/settings/RemoteCrewPanel.tsxwebsite/src/components/KiroPrerequisiteGate.tsxwebsite/src/components/InstancesViewport.tsxmc-navigateescape hatch to settingswebsite/src/i18n/locales/en.jsontest/test_cloud_handlers.pyTests
test/test_cloud_handlers.py::TestSigninRefresh— 7 cases locking in the new route: 404 on an unknown job, 409 before an instance exists and on a cancelled job, a fresh code returned and persisted (with the stale confirmed flag re-armed), the already-signed-in race reported as success, a social-login path with no device code surfaced as 502, and an SSM failure surfaced as 502.Manual verification
Backend route is covered by unit tests. The frontend changes (launch-card button, embedded gate screen, tab-strip escape hatch) are wired against existing patterns and typecheck clean (
tsc -p tsconfig.app.json), but I have not captured live screenshots — see below.Screenshots / video
Screenshots pending — the three UI states (launch card with the new button, the embedded "Finish signing in" screen, the tab-strip escape hatch) need the dashboard driven into an unconfirmed-signin launch state, which I will capture and attach before this is marked review-ready. Flagging honestly rather than omitting.
Pattern harvest
Not generalizable: this is a specific missing-retry gap in one launch flow, not an instance of a broader defect class.
Checklist
Related Issues
no linked issue: reported directly by a maintainer, not filed as a tracked issue.