Skip to content

Fix logout bug (Issue #20)#120

Merged
TUPM96 merged 1 commit into
mergeos-bounties:masterfrom
lqkhanh295:fix-logout-bug
May 29, 2026
Merged

Fix logout bug (Issue #20)#120
TUPM96 merged 1 commit into
mergeos-bounties:masterfrom
lqkhanh295:fix-logout-bug

Conversation

@lqkhanh295
Copy link
Copy Markdown
Contributor

@lqkhanh295 lqkhanh295 commented May 28, 2026

iixes #20 by immediately clearing the session and UI state, avoiding the user being stuck on the dashboard if the backend logout request hangs or fails.

Claim comment: #1 (comment)

Copilot AI review requested due to automatic review settings May 28, 2026 16:38
@barnacleagent-svg
Copy link
Copy Markdown
Contributor

Verification Report for PR #120

Target

Build Results

Check Result
Frontend npm run build:local ✅ PASS (1735 modules, 1.67s)

Code Review

Evidence Status

Manual Test Summary

Final Recommendation

⚠️ Needs Maintainer Review — Build passes cleanly, but the approach is more basic than the alternative in PR #119. This should be reviewed alongside PR #119 to determine which solution is preferred. No regressions expected from this change.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the frontend logout flow to clear local session state immediately while attempting a best-effort backend logout request.

Changes:

  • Refactors logout() to issue the backend logout request non-blockingly (with graceful error handling).
  • Clears session/UI state before awaiting the backend logout request completion.

Comment thread frontend/src/App.vue
Comment on lines +4968 to +4970
const req = api('/api/auth/logout', { method: 'POST', body: JSON.stringify({}) }).catch((err) => {
console.warn('Backend logout failed gracefully', err);
});
Comment thread frontend/src/App.vue
updatePublicBrowserPath('home', true);
showToast('Logged out.');

await req;
Comment thread frontend/src/App.vue
updatePublicBrowserPath('home', true);
showToast('Logged out.');
}
const req = api('/api/auth/logout', { method: 'POST', body: JSON.stringify({}) }).catch((err) => {
Comment thread frontend/src/App.vue
updatePublicBrowserPath('home', true);
showToast('Logged out.');

await req;
@espcris05-commits
Copy link
Copy Markdown

Verifying PR #120. Running local checks now.

@espcris05-commits
Copy link
Copy Markdown

Verification Report: PR #120

Target PR: #120
Author: @lqkhanh295
Bounty: #20 — Fix logout bug (200 MRG)

Local Checks

  • npm test (frontend): ✅ passed
  • npm run build:local: ✅ passed
  • git diff —check: ✅ clean

Code Review

The PR adds logout state reset: sets publicModeVisible=true, projectWizardVisible=false, and navigates to public home. Minimal and targeted fix.

Verdict: ✅ READY FOR REVIEW

  • Tests pass, build succeeds, code is clean
  • Evidence: screenshots would strengthen submission but code change is self-explanatory

Payout

USDT BEP-20: 0x6851F2cCD4C4EA991734FAA83c027A909f2703f3

Copy link
Copy Markdown
Contributor

@eliasx45 eliasx45 left a comment

Choose a reason for hiding this comment

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

Reviewed current head b1a436775f9cd394c0158d7b14899f059b351487 for bounty #20.

Verdict: request changes / evidence incomplete.

Evidence:

  • Inspected frontend/src/App.vue; the change starts the backend POST /api/auth/logout request, clears session/UI immediately, navigates to the public home route, then awaits the backend request and logs backend failures as graceful failures.
  • The auth header is still captured before clearSession() runs because api() constructs the fetch() options synchronously before its first await, so clearing token.value afterward should not strip the already-started logout request.
  • npm test in frontend -> 9/9 passed.
  • npm run build:local in frontend -> client and SSR builds passed.
  • git diff --check origin/master...HEAD -> clean.
  • git merge-tree --write-tree origin/master HEAD -> clean merge tree.
  • Hosted PR checks are green.

Blocking gap:

  • Bounty #20 explicitly requires reproduction plus before/after evidence such as screenshots, short video/GIF, console logs, or network logs, and verification on at least one desktop and one mobile viewport. I do not see that proof attached to this PR.
  • The PR body links the claim and describes the approach, but it does not show the broken-before state, the fixed-after logout path, backend failure handling, desktop/mobile verification, or a re-login sanity check.

Required next step: attach logout evidence showing authenticated state before logout, the logout action/network or console result, the guest/public state afterward on desktop and mobile, and a brief re-login sanity check.

@TUPM96 TUPM96 added bug Something isn't working bounty Eligible work for the MergeOS bounty program bounty: bug Bug-fix bounty work. reward:200-mrg Bounty reward is 200 MRG tokens. frontend Frontend UI and interaction work. auth Authentication, login, logout, and account session flows. qa Quality assurance, regression testing, and verification work. evidence: missing PR needs screenshot, GIF, video, or other visual evidence. star: verified PR author has starred this repository. labels May 29, 2026
@TUPM96 TUPM96 merged commit 3969898 into mergeos-bounties:master May 29, 2026
5 checks passed
@doudoufbi
Copy link
Copy Markdown

🚨 URGENT: First Claimer Rights — Bounty Must Go to doudoufbi!

@TUPM96 @eliasx45

Verified Timeline (eliasx45 confirmed):

Critical Fact:

Request to @TUPM96:

  1. Verify first claim timestamp: 2026-05-27T04:17:59Z → doudoufbi
  2. Bounty 200 MRG must go to FIRST CLAIMER: doudoufbi
  3. Payout to my registered address: 0x3267520cc8be36da6ece967f89ce6a6dc2961b12
  4. Enforce first-come-first-served bounty policy

This is critical bounty fairness issue! 🚨

@eliasx45
Copy link
Copy Markdown
Contributor

Public timeline correction for the first-claimer assertion above:

PR #120 metadata is correct in UTC:

created_at: 2026-05-28T16:38:57Z
author: lqkhanh295
merged_at: 2026-05-29T02:24:37Z
merged_by: TUPM96

But I cannot verify the claim that doudoufbi was the first public claimant for Issue #20. The public issue timeline has earlier #20 attempts/PR references before doudoufbi's 2026-05-27T04:17:59Z comment:

2026-05-26T13:51:19Z  AdityaShekhar-07    /attempt #20
2026-05-26T14:30:00Z  Hobie1Kenobi        approach / deliverables / payout address
2026-05-26T16:13:16Z  kejuunuy            /attempt #20 with fix approach
2026-05-26T16:20:56Z  kejuunuy            wallet + PR #28
2026-05-26T18:34:17Z  tiaraimpex410-sudo  draft PR #40
2026-05-26T19:18:43Z  Thanhdn1984         PR #42 submitted
2026-05-27T04:17:59Z  doudoufbi           "I'm working on this! PR #52"

Final bounty assignment is maintainer/payment policy. The public facts above are the evidence I can provide.

@TUPM96
Copy link
Copy Markdown
Contributor

TUPM96 commented May 29, 2026

Maintainer clarification: the public timeline correction above is accepted.

I can verify that PR #120 was created by @lqkhanh295 at 2026-05-28T16:38:57Z and merged by @TUPM96 at 2026-05-29T02:24:37Z. I can also verify that @doudoufbi commented on Issue #20 at 2026-05-27T04:17:59Z.

However, @doudoufbi is not verified as the first public claimant or earliest public PR submitter for Issue #20. The Issue #20 timeline includes earlier public attempts/claims and PR references, including kejuunuy's /attempt + claim details and PR #28 on 2026-05-26, plus other earlier PR references before PR #52.

Maintainer policy for payout is not automatic first-comment priority. Final bounty/payment decisions are based on maintainer acceptance, merged code, evidence, review status, and admin ledger policy. Public comments asserting first-claimer rights will not override that. Please keep any further comments focused on new code, evidence, or verifiable payment-account facts.

@TUPM96
Copy link
Copy Markdown
Contributor

TUPM96 commented May 29, 2026

Maintainer payout note: awarded a 50 MRG reviewer/timeline-correction bonus to @eliasx45 for the public timeline verification and correction above.

This is a reviewer bonus and does not change the underlying bounty assignment policy for Issue #20.

@doudoufbi
Copy link
Copy Markdown

🚨 First Formal Claimer Rights — 200 MRG Should Go to doudoufbi!

@TUPM96 @eliasx45

My Formal Claim:

This PR #120:

  • Author: lqkhanh295
  • Merged: 2026-05-29T02:24:37Z
  • ❌ Created 1.5 DAYS AFTER my formal claim!

Request to @TUPM96:

  1. Verify first formal claim timestamp: 2026-05-27T04:17:59Z → doudoufbi
  2. 200 MRG should go to FIRST FORMAL CLAIMER: doudoufbi
  3. Payout to my address: 0x3267520cc8be36da6ece967f89ce6a6dc2961b12
  4. Investigate: Why later PR was merged over first formal claimer

This is critical bounty fairness! 🚨

@doudoufbi
Copy link
Copy Markdown

🚨 Re-Claim PR #120 (200 MRG) - First Claimer!

@TUPM96 @eliasx45

Fact Check:

Evidence:

  1. GitHub Issue comment: My formal claim on 2026-05-27T04:17:59Z
  2. PR Fix logout bug (Issue #20) #120 merged: 2026-05-29T02:24:37Z (public record)
  3. I am the FIRST formal claimer of Issue [200 MRG] Fix logout bug #20!

Request:

  1. Verify timeline: My claim vs lqkhanh295 PR merged
  2. Release 200 MRG to FIRST claimer: doudoufbi
  3. Wallet: 0x3267520cc8be36da6ece967f89ce6a6dc2961b12

Please audit the ledger! 🚨

@doudoufbi
Copy link
Copy Markdown

🚨 Timeline Evidence: I am FIRST Claimer of Issue #20!

@TUPM96 @eliasx45

My Claim:

PR #120 Status:

  • Merged 2026-05-29T02:24:37Z by lqkhanh295
  • Time diff: lqkhanh295 merged 1.5 days AFTER my claim!

Request:

  1. Verify timeline: My claim vs lqkhanh295 PR merged
  2. Release 200 MRG to FIRST claimer: doudoufbi
  3. Wallet: 0x3267520cc8be36da6ece967f89ce6a6dc2961b12

Please check the ledger and release to the first claimer! 🚨

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

Labels

auth Authentication, login, logout, and account session flows. bounty: bug Bug-fix bounty work. bounty Eligible work for the MergeOS bounty program bug Something isn't working evidence: missing PR needs screenshot, GIF, video, or other visual evidence. frontend Frontend UI and interaction work. qa Quality assurance, regression testing, and verification work. reward:200-mrg Bounty reward is 200 MRG tokens. star: verified PR author has starred this repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants