chore: fix all code review comments#2021
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2774f84e4e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ]; | ||
| } | ||
| if (status === ProposalStatus.QUEUED) { | ||
| return [ProposalStatus.QUEUED, ProposalStatus.ACTIVE]; |
There was a problem hiding this comment.
Include PENDING for derived queued statuses
TORN proposals created before their voting window are persisted as PENDING, and TORNClient.getProposalStatus later derives QUEUED/PENDING_EXECUTION from that same row. With this prefilter, status=QUEUED only fetches QUEUED/ACTIVE rows, so those delayed TORN proposals are never hydrated and disappear from queued-status feeds; include PENDING here and in the PENDING_EXECUTION branch.
Useful? React with 👍 / 👎.
| address && | ||
| ownedDraft.author.toLowerCase() === address.toLowerCase(), | ||
| // Legacy localStorage drafts predate the `author` field and may lack it. | ||
| ownedDraft.author?.toLowerCase() === address.toLowerCase(), |
There was a problem hiding this comment.
Preserve ownership for legacy local drafts
When the API migration/fetch fails, useDrafts falls back to legacy localStorage drafts that may not have author; those drafts still came from the connected wallet's per-address key. This optional check makes ownsDraft false for them, so after loading isRecipient becomes true and canShowEditor false, forcing the owner into the read-only shared preview for their own legacy draft instead of preserving edit access.
Useful? React with 👍 / 👎.
| // Fail closed: without a configured token service, every DAO/relayer route | ||
| // would be public. Refuse to start unless auth is explicitly opted out via | ||
| // GATEFUL_AUTH_DISABLED (local dev only). | ||
| if (!config.tokenService && !config.authDisabled) { |
There was a problem hiding this comment.
Wire the local auth opt-out before failing closed
In the documented local path, scripts/dev.sh starts Gateful with pnpm gateful dev and does not launch Authful or export either TOKEN_SERVICE_URL or GATEFUL_AUTH_DISABLED. This throw therefore runs during module import before Gateful binds :4001, so pnpm dev/local Gateful startup times out unless every developer has an undocumented env override; set the local-dev opt-out in the startup path or gate this only for deployed environments.
Useful? React with 👍 / 👎.
No description provided.