fix(types): close 26 svelte-check errors via SubAgent type drift (#214 PR2)#226
Merged
Conversation
…PR2) Second of the cleanups proposed in #214 (Group A). Purely additive field updates — no behavior changes. Brings `npm run check` from 53 -> 27 errors (closes 26). ## What was wrong `SubAgentForm.svelte` reads and writes nine fields that the type contracts never exposed. The reads/writes are correct — the data round-trips through `settings.json`, the Rust `subagents` table (20 columns, all present in `subagents.rs` and `subagent_writer.rs`), and Tauri — but `$lib/types` and `markdownParser` had drifted, so the errors piled up silently. ## Changes - `subagent.ts` — add `disallowedTools`, `maxTurns`, `memory`, `background`, `effort`, `isolation`, `hooks`, `mcpServers`, `initialPrompt` to both `SubAgent` (read via `Partial<SubAgent>` as the form's `initialValues`) and `CreateSubAgentRequest` (the object the form's `handleSubmit` builds). Types match the Rust struct: string arrays, a numeric `maxTurns`, a boolean `background`, the rest strings. - `markdownParser.ts` — add the seven fields that `applyParsedSubAgent` assigns to `ParsedSubAgent` (`hooks`/`mcpServers` excluded — the paste/import path doesn't touch them). ## Maps to #214 groups Closes group **A** (SubAgent / ParsedSubAgent type drift, 26 errors). The remaining 27 errors fall into #214's groups B, D, E, H, K, M — targets for follow-up PRs. ## Test plan - [x] `npm run check` — 27 errors (down from 53 on `main`) - [x] `npx vitest run` — 1565/1565 tests pass - [x] Verified zero NEW errors (remaining 27 all pre-existing, map to #214's other groups) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tylergraydev
added a commit
that referenced
this pull request
May 16, 2026
Replaces all 5 `@stable` refs across build.yml, release.yml, and rust-tests.yml with a SHA pin to 29eef336d9b2848a0b548edc03f92a220660cdb8 (`@stable` head as of 2026-03-27). ## Why `@stable` is a floating ref — any regression dtolnay ships breaks every PR in flight at once, and we have no signal until a build fails. Pinning to SHA freezes our action surface so toolchain changes become explicit lockfile-style updates we choose to take. ## What this does NOT fix The recent macOS `cargo metadata` -> `rustup-init` flake hitting several open PRs (#226, #228, #231, #232, #234) is runner-side, not action-side: this SHA was already what `@stable` resolved to before and during the flake window. Reruns of failed jobs are passing on the same SHA, confirming it's transient runner state, not the action. So this PR is hygiene, not the fix for the current symptom. If the flake persists we'll need to either work around in the workflow (retry on the rust-toolchain step) or switch to `actions-rust-lang/setup-rust-toolchain`. ## Updating later When we want a newer toolchain or action behavior, bump the SHA and update the trailing comment. Dependabot can be configured to track github-actions and propose the bumps. Co-authored-by: Tyler Gray <tylerg@emergentsoftware.net> 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.
Second of the cleanups proposed in #214 (Group A). Purely additive field updates — no behavior changes. Brings
npm run checkfrom 53 → 27 errors (closes 26).What was wrong
SubAgentForm.sveltereads and writes nine fields that the type contracts never exposed. The reads/writes are correct — the data round-trips throughsettings.json, the Rustsubagentstable (20 columns, all present insubagents.rsandsubagent_writer.rs), and Tauri — but$lib/typesandmarkdownParserhad drifted, so the errors piled up silently.Changes
subagent.tsdisallowedTools,maxTurns,memory,background,effort,isolation,hooks,mcpServers,initialPromptto bothSubAgent(read viaPartial<SubAgent>as the form'sinitialValues) andCreateSubAgentRequest(the objecthandleSubmitbuilds). Types match the Rust struct:string[]fordisallowedTools, numericmaxTurns, booleanbackground, the rest strings.markdownParser.tsapplyParsedSubAgentassigns toParsedSubAgent.hooks/mcpServersexcluded — the paste/import path doesn't touch them.Maps to #214 groups
Closes group A (SubAgent / ParsedSubAgent type drift, 26 errors).
The remaining 27 errors fall into #214's groups B (containers, 10), D (lucide icon types, 7), E (keybindings
"Input"context, 6), H (sessions store rename, 2), K (Tauri InvokeArgs mock, 1), M (subagentsselectedProject, 1) — targets for follow-up PRs.Test plan
npm run check— 27 errors (down from 53 onmain)npx vitest run— 1565/1565 tests pass🤖 Generated with Claude Code