Skip to content

fix: polish — auth bypass, port mismatch, unread indicator - #59

Merged
aterrylu merged 1 commit into
mainfrom
terry/polish-fixes
Mar 24, 2026
Merged

fix: polish — auth bypass, port mismatch, unread indicator#59
aterrylu merged 1 commit into
mainfrom
terry/polish-fixes

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Summary

Retroactive /polish review of PRs #54-58. Fixes a security issue, a silent bug, and UX improvements.

Security

  • Auth bypass restricted to POST only — GET endpoints on /api/hooks were unauthenticated, leaking session data. Now only POST /api/hooks/:id (the curl relay from PTY) bypasses auth.

Bug fix

  • Port mismatchbuildEnv() defaulted to port 3100 but the server defaults to 3000. Hook relay was silently posting to the wrong port. Fixed to 3000.

UX

  • Unread indicator: 3 · 2m (count in red + time) replaces the confusing blue dot
  • markNotificationsRead: only clears badge on server success (prevents flickering)

Cleanup

  • Remove dead "use client" directive (Vite, not Next.js)

🤖 Generated with Claude Code

From /polish review of PRs #54-58:

Security:
- Auth bypass restricted to POST only on /api/hooks/:id
  (GET endpoints for status/notifications remain behind auth)

Bug fix:
- Port default in buildEnv() changed from 3100 to 3000 to match
  server default — hooks were silently posting to wrong port

UX:
- Unread indicator: "3 · 2m" (count in red + time) instead of
  confusing blue dot that looked like UI noise
- markNotificationsRead only clears badge on server success
  (prevents flickering badge when server is down)

Cleanup:
- Remove "use client" directive (Vite project, not Next.js)
- Biome format fixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aterrylu
aterrylu merged commit 9ab22e2 into main Mar 24, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/polish-fixes branch March 24, 2026 09:34
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