Remove 35 redundant stories to reduce snapshot cost and review repetition - #579
Conversation
AlertEnabled has identical effective args and primed activity: a full-width header with an empty notepad. Retain AlertEnabled as the single snapshot of that state.
MinimalWidthWithAlert has identical width (150px), empty notepad, and primed activity. Retain that story for the minimal-tier empty-notepad layout.
Door passes OSC_NOTIF_BUSY to AlertBell, which renders the same filled, 45-degree bell as BUSY. Retain AlertBusy; the status control still exposes OSC_NOTIF_BUSY for manual inspection.
Door passes COMMAND_EXIT_ARMED to AlertBell, which renders the same filled, 45-degree bell as BUSY. Retain AlertBusy; the status control still exposes COMMAND_EXIT_ARMED.
This fixture only forces CSS animation and transition suppression, already applied by the Chromatic preview to AlertRinging. It does not emulate prefers-reduced-motion or assert motion behavior. Retain AlertRinging and the reducedMotion control.
Default renders the same confirmation UI with G instead of W. The char control supports manual variation; Shaking and Confirming retain the distinct exit states.
Waiting already inherits code 07, exercising the two-character leading-zero presentation. Changing it to 00 adds no layout or interaction coverage. Retain Waiting and BeforeTheCode.
BlockedTitle ignores displayText, so this story renders the same blocked reason, URL, and Close action as Blocked. Retain Blocked and the existing external-link classification tests.
DeceptiveFullUrl exercises the same deceptive title, safe initial focus, and copy-only action with a longer URL-shaped label. Bare-domain classification remains covered by external-links.test.ts.
PlainLabel covers the labeled confirmation heading, and CustomScheme covers the vscode:// action label using the identical target URI. This combination adds no rendering branch or interaction assertion.
ScaledCustom already covers SCALED with sync disengaged, custom dimensions, and an enabled Apply action. PhoneViewport only substitutes numeric input values; it neither selects a device nor renders a phone-sized modal.
Playground already includes a correlated loopback URL, a named key, and the dev-server chip at the same width. This fixture only changes port and label text; retain Playground and RawSession for chip presence and absence.
MixedDoorStates includes the same ringing, non-TODO Door in the real Baseboard, alongside idle and TODO states for comparison. OneSpeakingDoor retains the single-Door composition with the distinct speech treatment.
MultipleRingingSessions already renders a NOTHING_TO_SHOW, non-TODO pane through the real Wall beside its ringing siblings. Retain that comparison and Default for the single-pane layout.
MultipleRingingSessions already renders an ALERT_RINGING, non-TODO pane through the real Wall. Retain that comparison and Default for the single-pane layout.
The fixture never dismisses an alert: it only primes ALERT_RINGING with todo=true. MultipleRingingSessions already contains that exact activity combination, so this story adds neither a dismissal assertion nor a unique presentation.
MultiPane and WithDoors already render the same flattened LS scenario through Wall and exercise split/minimize interactions. Default retains the single-pane composition, so another single-pane terminal transcript adds no Wall coverage.
TerminalPane/AnsiColors retains the identical ANSI scenario in the real terminal component. Wall/Default and MultiPane retain Wall composition coverage; the ANSI transcript does not change Wall chrome or behavior.
Wall/Default renders the same TerminalPane and flattened shell-prompt scenario, with the same terminal-settling gate. Keep that integrated prompt baseline and the isolated ANSI/scrollback fixtures.
Wall/MultiPane and TextSelection stories retain this TerminalPane with the same flattened LS transcript. This fixture has no unique terminal state or interaction beyond writing and settling that output.
flattenScenario collapses every delay into one write, so this story never exercises a long-running process or progress timing. It is another completed colored transcript; AnsiColors covers color rendering and FastOutput covers output beyond the viewport.
PopupAfterDragDown already renders a finished multi-line linewise outline and its copy popup in the same TerminalPane frame. Only the selected coordinates differ; BlockOutline retains the distinct rectangular shape.
TextSelection/HintWhenDraggingDown uses the identical linewise selection coordinates, dragging state, and LS scenario through TerminalPane, which includes SelectionOverlay. Retain that integrated fixture and the isolated block, mobile, and smart-path variants.
TextSelection/PopupAfterDragDown uses the identical desktop selection and LS scenario through TerminalPane, including the real SelectionPopup and outline together. Retain the isolated mobile and browser-reserved-chord variants for their different controls and placement.
CustomTimings already enables speech and renders its live delay input, while ManyRules covers speech enabled beside an accumulated rule list. WithRules retains the disabled baseline; this fixture adds no distinct control state.
PushManyDevices renders the same ready, subscribed-device presentation and enabled push controls with a longer joined device label. PushNoDevices and the host/enrollment variants retain the distinct empty and unavailable states.
NarrowHelperHeader uses the identical preserved-session scenario, sample output, and controls at the more demanding 660px width. The state gallery still offers User input for manual review at the default width.
EditorOpen maps to the same preserved helper status and controls as NarrowHelperHeader; its editor content is static story-only markup. ResetConfirmation retains that editor behind the distinct discard dialog, and the gallery still offers Editor open.
TerminalPaneHeader/AlertDisabled already renders the default header without mouse reporting or an override icon. This fixture adds only an empty banner area. Retain ReportingOn, TemporaryOverride, and PermanentOverride for the actual mouse UI states.
UpdateBanner returns null for both idle and dismissed. Idle retains the absent-banner case; the only visible difference here is explanatory markup owned by the story wrapper, not the component.
ConnectedShell renders the same PocketWall, FakeRemoteClient, directory snapshot, splash, and terminal-settling play function, plus the production connected header. Retain ConnectedShell and its pinned dark theme for remote adapter integration coverage.
…ssComplete NotificationDialogTitleAndBody uses the same real Wall context, running command, activity, and open-dialog play function with both notification fields populated. TerminalContextView does not render protocol source; this fixture only changes the notification text.
…alBell NotificationDialogTitleOnly uses the same real Wall context, running command, activity, and open-dialog play function with a title and null body. TerminalContextView does not render protocol source; this fixture only changes the title text.
TextureAtlas renders the identical demoContent through the same default fork-raster GlTerminal and additionally exposes the live glyph atlas. UpstreamVsFork retains the side-by-side renderer regression harness. Update the owning Canopy lab inventory.
SdfTextureAtlas renders the identical demoContent through the same fork-sdf GlTerminal and additionally exposes the distance-field atlas. SdfVsRasterAt3x retains the magnification comparison. Update the owning Canopy lab inventory.
Deploying mouseterm with
|
| Latest commit: |
699cd60
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://69c91130.mouseterm.pages.dev |
| Branch Preview URL: | https://storybook-audit.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
Reviewing as a draft — flagging anything that looks worth a quick fix. Mark ready for a full review.
I spot-checked the removals against the code they render rather than the commit messages, and all but one hold up: BlockedWithLabel is byte-identical to Blocked (BlockedTitle ignores displayText entirely), NotepadEmpty/NotepadMinimalWidthEmpty have exactly the args and parameters of AlertEnabled/MinimalWidthWithAlert, Door's OSC_NOTIF_BUSY and COMMAND_EXIT_ARMED both resolve to the same rotate-45 as BUSY in bellIconClass, PushEnabled differs from PushManyDevices only in a join(', '), DevServerConnected is the meta's default args, and the canopy showAtlas stories render the terminal and the atlas, so they're strict supersets of the two cut. ConnectedView still renders the pocket-app PocketWall, so SingleSession really was covered. All 22 <Canvas of=…> references in docs/stories/pairing.mdx resolve, no removed name survives anywhere in the repo, no import or module-level declaration is orphaned, and the six sibling lints plus spec-lint pass. ReducedMotionRinging is a fair cut too — preview.ts sets cfg.alert.ringingPaused = true under Chromatic, so it snapshotted identically to AlertRinging.
SelectionPopup: the cut took the default and kept the special case
(Would have been inline, but the hunk is deletion-only so there's no right-side line to anchor to.)
lib/src/stories/SelectionPopup.stories.tsx is left with the website variant and Mobile, and no story for the popup every real desktop host draws. ChordReservedByBrowser sets platform.browserReservesNotepadChord, which makes isNotepadChordBound() false in SelectionPopup.tsx, so notepadShortcut is null and the third button renders without its [Cmd+N]. That absent badge is the only difference from the story being deleted — which is exactly the "text-only variant of the same presentation" criterion the rest of this PR cuts on, applied to the wrong one of the pair.
Swapping which one survives keeps the count at 267 and keeps the canonical rendering — replace the ChordReservedByBrowser comment and story with:
// Desktop: all three buttons carry their keyboard shortcuts and, for a downward
// drag, sit below the selection. The fake adapter has an in-memory notepad
// archive, so Add to notepad is present here as it is in every real desktop host.
export const Desktop: Story = {
args: {
id: 'selection-popup-desktop',
selection: SELECTION,
},
};Two smaller leftovers
Both outside the diff, happy to push either if you want them:
SCENARIO_LONG_RUNNINGinlib/src/lib/platform/fake-scenarios.tshas no render site left —TerminalPane'sLongRunningwas the only one. What remains is the barrel re-export and its own structure test infake-scenarios.test.ts, which validates the shape of a fixture nothing draws.ReducedMotionRingingwas the repo's onlyreducedMotion: true, so thereducedMotionprop andargTypeon theTerminalPaneHeaderstory frame are now controls-panel-only. That matches howDoor.stories.tsxalready carried it, so it's consistent rather than broken — just worth knowing the static coverage went with it.
Two notes on the framing
The canopy cuts don't touch snapshot cost at all: chromatic.yml runs with workingDir: lib behind a lib/**, docs/stories/** paths filter, so those two stories were never billed. And with onlyChanged: true, this PR's own build re-snapshots the remaining stories in all 19 touched files, so the payoff is on later builds, not this one. Neither contradicts the PR body, which is already careful about the 11% being a story count.
Restore Desktop and remove ChordReservedByBrowser instead. Keep the normal three-shortcut desktop popup as the isolated baseline alongside Mobile; the reserved-chord variant only removes the notepad shortcut label. SelectionPopup.test.tsx explicitly covers that omission, and capture.test.ts covers the adapter flag. Remove the now-unused story flag plumbing. Addresses dormouse-bot's draft review on #579 without changing story count.
LongRunning was the only render site for SCENARIO_LONG_RUNNING. Remove the unreferenced fixture, barrel export, and structure test now that its redundant story is gone; the other deterministic terminal scenarios remain covered. Addresses dormouse-bot's cleanup note on #579.
|
Addressed the draft review in 0ff30fa and 699cd60:
Validation: 36 focused tests, library typecheck, and Storybook build pass. The restored desktop story finishes its play function and displays all three shortcut labels. Canopy savings remain described separately from the library snapshot-candidate reduction. |
|
Confirmed at The swap is clean:
Keeping the |
Remove redundant Storybook fixtures to reduce snapshot volume and review repetition. The library goes from 300 to 267 stories (11% fewer Chromatic snapshot candidates); the separate Canopy lab goes from 6 to 4.
Removal commits explain the overlap and name retained coverage. The canonical desktop selection popup remains the isolated baseline; existing unit tests cover the browser-reserved shortcut variant. The unused long-running output fixture and its structure-only test are also removed. Cuts include identical fixtures, text-only variants of the same presentation, and cases already exercised by a retained integration or state gallery. Distinct alert rotations, theme variants, pairing outcomes, and layout stress cases remain. The Canopy spec inventory is updated.
Validation:
Chromatic savings depend on which stories each build captures; 11% is the reduction in library story count, not a measured billing reduction.