Repository navigation
Conversation
After the login button ran dropbox-cli start, nothing watched for the link to finish. The service refreshed once, a second after the command exited, and then waited for the periodic timer, up to a minute by default. The panel sat on "Login to Dropbox" after the browser flow had succeeded, which invites a second click. The current client makes this worse: an unlinked daemon does not answer its command socket, so dropbox-cli start prints no link URL at all. The daemon opens the account-link page in the browser itself. So the wait has to start on the click, not on a URL the panel may never see. Poll every 3 seconds for up to 5 minutes after any login attempt, and stop as soon as a status poll reports a linked account. While that wait is pending the login row reads "Finish linking in your browser", and if a URL was captured a click reopens it instead of starting the flow over. If the daemon never confirms the link, say so. Measured on Omarchy 4.0.3 with client 268.4.4124: before, the panel was still on the login prompt 28 seconds after the link landed; after, it flipped within 4 seconds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
74381d1 to
c4f6366
Compare
A pending login still issued another dropbox-cli start when no URL had been captured, which is the behavior of the client measured for this PR. Guard all pending links: reopen a known URL or keep waiting without another launch or a deadline reset. This reduces the repeated-click exposure described in omacom#11954; it does not repair the launch path. The timeout also cleared linkPending before storing its failure in shared actionStatus, leaving that failure visible after late success. Store it separately as linkError, clear link state on authentication or a fresh wait, and render the failure with the panel's error color. Completing a link no longer clears unrelated action errors. Replace source-text wiring assertions with an isolated Quickshell fixture exercising real QML timers, process callbacks and panel bindings. The CLI, status helper, HOME and browser boundary are isolated from the user's account. Cover repeated clicks with and without a URL, repeated polling and termination, timeout persistence, late success and retry. Verified the focused suite on Wayland and inspected waiting, timeout and linked panel captures. The fixture rejects the original repeat-click bug, the old pending-only completion guard, and removal of fast polling. Standalone qmllint diagnostics match the original draft's baseline.
Automated AI review
Verified: after a Login click, with or without a captured link URL, the service polls status every 3 seconds and stops as soon as Two behaviours are worth a look: the faster poll multiplies calls that an open issue reports rotate the link nonce, and the no-URL wait also starts after a failed start. The 3-second poll multiplies calls that #12637 reports rotate the link nonceEach Base already runs A second click on head reopened the URL captured from Impact: repeated rotation while the user is still in the browser is a plausible way for linking to fail on daemons that answer the socket, and "Click to reopen the Dropbox page" reopens the URL from Suggested change: coordinate with open #12988, which skips A failed
|
dropbox-cli start returns normally after printing "The Dropbox daemon is not installed!", which it also prints when no daemon pid appears within 60 seconds, so a zero exit with no URL entered the five-minute link wait: the failure was hidden, the row said to finish linking in the browser, and every Login click was a no-op until the deadline. Treat that output as the failure it is. Pausing or resuming with the panel's p key stops or restarts the daemon, which abandons the link it was waiting on, but the wait, the captured URL and the deadline survived it, so Login again did nothing until the deadline. A pause or resume now ends the pending link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
[Low impact] The changes stay within the Dropbox panel’s account-link flow. The PR still needs a fix so users can restart Dropbox when it stops during a pending link. FindingsSummaryThe PR keeps checking Dropbox while the user finishes linking in the browser.
|
| quotaKnown = parsed.quotaKnown === true | ||
| files = parsed.files || [] | ||
| lastError = "" | ||
| if (authenticated) finishLink() |
| if (ticks >= 100) { | ||
| root.finishLink() | ||
| root.linkError = "Dropbox never confirmed the link. Try logging in again." | ||
| return | ||
| } | ||
| root.refresh() |
There was a problem hiding this comment.
Deadline can show false timeout If linking completes just before the deadline while a status check is still running, this branch reports that Dropbox never confirmed the link without waiting for that result or starting a final check. The panel shows a false timeout until the in-flight check finishes.
|
Reviewed and run on a disposable Omarchy worker. The fix works, I pushed one small commit on top, and one ordering question is left for the maintainer. Reproduced. I ran a harness of my own against the real Pushed f4b09c5, which fixes two cases where the wait locked Login for the full five minutes:
The fixture has two new steps, one per fix. With either fix reverted on the worker, the fixture fails on the matching step. Still open: the faster poll and the link nonce (#12637). Each poll runs Second opinion: Codex at medium effort reviewed the PR and then my commit. On the first round it agreed with the nonce and failed-start findings (independence is not guaranteed, since it can read this session's working notes). It also found the pause/resume case on its own, which is why that fix is in the commit. It flagged two more things that I judged not worth changing. Polls set Waiting on the maintainer: whether this lands after #12988 or together with it. |
Bring the link wait across quattro's i18n and lazy panel content: the five new panel strings go through I18n.t with English catalog entries, dropbox.openedLogin is dropped from every catalog now that a captured URL starts the wait instead of showing it, and the runtime test reaches the status line through the panel's loaded content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This pull request had stopped merging into What the merge changed beyond the conflicts:
Checked on a worker built from the Omarchy ISO, with the shell linked to this branch. The earlier reproduction still holds against current Codex Medium reviewed the merge resolution and found nothing to change: both sides are preserved, the catalog edits are consistent, and the test still exercises the real status line. Independence is not guaranteed, since it can read this session's notes. The classification is unsettled at this head. I read this as a bug fix: the panel does not notice a completed link for up to a minute, and that is reproduced above. Codex Medium, asked separately, classed it as an enhancement. The pull request does also add new waiting and timeout states to the panel. Because the two disagree, omabot will not mark it |
Bring in the current i18n checks and test isolation. On an installed worker, the old i18n test calls the packaged locale helper instead of the checkout helper and fails to generate a locale; the same failure occurs at the merge base and the current base passes. Retain this branch’s Dropbox lifecycle coverage where upstream removed the old test file, and qualify the fixture’s palette references for Qt 6.12, which introduces a conflicting QtQuick Color type. Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
What you see
After linking Dropbox in the browser, the panel can keep showing "Login to Dropbox" for up to a minute, inviting another click.
Live testing on Omarchy 4.0.3 with client 268.4.4124: the polling change reduced the observed delay from 32 seconds (after a second click) to 4 seconds without another click.
Why
Service.qmlrefreshes status when the panel opens, once, one second afterdropbox-cli startexits, and every 60 seconds. It does not watch for the browser step to finish.On the tested client, the unlinked daemon opens the browser itself but does not answer its command socket, so
dropbox-cli startreturns no link URL. Completion polling therefore cannot depend on capturing one.What changed
linkError. They survive unlinked polls but clear on retry or authentication, including late success, without erasing unrelated command failures.Verified:
bash test/shell.d/dropbox-test.shpasses with Wayland runtime coverage exercised; waiting, timeout, and recovered panel captures inspected. No newqmllintdiagnostics; existing import/type warnings remain.Second-click issue
dropbox-cli starttrusts~/.dropbox/dropbox.pid. If missing or stale, it can fork a second daemon that takes over the pidfile and command sockets: the panel reports "Starting..." while the original keeps syncing. Reproduced by moving the pidfile aside; it did not go stale during the normal link tests. Details: #11954.This PR only prevents additional starts during an already-pending link. Initial Login, Resume, and retries after timeout retain the existing launch path; the underlying stale-pidfile issue remains unresolved.
Related PRs and issues
uwsm-appto address the cgroup issue in Dropbox panel's resume/login start dropboxd without uwsm-app, orphaning it from app-dropbox@autostart.service #10423. Separate from completion polling.info.json. This PR does not establish its cause or claim to fix it.