feat(#17): project-scoped pages and dashboard event access - #34
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17.
/dashboardand/keysread the current project from a?projectIdquery param that nothing ever set — the gap noted at the end of #33 — so both were stuck on their empty state. They now take it from the session viagetCurrentProjectID(), and so does the key-create action: a key can no longer be minted for whatever project a stale tab named in a hidden form field. The rest of the issue (theX-User-Loginclient, per-method project ids, the'default'hardcode,/settingsas a redirect) had already landed with #32/#33.That left
/events, which the issue scoped out. It read through the SDK, whose key belongs to one fixed project, so it showed that project's events to every dashboard user regardless of the switcher — and wrote new ones into it. Closing that meant giving the dashboard a way in that isn't an API key:RPCServer.GetLog, one entry by id within a project.models.GetLogwas already project-scoped; nothing exposed it over RPC./projects/{id}/logsroutes: list, submit, get one, delete one. The project comes from the path and never from the body, and an id belonging to another project is a 404, not someone else's event. Pagination parsing is now shared with the publicGET /logs.getLogs/getLog/createLog/deleteLogon the API client, decoding responses with the SDK's ownLogwolfEventSchemaso pages keep receivingLogwolfEventDataand no component changed.lib/logwolf.tsstays for what it actually is: the dashboard's own error tracking.Also fixes
/keyscrashing on a project with no keys yet.ListAPIKeysByProjectreturns a nil slice, which reaches the browser as"data": null, and the page iterated it — invisible until the loader started actually fetching.getKeysnow falls back to[], asgetMembersalready did.Docs updated across
CLAUDE.mdand the broker, logger and frontend overviews. The frontend route table's/events/createis corrected to/events/new, which is whatroutes.tsregisters.Verification
go build,go vetandgo test(broker + toolbox) pass; frontendtypecheck,lint(0 errors) andbuildpass.Not verified against the real stack — that needs Docker plus a GitHub OAuth login. The cross-project isolation assertions that would prove it end to end belong to #19.
🤖 Generated with Claude Code