Skip to content

chore(deps): drop dependencies that only had one easy caller - #1746

Merged
Makisuo merged 2 commits into
mainfrom
chore/drop-easy-deps
Oct 23, 2026
Merged

Makisuo merged 2 commits into
mainfrom
chore/drop-easy-deps

Conversation

@Makisuo

@Makisuo Makisuo commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Drops seven dependencies (and one dead workspace package) that each had a single, easily replaced caller. knip was already clean; these were all still imported somewhere.

Removed Was used by Now
lib/effect-router (+ @tanstack/react-router) nothing: no package depends on it or imports it deleted
expect-type 2 .test-d.ts files in query-engine expectTypeOf from vitest (same package, re-exported)
postgres 3 packages/db scripts @effect/sql-pg, like migrate.ts and check-row-decoding.ts
motion landing trace waterfall Web Animations API
ogl /compare hero WebGL grain canvas removed; the cells keep the flat tint + halftone they already painted underneath
ai, @ai-sdk/anthropic one web e2e test (agent.assert that the alert preview draws both tier lines) test, model config and the preview job's ANTHROPIC_API_KEY step removed; the other e2e tests use locators

@effect/atom-react leaves the effect catalog: its last user is examples/effect-todo, which knip ignores, so the catalog entry read as unused. The example pins it directly, as packages/db already does for @effect/sql-pg.

Notes

  • Dashboard v2 -> v3 backfill deleted (backfill-dashboard-datasource-v3.ts + test, db:backfill:dashboards-v3). It was a one-shot from 2026-08-14, and the deployed code decodes v3 only, so it has already run. Porting 500 lines nobody will run again was not worth it.
  • restore-test.ts keeps its failure mode: a dead connection still turns into failed checks with the report written, not a crash.
  • Waterfall: WAAPI animations hold their end values with fill: "both", so each cycle cancels the previous cycle's animations before re-arming.

Verification

  • audit-raw-sql.ts against a freshly migrated local Postgres seeded with a raw-SQL alert rule and dashboard widget: both findings reported, jsonb read back parsed, exit 1, clean shutdown.
  • restore-test.ts verify() (temporary harness) against the same DB: queries return counts, the to_regclass parameter and the escaped table identifier work. Against a dead port, every check fails with Failed to connect and the report still builds.
  • Landing astro build passes. In a real browser on the built site, /local waterfall sampled over 12s runs two full cycles (bars reset to 0, grow in sequence, slowest-span pause, reset) with a flat animation count and no console errors. /compare/axiom renders both cells with tint + halftone and no canvas.
  • e2e list selects the three alert-rule tests plus auth setup, and apps/web/e2e typechecks with ai and @ai-sdk/anthropic absent from node_modules.
  • tsrs typecheck for packages/db, packages/query-engine, examples/effect-todo; knip clean; oxlint + oxfmt --check on changed files; bun install --frozen-lockfile consistent.

Found while testing, not changed here: restore-test's "migrations journal restored" check reads drizzle.__drizzle_migrations. A database migrated with effect-orm has no drizzle schema (it records history in public._effect_orm_migrations), so this check fails on any fresh database. It is worth confirming what the PlanetScale restore branch actually holds.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Changes

    • Comparison panels on the landing page now use flat tints and halftone dithering instead of animated grainy gradients.
    • The Effect Router integration is no longer available.
    • The dashboard v3 backfill command has been removed.
  • Maintenance

    • Database audit and restore checks continue to run using the project’s Effect-based PostgreSQL client.

- Delete lib/effect-router: no package depends on it or imports it. Takes
  @tanstack/react-router with it; @effect/atom-react moves from the catalog
  to a direct pin in examples/effect-todo, its last user.
- expect-type: import expectTypeOf from vitest, which re-exports the same
  package.
- postgres: audit-raw-sql and restore-test run on @effect/sql-pg like the
  other db scripts. A failed connect still reports every restore check as
  failed instead of crashing. The v2 -> v3 dashboard backfill is deleted: it
  was a one-shot and the deployed code already decodes v3 only.
- motion: the landing trace waterfall animates with the Web Animations API.
- ogl: the /compare hero drops its WebGL grain canvas; each cell keeps the
  flat tint and halftone it already painted underneath.
@maple-review-bot

maple-review-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Maple review

🟡 Confidence 6/10 · needs attention
Held at 6 because 12 reviewed files were not read.
no findings · tests partial −1 · risk low · 12 files not read

