Repository navigation
Highlight a staged patch preview as the next action - #263
Merged
juanmaguitar merged 1 commit intoAug 11, 2026
Merged
juanmaguitar merged 1 commit into
juanmaguitar merged 1 commit into
Conversation
Pasting a PR or choosing a .diff/.patch file stages a preview — the block that names the files and offers Apply and rebuild / Cancel. It is a clear next action the contributor just set up, but nothing pointed at it. Add an `applyPreview` rule to the resolver (id `apply-preview`) and anchor the preview block so it glows and scrolls into view like the other cue targets. Placed after the in-flight operations and before the stale-state warnings: an explicit, waiting choice beats a standing suggestion, but a live apply or update still wins — and since the preview block renders only while not applying, checking isApplying first keeps the cue on whatever is on screen. Part of #252. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
juanmaguitar
force-pushed
the
juanmaguitar/highlight-apply-preview
branch
from
August 11, 2026 10:47
9bcc32e to
504ff5d
Compare
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.
Why
When a contributor pastes a PR or picks a
.diff/.patchfile, the app shows a staged preview — " changes N files" with Apply and rebuild / Cancel. That block is a clear next action: they set it up and the decision to apply is theirs. But it was not a cue target, so nothing pointed at it. This highlights it like the other next-action blocks.What changes
next-action.cjs: a new rule — whenapplyPreviewis staged, point at theapply-previewblock. Placed after the in-flight operations (isApplying,isUpdating) and before the stale-state warnings and routine steps: an explicit, waiting choice beats a standing suggestion, but a live operation still wins. The ordering matters — the preview block renders only underapplyPreview && !isApplying, so once applying starts the cue must move to the progress tracker; checkingisApplyingfirst guarantees the id follows the visible block.index.jsx: passesapplyPreviewto the resolver and spreadscueProps('apply-preview')onto the preview block.How to test this
Platforms: any (renderer-only). Stacked on #254 + #256 + #258 + #260 — test this branch's Buildkite artifact to exercise the whole stack.
Starting state: an initialized site, wizard skipped, Apply a patch or PR panel visible.
.diff/.patchfile. → The preview block (with Apply and rebuild / Cancel) glows and the view scrolls to center it.What must not have happened:
Risks and limitations
eslint .clean,npm test799 (3 new). Buildkite artifact is the hand-test path.Related
Part of #252. Stacked on #260 (base branch
juanmaguitar/highlight-patch-progress) → #258 → #256 → #254. Merge bottom-up.Review outcome (required — see AGENTS.md)
No findings across the five dimensions (0 [fix here] · 0 [follow-up]). Judgement pass ran in a fresh
Exploresubagent given only the diff and the review standard, per/self-review.Verified: the resolver checks
isApplyingbeforeapply-preview, so when applying starts the preview block unmounts and the cue follows to the progress tracker in the same render (locked by a new test);Boolean(applyPreview)is the right null-vs-object coercion, and the id is returned only when the preview block is actually rendered (no id-without-block window);cuePropsin scope; full suite green. The reviewer also confirmed a staged preview + in-flight trunk update can coexist andupdatingcorrectly wins — placingapply-previewbelowisUpdatingis intentional, and the cue still lands on a rendered block.Deterministic layer:
eslint .clean;npm test799 pass (3 new).