Skip to content

chore: fix all code review comments#2021

Merged
pikonha merged 1 commit into
devfrom
fix/torn-missing-queued-executed-events
Jul 2, 2026
Merged

chore: fix all code review comments#2021
pikonha merged 1 commit into
devfrom
fix/torn-missing-queued-executed-events

Conversation

@pikonha

@pikonha pikonha commented Jul 2, 2026

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
anticapture-storybook Ready Ready Preview, Comment Jul 2, 2026 6:50pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture Ignored Ignored Jul 2, 2026 6:50pm

Request Review

@railway-app railway-app Bot temporarily deployed to anticapture-infra / anticapture-pr-2021 July 2, 2026 18:51 Destroyed
@pikonha pikonha merged commit 9cd2031 into dev Jul 2, 2026
6 of 51 checks passed
@pikonha pikonha deleted the fix/torn-missing-queued-executed-events branch July 2, 2026 18:52

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread apps/gateful/src/index.ts
// 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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant