Skip to content

test(notices): give the fake plugin snapshot its hostOwned list - #4238

Merged
matt2e merged 1 commit into
mainfrom
fix/shell-notices-host-owned-snapshot
Nov 23, 2026
Merged

matt2e merged 1 commit into
mainfrom
fix/shell-notices-host-owned-snapshot

Conversation

@matt2e

@matt2e matt2e commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Problem

The JavaScript checks job is failing on main. Its type check (tsc --noEmit, part of pnpm check) reports one error:

src/features/notices/ShellNotices.test.tsx(25,7): error TS2322
  Property 'hostOwned' is missing in type '{ configuration: …; activation: {}; busy: boolean; error: null; refreshError: null; }'
  but required in type 'Pick<PluginManager, "subscribe" | "snapshot">' (the type `snapshot()` returns).

Cause

Two PRs crossed:

Neither saw the other, so each passed its own checks and main broke when the second merged.

Fix

The fake snapshot now carries hostOwned: [], in the position the manager puts it (after configuration). The test models one external plugin and no host-owned feature, so the empty list is what a real manager with no built-ins reports. Other test fakes of the snapshot do the same (PluginUpdates.test.tsx, solo-navigation-testing.ts).

This is the only type error on main: a whole-project tsc --noEmit on unmodified main reports just this one, so no other fake lacks the field.

Draft PR #4232 carries the same line in the same place as an incidental change, so the two merge cleanly whichever lands first.

Ran

On this branch (main at 38fe301 plus this commit):

  • pnpm exec tsc --noEmit before the change: failed with the one error above.
  • pnpm check (Biome, tsc --noEmit, design typecheck, design checks): passed.
  • vitest run src/features/notices/ShellNotices.test.tsx: 1 file, 1 test, passed.

🤖 Generated with Claude Code

The JavaScript checks job fails on main at its type check:

  src/features/notices/ShellNotices.test.tsx(25,7): error TS2322
  Property 'hostOwned' is missing in type ... but required in type
  'Pick<PluginManager, "subscribe" | "snapshot">' (the snapshot).

Two changes crossed. PR 2953 (1044a41) added this test, which
builds a fake plugin manager snapshot. PR 3701 (c8e7b73) then made
`hostOwned`, the manifests of the host-owned features, a required part
of the snapshot. Neither saw the other, so each passed alone.

The fake now carries `hostOwned: []`, where the manager puts it. The
test models one external plugin and no host-owned feature, so the
empty list is what a real manager without built-ins reports. This is
the only type error on main; no other fake lacks the field.

Draft PR 4232 carries the same line in the same place, so the two
merge cleanly.

Ran, on this tree:
- pnpm exec tsc --noEmit before the change: the one error above.
- pnpm check (Biome, tsc, design typecheck, design checks): passed.
- vitest run src/features/notices/ShellNotices.test.tsx: 1 file, 1
  test, passed.

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 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Restores main's type check: the test fake was missing the snapshot's new hostOwned field. Same one-line fix as #4239.

@matt2e
matt2e merged commit 9ec1a46 into main Nov 23, 2026
53 checks passed
@matt2e
matt2e deleted the fix/shell-notices-host-owned-snapshot branch November 23, 2026 01:38
baxen added a commit that referenced this pull request Nov 23, 2026
* origin/main: (24 commits)
  feat(messages): open a downloaded file card instead of downloading again (#3605)
  feat(notifications): ask for macOS notification permission on entering the app (#3801)
  fix(messages): alert when a folder or unsupported file type is dropped (#3943)
  perf(codex): show scripts for large sessions and read only new activity while the agent works (#4188)
  fix(agents): show a finished turn's status while another turn works (#4219)
  perf(agents): open agent transcripts on recent activity and keep them smooth (#4181)
  fix(inbox): stop naming a one-to-one DM's person twice in Activity rows (#3700)
  fix(activity): show the year on activity dates outside the current year (#3799)
  test(browser): wait on real readiness in presence, huddle ring and solo composer journeys (#3922)
  fix(messages): follow a saved draft changed in another composer (#3950)
  test(notices): give the fake plugin snapshot its hostOwned list (#4238)
  Reveal sidebar workspace and channel actions on hover (#4151)
  fix(identity): stop the Buzz ID card crediting a photo that isn't there (#3924)
  fix(emoji): stop emoji-mart re-rendering after the picker is disposed (#3917)
  test(search): drive the scoped alias match test with fake timers (#3918)
  test(browser): wait for panel motion to finish before clicking (#3919)
  fix(search): show a handle, not a key prefix, under names in the people picker (#3915)
  fix(search): title ⌘K plugin and setting rows with their name, not their category (#3798)
  fix(plugins): resolve built-in feature owners, naming the Emoji shortcut group (#3701)
  test(browser): keep the held preferences decode alive in navigation-scroll-intent (#3920)
  ...

Signed-off-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
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