Skip to content

chore: remove dead Supabase middleware - #248

Draft
lie75922-cpu wants to merge 1 commit into
seketman:mainfrom
lie75922-cpu:agent/remove-dead-supabase-middleware
Draft

chore: remove dead Supabase middleware#248
lie75922-cpu wants to merge 1 commit into
seketman:mainfrom
lie75922-cpu:agent/remove-dead-supabase-middleware

Conversation

@lie75922-cpu

Copy link
Copy Markdown

What changes

Deletes src/lib/supabase/middleware.ts, which exports an unused duplicate of the live session refresh logic in src/proxy.ts.

Why

The dead helper can be mistaken for the active Next.js middleware even though no source file imports it. Removing it leaves src/proxy.ts as the single implementation.

Closes #206

Test plan

  • Confirmed rg "supabase/middleware|updateSession" src returns no source references after deletion
  • git diff --check
  • npm run lint
  • npx tsc --noEmit
  • npm test

Notes for the reviewer

The full dependency-based checks could not be run locally because two npm ci attempts reached the 20-minute download limit while waiting on the package registry. CI should run the remaining checks.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

@lie75922-cpu is attempting to deploy a commit to the Diego Demarziani's projects Team on Vercel.

A member of the Team first needs to authorize it.

@seketman

Copy link
Copy Markdown
Owner

Thanks for this, and for being explicit about what you could not verify. That is the right call, and the draft status made it obvious where things stood.

CI is unblocked now and the test workflow passes. The Vercel check needs deploy authorization for fork PRs, so you can ignore that one, it is not on you.

One thing to fold in before marking this ready: docs/system-overview.md still references the file in four places, so deleting it leaves the docs pointing at something that no longer exists.

  • Lines 338-345: a proxy.ts code sample that imports and calls updateSession
  • Line 355: prose describing updateSession(request) and naming the file
  • Line 1353: src/lib/supabase/{server,client,middleware}.ts
  • Line 1354: lists the proxy as src/proxy.ts + src/lib/supabase/middleware.ts

Worth knowing, that code sample was already stale before your PR. The real src/proxy.ts composes next-intl routing and the Supabase session refresh inline, it never calls updateSession. So you have surfaced existing drift rather than caused it, and updating the sample to match the current proxy.ts would make this a strictly better change than the issue asked for.

Your rg check was scoped to src/, which is exactly what #206 specified. Widening it to the repo root is what turns this up.

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.

chore(cleanup): delete lib/supabase/middleware.ts (dead code)

2 participants