Skip to content

Clean up Knip dead-code baseline#2

Merged
zebbern merged 1 commit into
mainfrom
codex/knip-dead-code-cleanup
Jun 20, 2026
Merged

Clean up Knip dead-code baseline#2
zebbern merged 1 commit into
mainfrom
codex/knip-dead-code-cleanup

Conversation

@zebbern

@zebbern zebbern commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • configure Knip to understand frontend workspace tests instead of ignoring all test files
  • remove unused auth permissions hook plus stale debug/helper scripts
  • add explicit package-script entry points for E2E setup and version syncing

Test Plan

  • DATABASE_URL=postgresql://sentris:sentris@localhost:5432/sentris bunx knip --reporter compact
  • bun run typecheck
  • bun run lint
  • bun run test

Signed-off-by: zebbern <185730623+zebbern@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 20, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR cleans up the Knip dead-code baseline by making Knip aware of workspace test entry points (instead of globally ignoring tests), and by removing unused frontend auth code plus stale one-off debug/helper scripts. It also adds explicit package scripts so E2E setup and version syncing are runnable via stable bun run <script> entry points.

Changes:

  • Updated knip.json to include frontend (and other workspace) test files/entry points and removed blanket test-file ignores.
  • Removed unused usePermissions hook + its tests, and deleted several stale debug/helper scripts.
  • Added test:e2e:setup and release:sync-versions scripts, and updated docs / local E2E helper to use them.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/view-debug-logs.ts Deleted stale debug log viewing helper.
scripts/test-loki-range.ts Deleted one-off Loki range test helper.
scripts/e2e-local-test.sh Switched env setup call to the new test:e2e:setup package script.
scripts/discover-aws-mcp-tools.ts Deleted stale AWS MCP discovery helper script.
scripts/capture-run-stream.ts Deleted stale SSE stream capture helper script.
package.json Added test:e2e:setup and release:sync-versions script entry points.
knip.json Included workspace test files/entry points; removed blanket test ignore patterns; added frontend workspace config.
frontend/src/components/auth/usePermissions.ts Removed unused permissions hook.
frontend/src/components/auth/tests/usePermissions.test.tsx Removed tests for deleted usePermissions hook.
docs/development/release-process.mdx Updated release docs to use bun run release:sync-versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/e2e-local-test.sh
Comment on lines 28 to 30
echo "Setting up environment..."
bun run e2e-tests/scripts/setup-e2e-env.ts || {
bun run test:e2e:setup || {
echo "❌ Setup cancelled"
@zebbern zebbern merged commit e16e6dd into main Jun 20, 2026
6 checks passed
@zebbern zebbern deleted the codex/knip-dead-code-cleanup branch June 20, 2026 13:07
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.

2 participants