feat(accounts): Epic 5 — Finding → Fix & Anchored Actions (Story 5.1)#1423
Open
srtab wants to merge 2 commits into
Open
feat(accounts): Epic 5 — Finding → Fix & Anchored Actions (Story 5.1)#1423srtab wants to merge 2 commits into
srtab wants to merge 2 commits into
Conversation
Add a `fix it` affordance on actionable found-issues findings in the Feed and the Queue. It opens a scope/intent preview (repo/ref scope + the finding intent + the untrusted fix_prompt as inert, auto-escaped text — no generated diff) and, only on an explicit confirm POST, launches exactly one change session via submit_batch_runs(trigger_type=UI_JOB). Render paths and the preview GET perform zero writes and enqueue zero runs; the confirm re-validates the live envelope server-side (shared still_actionable + FIX + non-empty fix_prompt), owner-scopes the run, gates can_run, builds RepoTarget from the originating run's ref, and swaps the item to a calm "fix started" state without decrementing the "you have N" count. The preview + POST-only enqueue is the human-in-the-loop security gate over classifier-authored, untrusted run prose.
- Move actionable-id/prompt assembly and the can_run gate inside the try so a hostile/stale payload or repo-client error degrades to a calm inline notice instead of a 500. - Use a single generic "not found or not accessible" denial message that never reveals whether the repo exists. - Reject a present-but-invalid surface param with 404 rather than silently coercing to the default (which would mis-target the swap). - Fix preview: fall back to the item region for focus return when a concurrent console swap detaches the trigger; drop the max-height cap so the untrusted instruction is fully readable before confirm. - Fix-started: drop aria-live (node lives inside clobbered #console-main); the OOB #fix-announce region is the single announcer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Epic 5 — Finding → Fix & Anchored Actions (Story 5.1)
Stacked on
feat/epic-4-needs-me-queue(→ Epic 3 → Epic 2 →main) — please review only the delta on top of it. This PR delivers Story 5.1; Story 5.2 (the remaining anchored actions — review this / retry / re-run) will follow on this branch.What it does
Gives the Review Console its single legitimate launch capability: from an actionable
found-issuesfinding, one fix it action spawns a change session — gated by a scope/intent preview so a bad fix can never silently land — linked back to the originating finding.found-issuesfinding whose envelopeactionable[]list is non-empty offers a fix it action (amberbutton-fix); all-clear / non-actionable items offer no fix action.Esccreates no session.sessions.services.submit_batch_runswith the appropriateSessionOrigin, linked back to its source — no new job-creation code path, no free-form launcher.actionable[]item; consumers never re-parse prose or invent fields.HX-Trigger— no scroll-jumping auto-refresh; keyboard-activatable with a teal focus ring (Esccloses the preview); en + pt (pt-PT) strings.Scope boundaries (v1)
Testing
uv run pytest tests/unit_tests/accounts/→ 370 passed.Notes
Base is
feat/epic-4-needs-me-queue, not the default branch — review only the delta. Produced via the unattended dev loop.