fix(types): close 3 svelte-check errors — sessions prop + invoke mock (#214 PR4)#227
Merged
Merged
Conversation
…#214 PR4) Part of the #214 cleanup. Brings `npm run check` from 50 -> 47 errors (closes 3). Scoped to the two genuinely mechanical fixes from #214's proposed PR4 — groups E and M turned out to need real investigation, see below. ## Changes - **Group H** — `routes/sessions/+page.svelte` passed `sessionSummary={sessionStore.selectedSessionSummary}` to `SessionDetailPanel`. Neither side exists anymore: `SessionStoreState` has no `selectedSessionSummary`, and `SessionDetailPanel`'s `Props` is `{ detail, onClose }`. The prop was already dead — removed the line. - **Group K** — `tests/helpers/invokeMock.ts` typed the `invoke` mock implementation's `args` as `Record<string, unknown>`. Tauri's `invoke` signature is `(cmd, args?: InvokeArgs, ...)` and `InvokeArgs` is wider (e.g. `number[]`), so the narrower callback param made the mock unassignable. Widened to `InvokeArgs` and cast at the boundary where it's handed to the ergonomic `handler` callback. ## Deferred from #214's PR4 grouping - **Group E** (keybindings `"Input"` context, 6 errors) — not a fixture cleanup. The tests pass at runtime (31/31) but reference `'Input'`, which is in neither `KEYBINDING_CONTEXTS` nor `KEYBINDING_ACTIONS`; they only pass via cross-test override state. Adding `'Input'` to the `KeybindingContext` union would be a phantom-value behavior change; rewriting the tests needs care around their state dependencies. - **Group M** (`AgentMemoryPanel` `selectedProject`, 1 error) — a latent runtime bug, not drift. `projectsStore` has no project-selection concept at all, so `projectsStore.selectedProject?.path ?? null` is always `null` — the panel's project-scope memory silently never gets a path. Needs a data-flow decision (prop vs. route param). ## Test plan - [x] `npm run check` — 50 errors (down from 53 on `main`) - [x] `npx vitest run` (sessionStore + helpers consumers) — pass - [x] Zero new errors Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tylergraydev
added a commit
that referenced
this pull request
May 16, 2026
Rebased onto current main. The original commit also included fixes for preexisting type errors across usageStore/skill/invokeMock/etc., but main has since landed canonical fixes for all of them (#221, #226, #227, #236), so those parts of the original commit are dropped. Net change: WSL2-specific Rust code (utils/wsl.rs, services/wsl_config.rs) plus the settings/config plumbing to expose WSL editors in the UI. See PR #149 for full description.
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the #214 cleanup. Brings
npm run checkfrom 53 → 50 errors (closes 3). Scoped to the two genuinely mechanical fixes from #214's proposed PR4 — groups E and M turned out to need real investigation (see below).Changes
routes/sessions/+page.sveltesessionSummary={sessionStore.selectedSessionSummary}toSessionDetailPanel. Neither side exists anymore —SessionStoreStatehas noselectedSessionSummary, andSessionDetailPanel'sPropsis{ detail, onClose }. The prop was already dead; removed the line.tests/helpers/invokeMock.tsinvokemock implementation'sargsasRecord<string, unknown>. Tauri'sinvokeis(cmd, args?: InvokeArgs, …)andInvokeArgsis wider (e.g.number[]), so the narrower callback param made the mock unassignable. Widened toInvokeArgs, cast at the boundary where it's handed to the ergonomichandler.Deferred from #214's PR4 grouping
#214 grouped E + H + K + M as "test-fixture cleanup, low risk." H and K are — E and M aren't:
"Input"context, 6 errors) — the tests pass at runtime (31/31) but reference'Input', which is in neitherKEYBINDING_CONTEXTSnorKEYBINDING_ACTIONS; they only pass via cross-test override state leakage. Adding'Input'to theKeybindingContextunion would be a phantom-value behavior change; rewriting the tests needs care around those state dependencies. Worth its own PR.AgentMemoryPanelselectedProject, 1 error) — a latent runtime bug, not type drift.projectsStore(ProjectsState) has no project-selection concept at all, soprojectsStore.selectedProject?.path ?? nullalways evaluates tonull— the panel's project-scope agent memory silently never receives a path. Fixing it means deciding how the panel learns the current project (prop vs. route param) — a design call, not a fixture edit.Test plan
npm run check— 50 errors (down from 53 onmain)npx vitest run— sessionStore + invokeMock consumers pass🤖 Generated with Claude Code