Skip to content

fix(test): add missing kind to background task fixture (#285)#309

Closed
fancyboi999 wants to merge 1 commit into
MoonshotAI:mainfrom
fancyboi999:fix/285-background-task-info-kind
Closed

fix(test): add missing kind to background task fixture (#285)#309
fancyboi999 wants to merge 1 commit into
MoonshotAI:mainfrom
fancyboi999:fix/285-background-task-info-kind

Conversation

@fancyboi999
Copy link
Copy Markdown

Related Issue

Related to #285.

Problem

#285 added a required kind discriminant to BackgroundTaskInfo (ProcessBackgroundTaskInfo.kind: 'process', AgentBackgroundTaskInfo.kind: 'agent') and updated most fixtures, but the process-task fixture in apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts was missed. As a result pnpm typecheck fails on main:

test/tui/kimi-tui-message-flow.test.ts(771,7): error TS2352: ...
  Property 'kind' is missing in type '{ taskId: ...; }' but required in type 'ProcessBackgroundTaskInfo'.

(The cast is type-only, so vitest still passes — only tsc catches it.)

What changed

Add kind: 'process' to the background.task.started fixture so it matches the new ProcessBackgroundTaskInfo shape. One-line, test-only.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. (test-only fix; existing test now typechecks)
  • Ran gen-changesets skill, or this PR needs no changeset. (test-only, no changeset needed)
  • Ran gen-docs skill, or this PR needs no doc update.

Validation

  • corepack pnpm run typecheck — now passes (was failing on main).
  • corepack pnpm exec vitest run apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts — 68 passed.

…est (MoonshotAI#285)

MoonshotAI#285 added a required `kind` discriminant to BackgroundTaskInfo but left
the process-task fixture in kimi-tui-message-flow.test.ts without it, so
`pnpm typecheck` fails on main. Add `kind: 'process'` to the fixture.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

⚠️ No Changeset found

Latest commit: 4f9b776

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@fancyboi999
Copy link
Copy Markdown
Author

Closing as redundant — this was already fixed by #307 ("fix: restore main typecheck"), which landed the same kind: 'process' fix on the same fixture and is now on main. I opened this before noticing #307; thanks to whoever fixed it. I'll rebase #305 onto latest main so it picks up #307 and typechecks cleanly.

@fancyboi999 fancyboi999 closed this Jun 2, 2026
@fancyboi999 fancyboi999 deleted the fix/285-background-task-info-kind branch June 2, 2026 05:40
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