Conversation
Contributor
|
Hi @samzong, DetailsInstructions for interacting with me using comments are available here. |
ce577b4 to
87d414c
Compare
Add knip as dead code detection tooling, integrated into `pnpm check` and PR CI pipeline. Remove 52 dead code items found by initial scan: - Delete unused file (useTheme.ts), function (removeDeviceToken), hooks (useTheme/useResolvedTheme), component (TabsContent), constant (EMPTY_ARTIFACTS), and types (ThemeMode, SurfaceKind, etc.) - Remove unnecessary `export` from 39 symbols only used file-internally - Strip dead re-exports from shadcn/ui barrel exports (dialog, scroll-area, tabs, button) Zero behavior change. All checks pass (lint, typecheck, 98 tests).
87d414c to
913df17
Compare
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.
Summary
Remove 52 dead code items identified by knip static analysis, then add three dev toolchain enhancements: automated dependency updates (Renovate), test coverage visibility (vitest v8), and contributor DX (VSCode workspace settings).
Type of change
[Refactor]internal cleanup[Build]CI, packaging, or tooling changeWhy is this needed?
ClawWork had zero dead code detection — unused exports, dead files, and orphaned types accumulated silently. As an open-source project with growing contributors, the codebase needs automated guardrails to prevent dead code from re-entering, dependency rot from going unnoticed, and test coverage from being invisible.
What changed?
Commit 1 — Dead code cleanup + knip:
useTheme.ts), 2 dead functions (removeDeviceToken,useTheme/useResolvedThemehooks), 1 dead component (TabsContent), 1 dead constant (EMPTY_ARTIFACTS), 8 dead typesexportfrom 39 symbols only used file-internallypnpm check:dead-codetopnpm checkgate and CI pipelineCommit 2 — Renovate + Coverage + VSCode:
renovate.json: weekly schedule, patch automerge, Electron major pinned, Radix UI grouped@vitest/coverage-v8to both shared and desktop, CI now runspnpm test:coverage.vscode/settings.jsonand.vscode/extensions.jsonwith Prettier, ESLint flat config, TS workspace SDK, Tailwind IntelliSenseArchitecture impact
docs/architecture-invariants.md: noneexportkeywords removed or dead code deleted; zero runtime behavior changeLinked issues
N/A
Validation
pnpm lintpnpm testpnpm check:ui-contractpnpm check(full gate: lint + architecture + ui-contract + renderer-copy + i18n + dead-code + format + typecheck + test)pnpm test:coverage(coverage reports generated successfully)Screenshots or recordings
N/A — no UI changes.
Release note
NONE.Checklist
[Refactor],[Build]