aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-04 12:36:21 +0200
committerDanilo M. <danix@danix.xyz>2026-08-04 12:55:05 +0200
commitf0e99dceb5a395eb542a6a67a0b56b7bb33a2474 (patch)
treebd7cfab053395c507ad282fbebaf270ac1d6e2c2 /src/keymap.h
parent17c75c88ac91fa010de779b4c53883f1f58f0308 (diff)
downloadqtmaildir-f0e99dceb5a395eb542a6a67a0b56b7bb33a2474.tar.gz
qtmaildir-f0e99dceb5a395eb542a6a67a0b56b7bb33a2474.zip
feat(sync): dismissable log pane, progress bar, and a skip that is not a failure
Four changes to the sync UI, three of them from using it. The log pane could not be dismissed. It is hidden at construction and shown on failure, and nothing ever hid it again, so a single failed sync left it on screen until the application restarted. It now sits in a container with its own Close button, and is 200px rather than 120, because mbsync's output is wide and repetitive and the shorter pane showed too little of it to read. It still appears only on failure, which the user confirmed is what they want. A sync gives no feedback while it runs. The status bar now carries an indeterminate progress bar for the duration, and the Sync button is disabled rather than left looking live. The bar is indeterminate on purpose: mbsync reports no percentage and the script's output is unstructured, so a bar filling left to right would be inventing a fraction nobody knows. The log is also cleared at the start of each run, since leaving the previous run's lines in place makes a stale failure look like the current one. The lock skip was reported as a failure. mailsync.sh exits when another run holds the lock, and that was exit 1, which qtmaildir reads as "sync failed": it showed the log pane and, on the exit path, told the user their changes were still unsynced. With a cron timer every ten minutes, a click landing inside a run is routine and none of that is true. The script now exits 75 (EX_TEMPFAIL) and the window reports it as its own case, saying a sync is already running. On the exit path it stays open and says plainly that the other run is most likely carrying the changes over but that this window cannot see it finish, rather than guessing either way. That last hedge is what item 27 records: the application cannot see a sync it did not start. The user chose continuous polling of the lock file over the narrower "only while quitting" version, and the entry notes that the lock is already the signal, so no status file is needed, and that a kernel lock cannot go stale where a written file can. Verified against stub binaries: a second run while the lock is held exits 75 and says SKIPPED, while the run holding it completes at 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/keymap.h')
0 files changed, 0 insertions, 0 deletions