Removes five dependencies plus the unused lib/effect-router package, replacing each caller with an in-repo equivalent. No dangling imports or catalog references remain at the head. The 12 files I did not diff individually (Grainient.tsx, PairGrainient.tsx, all of lib/effect-router/, the deleted backfill test) are pure deletions; repo-wide greps at the head show nothing still imports them.

  • startWaterfall drives bars and cursor with element.animate() instead of Motion
  • /compare and hub hero cells lose the WebGL grain canvas and keep the CSS tint + halftone
  • audit-raw-sql.ts and restore-test.ts query through @effect/sql-pg instead of postgres
  • .test-d.ts files import expectTypeOf from vitest; the v2→v3 dashboard backfill script is deleted
What was checked
  • Repo-wide grep at head: no motion, ogl, Grainient, effect-router, expect-type or from "postgres" imports left
  • cancel() rejections are handled — bars .catch(), Promise.all(...).catch (live-waterfall.client.ts:136)
  • prepare: false is an accepted PgClient.layer option, already used at scripts/check-row-decoding.ts:135
Files not reviewed (12)

The review ended before it read these diffs, so nothing above vouches for them.

  • apps/landing/src/components/compare/Grainient.tsx
  • apps/landing/src/components/compare/PairGrainient.tsx
  • lib/effect-router/package.json
  • lib/effect-router/src/atoms.ts
  • lib/effect-router/src/file-route.ts
  • lib/effect-router/src/index.ts
  • lib/effect-router/src/provider.tsx
  • lib/effect-router/src/react.ts
  • lib/effect-router/src/route.ts
  • lib/effect-router/src/router.ts
  • lib/effect-router/tsconfig.json
  • packages/db/scripts/backfill-dashboard-datasource-v3.test.ts

708cd3e · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a29c7b8b-c34e-4664-8743-75e08e4af24e
📥 Commits

Reviewing files that changed from the base of the PR and between 708cd3e and aa52c73.

⛔ Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing: 6
  • .github/workflows/deploy-pr-preview.yml
  • apps/web/e2e/.gitignore
  • apps/web/e2e/README.md
  • apps/web/e2e/e2e.config.ts
  • apps/web/e2e/tests/alert-rules.e2e.ts
  • apps/web/package.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe627588-642f-4116-b683-9923404f9d8c
📥 Commits

Reviewing files that changed from the base of the PR and between ffad0b6 and 708cd3e.

⛔ Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing: 29
  • .changeset/config.json
  • apps/landing/package.json
  • apps/landing/src/components/compare/ComparePair.astro
  • apps/landing/src/components/compare/Grainient.tsx
  • apps/landing/src/components/compare/HubPair.astro
  • apps/landing/src/components/compare/PairGrainient.tsx
  • apps/landing/src/components/live/live-waterfall.client.ts
  • apps/landing/src/styles/global.css
  • apps/web/src/page/preload.ts
  • examples/effect-todo/package.json
  • lib/effect-router/package.json
  • lib/effect-router/src/atoms.ts
  • lib/effect-router/src/file-route.ts
  • lib/effect-router/src/index.ts
  • lib/effect-router/src/provider.tsx
  • lib/effect-router/src/react.ts
  • lib/effect-router/src/route.ts
  • lib/effect-router/src/router.ts
  • lib/effect-router/tsconfig.json
  • package.json
  • packages/backend/src/services/dashboards/DashboardPersistenceService.test.ts
  • packages/db/package.json
  • packages/db/scripts/audit-raw-sql.ts
  • packages/db/scripts/backfill-dashboard-datasource-v3.test.ts
  • packages/db/scripts/backfill-dashboard-datasource-v3.ts
  • packages/db/scripts/restore-test.ts
  • packages/query-engine/package.json
  • packages/query-engine/src/ch/endpoint-types.test-d.ts
  • packages/query-engine/src/query-builder/model.test-d.ts
