Skip to content

fix(gui): carry dashboard token prompt dedupe onto dig2-go (#651) - #676

Merged
Wibias merged 1 commit into
lidge-jun:dev2-gofrom
Wibias:maintainer-carry/651-dashboard-token-prompt
Jul 29, 2026
Merged

fix(gui): carry dashboard token prompt dedupe onto dig2-go (#651)#676
Wibias merged 1 commit into
lidge-jun:dev2-gofrom
Wibias:maintainer-carry/651-dashboard-token-prompt

Conversation

@Wibias

@Wibias Wibias commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Go port

None — GUI-only (gui/src/api.ts + tests). No Go counterpart.

Test plan

  • Cherry-pick applies cleanly
  • CI on dig2-go

…e-jun#651)

Fixes lidge-jun#647. Single shared 401 token refresh gate; no prompt storm on concurrent /api/* 401s.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 54c6570f-fe17-41f0-936a-3f0929c8c784

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Jul 29, 2026
@Wibias
Wibias merged commit 2d1d4bf into lidge-jun:dev2-go Jul 29, 2026
7 of 10 checks passed

@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: b0319a9f9e

ℹ️ 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".

Comment thread gui/src/api.ts
const [retryInput, retryInit] = withToken(input, init, nextToken);
const retry = await originalFetch(retryInput, retryInit);
if (retry.status === 401) clearToken();
if (retry.status === 401) clearTokenIfCurrent(nextToken);

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 Retry with a concurrently corrected token

When concurrent initial 401s retry a token that the user entered incorrectly, one request can clear that token while another request prompts for and stores a corrected token. Any old-token retry that then reaches this line preserves the corrected token but immediately returns its stale 401, leaving part of the dashboard fan-out failed even though authentication has recovered. After a retry returns 401, re-read the current token or rejoin the shared resolution gate before returning, with a bounded retry count to avoid loops.

Useful? React with 👍 / 👎.

Wibias added a commit that referenced this pull request Jul 29, 2026
Carry of #631 / 14dde56 onto dig2-go.

Go port: none — CI/workflows and issue-quality scripts only; no Go counterpart.

CI note: ubuntu/windows prepare-release-assets + npm-global windows failures match pre-existing dig2-go tip / #676; not introduced by this carry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant