test(markdown): stabilize issue SSR mocks - #753
Closed
beruro wants to merge 1 commit into
Closed
Conversation
This was referenced Aug 10, 2026
Collaborator
Author
|
Merge-order note: this PR fixes the current develop frontend baseline; #752 independently fixes the current develop Rust Clippy baseline. Keeping them separate preserves the repository single-responsibility contract. If branch protection requires both jobs green, a maintainer must land either one with the unrelated baseline failure acknowledged, then rebase and rerun the other; subsequent PR CI can then be rerun on a clean base. |
Member
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
The current
developbranch fails four synchronous SSR tests across the shared GitHub issue surface. Those tests render through the lazyMarkdownentry without a synchronous test substitute, causing React to suspend insiderenderToStaticMarkup. Once that suspension is removed, the same stale test mocks also omit theRICH_MARKDOWN_COMPOSER_TOOLBAR_CLASSexport now consumed by the issue comment composer. The production UI has a Suspense host; the regression is in the test boundary and blocks frontend CI for unrelated PRs.Solution
Update the two affected SSR test modules to provide:
MarkDownsubstitute that still renders the supplied text content; andRichMarkdownEditorsubstitute.The tests continue rendering the real issue/thread composition and exercising their original assertions; no production component or behavior changes.
Potential risks
The synchronous Markdown substitute does not exercise lazy chunk loading or Markdown parsing in these two composition tests. Those concerns belong to the Markdown component's own tests; these tests verify issue metadata, controls, timeline composition, and shared surface structure. The patch changes only test mocks, with no UI, persistence, API, dependency, or runtime impact. Rollback is a normal revert of this commit.
Verification
develop: the two target files reported 4 failures / 5 passes due to synchronous suspension.PATH=../../../node_modules/.bin:$PATH vitest run src/modules/ProjectManager/WorkItems/components/GitHubIssueThreadSurface.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/IssuesContent/__tests__/IssueDetailExternalLinkButton.test.ts— passed, 9/9 tests after the fix.PATH=../../../node_modules/.bin:$PATH tsc --noEmit— passed.git diff --check— passed.developstill has the independent imported-history Rust Clippy baseline failure isolated in fix(history): satisfy imported window clippy #752; this test-only PR intentionally does not absorb that unrelated production fix. After either baseline PR lands, the remaining PR must be rebased and rerun.