Skip to content

test(doc-preview): give the external-link fixture the project catalog fields - #34211

Closed
nwparker wants to merge 2 commits into
mainfrom
nwparker/fix-doc-preview-link-store-fixture
Closed

nwparker wants to merge 2 commits into
mainfrom
nwparker/fix-doc-preview-link-store-fixture

Conversation

@nwparker

@nwparker nwparker commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3
Prod 0 0 0 0

ELI5

Main stopped typechecking: a test added by one PR built a fake store that a second PR, merged around the same time, had since made incomplete. This adds the two missing fields to that fake. It's test-only.

What Changed

Before: pnpm tc failed on main with doc-preview-external-link-confirmation.test.ts(86,39): TS2322 … is not assignable to type 'HttpLinkStoreState'. Property 'repos' is missing.

After: the fixture includes repos: [], endpointProjects: [] and endpointProjectHostSetups: [], which means an empty project catalog, in the same form as the sibling http-link test fixtures. It needs no casts. The object stays structurally typed because the same fixture also serves the mocked app store, which needs entityId on its tabs.

Why

The test's scenario has no projects, so an empty catalog is the honest fixture. Review confirmed that no test here reaches the catalog read, which only happens for loopback links with localhost labels enabled from a local source. So the change can't make a test pass for the wrong reason. Annotating the object as HttpLinkStoreState would reject the app-store-only entityId field and narrow the mutable settings, so I didn't do that.

Linked Issue

N/A (main break: semantic merge conflict between #32272 and #33622).

Visual Proof

N/A: test-only.

Testing

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Test-only. There's no runtime impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

… fields

#32272 made HttpLinkStoreState require repos and projectHostSetupProjection
while #33622 added this fixture, so main stopped typechecking.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e62c9c06-aa82-4653-a2e7-775d3718883b
Commits

Reviewing files that changed from the base of the PR and between 89e272a and 3cd0005.

Files selected for processing: 1
  • src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Walkthrough

The test fixture adds empty repos, endpointProjects, and endpointProjectHostSetups collections to its store state.

Priority: Low

Merge Risk: Minimal · up to 3cd00

This fixture update is ready to merge with no remaining actionable risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the test fixture update and the missing project catalog fields.
Description check Passed The description is detailed and covers the change, cause, rationale, testing, scope, and checklist. It states that no linked issue exists and leaves the full validation checklist incomplete, but the r…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and covers the change, cause, rationale, testing, scope, and checklist. It states that no linked issue exists and leaves the full validation checklist incomplete, but the remaining information is sufficient for this small test-only change.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded: #34202 already fixed this test fixture on main.

@nwparker nwparker closed this Oct 27, 2026
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