chore(tooling): add Knip configuration to detect unused files and dependencies - #646
chore(tooling): add Knip configuration to detect unused files and dependencies#646sundaram2021 wants to merge 2 commits into
Conversation
|
@sundaram2021 is attempting to deploy a commit to the Databuddy OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe pull request is substantially broader than its tooling-focused title: it adds Knip configuration while also introducing audit logging and audit-log UI, feature-flag activity telemetry, realtime-map changes, and revenue dashboard refinements.
Confidence Score: 4/5The pull request appears safe to merge after the non-blocking revenue UI radius inconsistency is corrected. The investigated audit, authorization, telemetry, and query-state paths did not yield a concrete blocking failure; the accepted issue is limited to changed revenue components violating the repository's UI-radius convention. Files Needing Attention: apps/dashboard/app/(main)/websites/[id]/revenue/_components/revenue-settings-sheet.tsx, apps/dashboard/app/(main)/websites/[id]/revenue/_components/revenue-content.tsx Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser as Customer Browser
participant SDK as Flags SDK
participant Tracker as Analytics Tracker
participant API as API / RPC
participant Store as Analytics Store
participant Dashboard as Flags Dashboard
Browser->>SDK: Evaluate feature flag
SDK->>Tracker: Emit deduplicated $flag_evaluated
Tracker->>Store: Persist evaluation event
Dashboard->>API: Request flag activity statistics
API->>Store: Aggregate recent evaluations by flag
Store-->>API: Counts and latest evaluation
API-->>Dashboard: Activity statistics
Reviews (1): Last reviewed commit: "chore(tooling): add Knip configuration t..." | Re-trigger Greptile |
c6ee239 to
7b5cb95
Compare
Description
Adds a workspace-aware Knip configuration (
knip.json) so unused files, dependencies, exports, and catalog entries can be detected across all 11 apps and 23 packages. Knip was already pinned in rootdevDependenciesbut had no config or script, making it unusable.fixes #645
What's included:
knip.json— per-workspace entry points matching repo conventions:test:watchscript shadows Knip's Bun plugin per-workspace parsing)apps/docs(source.config.ts,content/**/*.mdx)packages/nuxt(resolved via string paths)sdk,devtools,nuxt,tracker)ignoreBinariesfor shell utilities insetup.tsand the mp4 output path inapps/videoapps/cron/**ignored (standalone ops scripts, not a real workspace)"knip": "knip"so it runs viabun run knip"module": "index.ts"field (pointed at a nonexistent file)First run surfaces real findings (111 unused files, 58 unused deps, 355 unused exports, 24 unused catalog entries) to be cleaned up or baselined in follow-ups. It also exposed a pre-existing broken export in
packages/email(./config→ missingconfig.ts).Slice
knip.json, rootpackage.json) + agent skill doc noteChecklist
stagingand does not include another unmerged PR unless it is named above.staging; after it closes, this branch will not be reused for another change.Summary by cubic
Adds workspace-aware
knipconfiguration and a root script to detect unused files, dependencies, and exports across all apps and packages. Previouslyknipwas installed but unusable; now run it viabun run knip. Also removes the bogus root "module" field and adds a brief usage note to the internal SKILL guide. Satisfies #645.knip.jsonwith per-workspace entries, targeted ignores (e.g., apps/cron/**, apps/video mp4 output), and scopedignoreDependenciesforapps/dashboard(topojson-specification) andpackages/ui(tailwindcss,tw-animate-css)."knip": "knip"to the rootpackage.json.Review
bun run knipand confirm the schema loads and workspaces resolve."module"field has no build/runtime impact.Rollout
bun run knip.Written for commit 45bb275. Summary will update on new commits.