💤 Files with no reviewable changes: 18
  • package.json
  • packages/db/scripts/backfill-dashboard-datasource-v3.test.ts
  • lib/effect-router/src/react.ts
  • apps/landing/src/styles/global.css
  • lib/effect-router/package.json
  • apps/landing/package.json
  • lib/effect-router/src/index.ts
  • packages/query-engine/package.json
  • lib/effect-router/tsconfig.json
  • packages/db/scripts/backfill-dashboard-datasource-v3.ts
  • lib/effect-router/src/route.ts
  • apps/landing/src/components/compare/Grainient.tsx
  • lib/effect-router/src/atoms.ts
  • lib/effect-router/src/provider.tsx
  • apps/landing/src/components/compare/HubPair.astro
  • lib/effect-router/src/router.ts
  • apps/landing/src/components/compare/PairGrainient.tsx
  • lib/effect-router/src/file-route.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The changes remove the Effect Router package and comparison-gradient components, replace Motion-based waterfall animations with the Web Animations API, and update database scripts to use Effect's PostgreSQL client. They also remove a dashboard backfill script and update package references and query-engine type-test imports.

Changes: Landing animation changes

Layer / File(s) Summary
Remove comparison gradients
apps/landing/src/components/compare/*, apps/landing/src/components/compare/Grainient.tsx, apps/landing/src/components/compare/PairGrainient.tsx, apps/landing/package.json, apps/landing/src/styles/global.css
The comparison components no longer render grainy gradients. The gradient components, related dependencies, and canvas styling rule are removed.
Use browser animations for the waterfall
apps/landing/src/components/live/live-waterfall.client.ts
Bars and the cursor animate with HTMLElement.animate(). In-flight animations use browser Animation objects.

Effect Router removal

Layer / File(s) Summary
Remove the Effect Router package and APIs
lib/effect-router/*
The package manifest, router implementation, route and atom helpers, React provider, exports, and TypeScript configuration are deleted.
Update package references
.changeset/config.json, package.json, examples/effect-todo/package.json, apps/web/src/page/preload.ts
The Changesets ignore list and root dependency catalog are updated. The example specifies @effect/atom-react version 4.0.5. Preload comments and formatting are updated.

Database script changes

Layer / File(s) Summary
Remove the dashboard v3 backfill script
packages/db/scripts/backfill-dashboard-datasource-v3.ts, packages/db/scripts/backfill-dashboard-datasource-v3.test.ts, packages/db/package.json, packages/backend/src/services/dashboards/DashboardPersistenceService.test.ts
The backfill script and tests are deleted. Its package script and postgres dependency are removed. A test comment now describes the one-shot backfill output.
Use Effect PostgreSQL in database scripts
packages/db/scripts/audit-raw-sql.ts, packages/db/scripts/restore-test.ts
Both scripts run their existing queries through an Effect managed runtime and dispose of the runtime during cleanup.

Query-engine type tests

Layer / File(s) Summary
Update type-test helper imports
packages/query-engine/package.json, packages/query-engine/src/ch/endpoint-types.test-d.ts, packages/query-engine/src/query-builder/model.test-d.ts
The expect-type development dependency is removed. Both type-test files import expectTypeOf from Vitest.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Possibly related PRs

  • MapleTechLabs/maple#1697: Updates Effect packages to 4.0.5, including the Effect catalog and @effect/sql-pg versions used by changes in this pull request.
Merge Risk: ⚪ Minimal · up to 708cd

The reviewed changes are mergeable after normal checks; no concrete regression remains identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 7 files. (4 skipped: 4 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the primary dependency cleanup, including removal of unused dependencies and the unused workspace package.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 7 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

They existed only so the web e2e suite could run a model-backed
`agent.assert` that checks the alert preview chart draws both tier lines.
Drop that test, the model config, and the preview job step that loaded
its API key. The remaining e2e tests assert with locators and `expect`.
@maple-review-bot

maple-review-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 10/10 · safe to merge
The post-review delta only deletes unreferenced packages and the ungated agent test; greps confirm nothing at head still imports or configures them.
no findings · tests not needed · risk medium

Drops five dependencies, the unused lib/effect-router package and the backfill script, and the follow-up commit removes ai/@ai-sdk/anthropic along with the only agent.assert e2e step. Safe to merge.

  • apps/web no longer depends on ai or @ai-sdk/anthropic
  • The preview workflow stops loading ANTHROPIC_API_KEY for the e2e job
What was checked
  • No ai or @ai-sdk/* import remains outside landing docs at head, and no agents: config or agent.* step has a caller
  • apps/web/e2e tracks no file under .e2e/, so dropping the !.e2e/cache/ exception loses no recordings
  • Nothing at head references db:backfill:dashboards-v3 or lib/effect-router

aa52c73 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@Makisuo
Makisuo merged commit b4fedf1 into main Oct 23, 2026
34 checks passed
@Makisuo
Makisuo deleted the chore/drop-easy-deps branch October 23, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant