Skip to content

feat(build): show the journey of the active diff in a drawer - #2573

Merged
jsfez merged 6 commits into
mainfrom
feat/journey-drawer
Sep 9, 2026
Merged

jsfez merged 6 commits into
mainfrom
feat/journey-drawer

Conversation

@jsfez

@jsfez jsfez commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

A test walks a journey and screenshots it step by step, but the review shows each screenshot on its own: nothing says which journey a change belongs to, or where in it the change sits. This is what Federico asked for on Discord, and it is the pair we had built once before — the drawer opening from the top of the build.

Nothing to configure. A journey is the test that took the screenshot (its title path); a step is a logical screen (the backend variantKey, which already folds the viewport and browser variants of one screen together). Both come from metadata the SDKs already send.

What it does

A drawer above the viewer lays the journey out as a strip of steps, in the order the SDK recorded, and jumps between them. ⇧← / ⇧→ walk the same steps from the keyboard, with or without the drawer open.

It is built from every diff of the build, not from the filtered list: the screens that did not change are in it too, and the ones that did carry a mark. A change reads against the journey it happened in. The strip stays within the active diff's variant, so moving between steps keeps one viewport and the boxes can take their shape from it.

A test that captures a single screen is regular visual testing, not a journey — neither the drawer nor its toggle appears for it. The drawer is closed by default and remembers the choice (preferences.build.journey-drawer).

The data was being dropped

The SDKs record metadata.capture.index (argos-ci/argos-javascript#360, shipped), but ScreenshotMetadataSchema did not declare the field — and unknown keys are stripped, so the index has been dropped on arrival ever since, silently. The first commit keeps it and exposes it through GraphQL. It stands on its own and could land separately.

packages/schemas gains a test of its own: the failure mode here is an omission, which nothing else would have caught.

Testing

The seed walks a checkout whose names make the ordering falsifiable — the alphabet gives cart, confirmation, payment, shipping; the diff score gives confirmation, payment; the journey gives cart, shipping, payment, confirmation. Two of the four steps are unchanged, so the journey is only whole if it is built from every diff.

Verified the guard fails without the fix: neutralising getCaptureIndex makes the spec fail on the step order, and only there.

Deliberately not in this PR

  • Ordering the diff list by journey. That was the other half of the old branch; it changes the review's own ordering and deserves its own discussion.
  • Folding -dark / -light into one step. The old patch stripped colour-scheme tokens from screenshot names and from test titles. The first changes getVariantKey, which drives variant grouping across the whole review; the second mangles legitimate titles (a describe named "Dark mode" becomes empty). Neither is needed here.
  • A journey line above the screenshot name. The header's wrap layout balances the name against the variant cluster through a documented crowded contract; wrapping the title would break it. The toggle — which only appears when there is a journey — is the affordance instead.

🤖 Generated with Claude Code

jsfez and others added 3 commits September 2, 2026 15:18
The SDKs record where each screenshot falls within its test
(`metadata.capture.index`, argos-ci/argos-javascript#360, shipped), but the
schema does not declare the field — and unknown keys are stripped, so the
index has been dropped on arrival ever since, silently. Keep it, and expose
it through GraphQL, so the review can follow a test in the order it walked.

The schema gains a test of its own: the failure mode here is an omission,
which nothing else would have caught.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A test walks a journey and screenshots it step by step, but the review shows
each screenshot on its own: nothing says which journey a change belongs to,
or where in it the change sits.

A drawer above the viewer lays that journey out as a strip of steps, in the
order the SDK recorded, and jumps between them. It is built from every diff
of the build rather than the filtered list, so the screens that did not
change are in it too and the ones that did carry a mark — a change reads
against the journey it happened in. ⇧← / ⇧→ walk the same steps from the
keyboard, with or without the drawer open.

A journey is the test that took the screenshot (its title path), a step is a
logical screen (the backend `variantKey`, which already folds the viewport
and browser variants of one screen together). Nothing to configure: it comes
from the metadata the SDK already sends. A test that captures a single screen
is regular visual testing, not a journey, so neither the drawer nor its toggle
appears for it.

The strip stays within the active diff's variant, so moving between steps
keeps one viewport and the boxes can take their shape from it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A build whose screenshots come from a test walking a checkout, with the
capture order recorded. The names are chosen so neither the alphabet (cart,
confirmation, payment, shipping) nor the diff score matches the journey
(cart, shipping, payment, confirmation): a drawer that reads in order can
only be reading the metadata. Two of the four steps are unchanged, so the
journey is only whole if it is built from every diff rather than the
reviewable ones.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@argos-ci

argos-ci Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
argos/default (Inspect) 👍 Approved by Jeremy SFEZ 8 changed, 2 added Sep 4, 2026, 1:30 PM
storybook/default (Inspect) ✅ No changes detected - Sep 4, 2026, 1:29 PM
Deployment Status Branch Updated (UTC)
storybook/preview (Open) Ready feat/journey-drawer Sep 4, 2026, 1:28 PM

jsfez and others added 3 commits September 3, 2026 10:35
The drawer needs a test that captured more than one screen, and no dev
scenario had one — every seeded test captures exactly one screenshot, so the
feature was invisible locally. The checkout journey the e2e spec uses lands
in the dev database too, on a project of its own: it owns build 1 and its
buckets, which would collide with the builds `bigProject` already carries.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`truncate` hides overflow, so a line box the height of the font itself has
nowhere to put a descender: "shipping" lost the tail of its g.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two things in the strip were unreadable on their own. The step label is cut
to fit, so a long name ended in an ellipsis with no way to read it; hovering
it now gives the whole variant key, which the label never shows in full since
it only ever renders the last path segment.

The dot had no legend anywhere. It now says what put it there, naming the
statuses the way the rest of the review names them — "Needs review: Changed".
It is 10px, too small to aim at, so the padding around it is the target and
the offsets keep the dot itself where it was.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jsfez
jsfez marked this pull request as ready for review September 4, 2026 14:05
@jsfez
jsfez requested a review from gregberge September 9, 2026 08:02
@jsfez
jsfez merged commit 1a830a5 into main Sep 9, 2026
16 checks passed
@jsfez
jsfez deleted the feat/journey-drawer branch September 9, 2026 11:47
jsfez added a commit to argos-ci/argos-ci.com that referenced this pull request Sep 12, 2026
The journey strip in the build review, shipped in argos-ci/argos#2573 and
live since 2026-09-09, with the SDK capture order released on 2026-09-11.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pull Bot pushed a commit to Jimimaku/docs.argos-ci.com that referenced this pull request Sep 12, 2026
Document the journey strip that shipped in argos-ci/argos#2573: the
Journey button, what the strip contains, jumping between steps, and the
two keyboard shortcuts. Add where a journey and its steps come from, and
the capture.index metadata field the SDKs now record.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant