test: Fix stale GitHub-flow screenshot specs - #532
Merged
Merged
Conversation
Ziinc
commented
Sep 26, 2026
Collaborator
Author
There was a problem hiding this comment.
This is a rewrite rather than a patch, because #502 removed the workspace Checks tab. ChecksTab now renders only in the PR detail's "Treq checks" section.
- The spec renders
GitHubPaneldirectly, the same waypr-create-workspace.spec.tsxdoes. Only theghcalls are stubbed; workflow discovery, trust and runs use the real backend. - The workspace is created with
createWorkspace()because it is background state here, not the behavior under test.
Generated by Claude Code
- ci-status-indicator: spread the real features module in the mock so PREVIEW_FEATURE_IDS (added since) is defined. - cmdk-github-pr-workspace-open: the no-PR case used a mock renamed to mockGetCachedPrInfo. - checks-tab: the workspace Checks tab was removed in #502; drive the checks panel in its new home, the Treq checks section of a PR's detail pane, and trim captures to the 3-expectation limit. - prompt-from-github-issue: the sidebar item is labeled "Github". - create-pr-combined-push: wait for the changed file to list before typing the commit message; the commit form remounts once changes load, which dropped the typed message and left Create PR disabled.
Ziinc
force-pushed
the
claude/fix-stale-screenshot-specs
branch
from
September 27, 2026 03:03
eb8b9aa to
6278063
Compare
This was referenced Sep 27, 2026
handleMarkFileViewed hashed whatever hunks were in allFileHunks at click time. While a diff is loading that entry is a placeholder with empty hunks, so marking a file Viewed early stored the hash of the placeholder. Once the real hunks arrived, the stale-content effect saw a mismatch and silently un-marked the file. This is also the root cause of the flaky reviews "mark a file as viewed" integration test. Only hash loaded hunks; an empty hash is never treated as stale. (cherry picked from commit 6ef2cf8)
"hides the message queue when the agentMessageQueue preview is off" only set the in-memory feature preview store. Rendering the Dashboard hydrates settings, and hydrateFlags rebuilds every flag from defaults (all on in test mode) plus persisted settings, so whenever hydration resolved after the setState the flag flipped back on and the queue button rendered. Persist the setting through setSetting, as feature-preview.test.tsx does, and restore it when the test finishes. (cherry picked from commit 88ab81c)
Ziinc
force-pushed
the
claude/fix-stale-screenshot-specs
branch
from
September 27, 2026 03:29
f785fe8 to
e69babe
Compare
Collaborator
Author
|
I copied both fixes into this branch (869a45e, e69babe). They become no-ops once #539 and #540 merge. Generated by Claude Code |
This branch was successfully deployed
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.
Problem
Five
scripts/screenshot/specs/files for GitHub flows failed onmain. None of the failures were product bugs; the app had changed and these specs had not kept up.Fixes
ci-status-indicatorfeaturesmock predatesPREVIEW_FEATURE_IDSFEATUREScmdk-github-pr-workspace-openmockGetCachedPrInfochecks-tabChecksTabin its new home: the PR detail pane's "Treq checks" section, reached through the GitHub panel with a real workspace for the PR head. Only theghcalls are stubbed. Captures trimmed to the 3-expectation limitprompt-from-github-issuecreate-pr-combined-pushfeature.txtbefore typing, ascommit-and-create-pr-dropdownalready doessidebar-pr-state-colors, is a real product bug and is fixed in its own PR (stacking from the home repo creates a stray workspace for the home branch).Verification
create-pr-combined-pushwas run twice to check for flakiness.lintandcheckare clean.Generated by Claude Code