Skip to content

fix(lint): drop unused NativeChatMessage import and related nits - #20998

Open
buf0-bot[bot] wants to merge 1 commit into
mainfrom
fix-build
Open

buf0-bot[bot] wants to merge 1 commit into
mainfrom
fix-build

Conversation

@buf0-bot

@buf0-bot buf0-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

ELI5

Oxlint was failing on a handful of already-landed test/source files: an unused type import, map().flat() instead of flatMap(), a duplicate import, and a test that cleaned up the DOM by hand. This PR only tidies those so the lint gate is green. No product behavior changes.

What Changed

  • NativeChatMessageList.windowing.test.tsx: remove the unused NativeChatMessage type import and the redundant return annotations that named it (marker() already returns that type).
  • Mobile onboarding tests: replace map(...).flat() with flatMap(...).
  • AiVaultSessionSubagents.test.tsx: use Testing Library cleanup() in afterEach instead of document.body.replaceChildren().
  • agent-status-store-snapshot-budget.ts: merge the duplicate import type from agent-status-store-contract.

Why

eslint(no-unused-vars) failed on the unused NativeChatMessage import, and unicorn(prefer-array-flat-map) warned on the two onboarding tests. The other two edits are the same class of lint/test hygiene so the changed-code quality gate stays clean.

Linked Issue

N/A — lint failures on current main, no tracking issue.

Visual Proof

N/A — test and import-only changes; nothing a user sees or interacts with.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Existing tests cover the edited files; no new cases (behavior is unchanged).

  • oxlint --deny-warnings on the three originally failing files: 0 warnings / 0 errors
  • pnpm run check:code-quality:changed: passed
  • pnpm test src/renderer/src/components/native-chat/NativeChatMessageList.windowing.test.tsx: 26 passed

Did not re-run the mobile onboarding tests here (mobile/ has no node_modules in this worktree). Linux only.

AI Disclosure

Internal contributor — skip.

Review

Lint/test-only. No SSH, remote-wire, Windows, or agent-status behavior changes: the snapshot-budget edit is import grouping only; the windowing and sidebar tests still exercise the same paths. No UI. No security surface. Performance: flatMap is equivalent to map+flat.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • 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)

- Use flatMap instead of map+flat pattern in mobile tests
- Replace manual DOM cleanup with @testing-library/react cleanup()
- Remove unused type imports and redundant type annotations
- Reorganize imports in agent-status-store-snapshot-budget

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

Mechanical lint/test hygiene to clear oxlint failures on main; no product behavior changes. Each edit verified locally.

  • NativeChatMessageList.windowing.test.tsx — drops the unused NativeChatMessage type import plus the two redundant NativeChatMessage[] return annotations on the local appendedTranscript/transcriptAt helpers; inference from the harness's marker(): NativeChatMessage preserves the type. Suite passes (26 tests).
  • Mobile onboarding tests — .map(...).flat() → .flatMap(...); identical one-level flatten semantics.
  • AiVaultSessionSubagents.test.tsx — document.body.replaceChildren() → Testing Library cleanup() in afterEach. The repo runs vitest with globals: false, so RTL auto-cleanup is not registered; explicit cleanup() unmounts the rendered trees and matches sibling suites. Suite passes (18 tests).
  • agent-status-store-snapshot-budget.ts — merges a duplicate same-module import type into the existing value import via inline type specifiers; no semantic change.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

This branch has not been deployed

No deployments
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.

0 participants