fix: clear the two warnings CI actually owns - #64
Merged
Conversation
Every `cargo clippy` run printed "failed to parse serde attribute".
`McpParameter::options` uses `deserialize_with` (see `mcp::model::de_options`)
to accept a YAML mapping as well as a list, and ts-rs has no concept of that
attribute, so it warns and skips it.
Skipping is the right thing: the field always SERIALIZES back as a plain list,
so the emitted `Array<McpOption>` is correct. The warning reported a decision
that was already right, on every run.
Nothing is lost by silencing it. The generated bindings are committed and CI
diffs them ("Fail on stale generated artifacts"), so if ts-rs ever emits a
different shape for this field the build fails with an error rather than a
warning nobody reads. Verified the bindings are byte-identical with the feature
on.
`pnpm lint` reported one warning for as long as this file has existed: `react-refresh/only-export-components`, because `spansToKeyedParts` was exported from a file that also exports a component. The export was not gratuitous. Renderer tests here are node-only -- no jsdom, no testing-library -- so a component cannot be unit tested, and the keying rule (position-based, so two identical link spans stay distinct) has to live where a test can reach it. The fix is to put it in its own module rather than to stop testing it, which is the same split `features/skillInstall/lib/installSelection.ts` already uses. `DescriptionSpan` moves with it: the type is data the function transforms, not part of the component's API, and the folder barrel now sources it from its owner. Other layers were already importing their own `DescriptionSpan` from `@/services/bridge`, so nothing outside this folder changes. `pnpm lint` now reports nothing at all.
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.
Removes the two warnings in CI that come from this repository's own code. Enumerated from the real logs of a
developrun rather than from memory, then traced to a cause each.What CI was warning about
Six distinct classes. Two are ours.
react-refresh/only-export-componentsinDescriptionText.tsxfailed to parse serde attribute(ts-rs)hint: to use in all of your new repositories...(gitinit.defaultBranch)actions/checkout's internalgit init[DEP0040] punycode is deprecatedactions/setup-nodeon Node 24[DEP0169] url.parse() is not standardizedactions/setup-nodeon Node 24This project is configured to use pnpm because...actions/setup-node's own messageThe four third-party ones were checked, not assumed:
git initwithoutinit.defaultBranchreproduces that hint locally, and the log places it inside the Checkout step of two separate jobs -- this repository's e2e sandbox never runsgit initat all. Neithercorepack enablenorpnpm install --frozen-lockfileemits either deprecation locally on Node 24.14, and both appear in CI before any of our commands run.react-refresh/only-export-componentsspansToKeyedPartswas exported from a file that also exports a component, which breaks fast refresh.The export was not gratuitous. Renderer tests here are node-only -- no jsdom, no testing-library -- so a component cannot be unit tested, and the keying rule (position-based, so two identical link spans keep distinct keys) has to live somewhere a test can reach. So the fix is a sibling module, not an
eslint-disableand not dropping the test. Same splitfeatures/skillInstall/lib/installSelection.tsalready uses, for the same reason.DescriptionSpanmoves with it -- the type is data the function transforms, not part of the component's API. Every other layer was already importing its ownDescriptionSpanfrom@/services/bridge, so nothing outside this folder changes.pnpm lintnow prints nothing at all.failed to parse serde attributeMcpParameter::optionsusesdeserialize_withto accept a YAML mapping as well as a list.deserialize_withappears nowhere in ts-rs's source, so it always lands in the unknown-attribute branch: ts-rs warns, then skips it. Skipping is correct -- the field always serializes back as a plain list, so the emittedArray<McpOption>is right. The warning reported a decision that was already correct, on every clippy run.The only switch is the
no-serde-warningsfeature, which silences the whole class. That would normally be a bad trade -- it also hides a futureserialize_withthat genuinely changes the wire shape and would make the TS type silently wrong.Here it costs nothing, because that signal is already covered by something stronger: the generated bindings are committed, and CI's "Fail on stale generated artifacts" step diffs them. If ts-rs ever emits a different shape for this field, the build fails with an error instead of printing a warning nobody reads. Verified the bindings are byte-identical with the feature enabled.
Verified
pnpm lint(silent),pnpm typecheck,pnpm exec vitest run apps/desktop(619/619),pnpm format:check,cargo clippy --workspace --all-targets(zero warning lines),cargo test --workspacewith generated artifacts unchanged, and the desktop suite 20/20 --DescriptionTextis on the MCP install path, whose flow asserts descriptions render as spans rather than raw markup.