Skip to content

test(notices): give the ShellNotices plugin fake the snapshot's hostOwned - #4239

Closed
matt2e wants to merge 1 commit into
mainfrom
fix/shell-notices-test-host-owned
Closed

matt2e wants to merge 1 commit into
mainfrom
fix/shell-notices-test-host-owned

Conversation

@matt2e

@matt2e matt2e commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

What is failing

pnpm typecheck (tsc --noEmit) fails on main, which fails the "JavaScript checks" job there and on every open pull request based on it:

src/features/notices/ShellNotices.test.tsx(25,7): error TS2322: ... is not assignable to type 'Pick<PluginManager, "subscribe" | "snapshot">'
  The types returned by 'snapshot()' are incompatible between these types.
    Property 'hostOwned' is missing in type '{ configuration: ...' but required in type '{ configuration: ConfigurationState; hostOwned: readonly Readonly<PluginManifest>[]; activation: PluginStates; busy: boolean; error: ... }'

"JavaScript checks" last passed on main at 4eff0ce and has failed on each main commit it has run on since (e9c7586, 38fe301).

Root cause

Two changes that landed about eleven hours apart crossed:

What changed

One line: the fake snapshot in ShellNotices.test.tsx gains hostOwned: [], as #3701 did for the fake in src/app/PluginUpdates.test.tsx. The notice under test comes from an external plugin, so no host-owned feature is involved. No production code changes.

This unblocks "JavaScript checks" on main and on open pull requests once they pick it up.

Verification

Run locally on this branch, based on 38fe301:

  • pnpm typecheck before the change: the one error above, exit 1. After: no errors, exit 0. It was the only type error.
  • vitest run src/features/notices/ShellNotices.test.tsx: 1 file, 1 test passed.
  • biome check src/features/notices/ShellNotices.test.tsx: clean.

🤖 Generated with Claude Code

…wned

`pnpm typecheck` fails on main, which fails the "JavaScript checks" job
there and on every pull request based on it:

    src/features/notices/ShellNotices.test.tsx(25,7): error TS2322
      The types returned by 'snapshot()' are incompatible between these types.
        Property 'hostOwned' is missing in type '{ configuration: ...

Two changes that landed about eleven hours apart crossed:

- 1044a41 (PR 2953) added ShellNotices.test.tsx, whose plugin manager
  fake builds a snapshot by hand.
- c8e7b73 (PR 3701) added a required `hostOwned` to the plugin
  manager's snapshot and updated the other test fakes, but not this
  one.

Since c8e7b73 the fake no longer matches
`Pick<PluginManager, "subscribe" | "snapshot">`. "JavaScript checks"
last passed on main at 4eff0ce, three commits before c8e7b73, and
has failed on each main commit it has run on since (e9c7586,
38fe301).

Add `hostOwned: []` to the fake, as c8e7b73 did for the fake in
src/app/PluginUpdates.test.tsx. The notice under test comes from an
external plugin, so no host-owned feature is involved. It was the only
type error; no production code changes.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@matt2e
matt2e requested a review from a team as a code owner November 23, 2026 00:59
@baxen

baxen commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

🤖 Closing as a duplicate of #4238, which has the identical one-line change and is merging. Thanks for the fix!

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.

2 participants