Better account-based wait status

This commit is contained in:
alejo committed 2026-10-28 13:11:54 -03:00
1 parent 10badb282c
commit 33567db5a3
14 files changed
+183 -57

No files matched your search

+18 -11
View File
@@ -91,17 +91,22 @@ goes back to `$VISUAL` / `$EDITOR` / nano / vim / vi. The choice is stored in
* Waits belong to the account: `acc wait <name> <time>` (or `tsk restat <task> wait
<time>`, which sets its account's wait). Until the time the account's Prompt
and Testing tasks show `Wait HH:MM`; after it they show `Limit reset`, until
you run `acc unwait <name>`, which also clears a stale one. Uploading, Frozen
and Done tasks are not affected, and the tasks keep their own stored status
underneath. A wait that no task shows (no tasks, or only Done / Frozen /
Uploading ones) is listed in the account row as `(wait HH:MM)` or
`(limit reset)` and keeps the account Busy. Tasks without an account keep
their own wait.
you run `acc unwait <name>`. Uploading, Frozen and Done tasks are not
affected, and the tasks keep their own stored status underneath. A wait that
no task shows (no tasks, or only Done / Frozen / Uploading ones) is listed in
the account row as `(wait)` or `(limit reset)` and keeps the account Busy.
Tasks without an account keep their own wait.
* A task you set explicitly to `testing` or `prompt` (`tsk restat <task>
testing`, `tsk add <task> <acc> testing`) shows that status, even while its
account is waiting: that task ignores the wait, and the account's other tasks
keep following it. `tsk restat <task> wait` (no time) makes it follow the
wait again, and a new `acc wait` or `acc unwait` applies to every task again.
Adding a task without a status leaves it following the account.
* Auto unwait: once an account's limit has reset (its tasks show `Limit reset`),
explicitly setting a task on it to `testing` or `prompt` (`tsk add <task> <acc>
testing`, `tsk restat <task> testing`) clears that finished wait, because the
account is in use again. Adding a task without a status does not, and a wait
that is still running is never cleared automatically (use `acc unwait`).
setting a task on it explicitly to `testing` or `prompt` clears that finished
wait, because the account is in use again, and its tasks go back to their own
status. A wait that is still running is never cleared automatically (use
`acc unwait`).
* A time is only optional while the account is already waiting: then
`tsk restat <task> wait` (or `tsk add <task> <acc> wait`) just makes the task
follow that wait. Otherwise (no account, or its wait is over) a time is
@@ -143,7 +148,9 @@ against it behaves exactly like typing the commands. Build it with the project
* After a change, `lls_last_messages(db)` holds what the prompt would have
printed ("Account 'A' is back in use: ..."). Queries do not reset it.
* Statuses are the text you would type: `"prompt"`, `"testing"`, `"wait 4:30pm"`,
`"wait"` (only while the account is waiting)... Waits belong to the account.
`"wait"` (only while the account is waiting)... Waits belong to the account;
a task set to `"testing"` / `"prompt"` while it waits ignores the wait
(`overrides_wait` is 1) and `"wait"` makes it follow the account again.
* `lls_tasks` / `lls_accounts` return lists in the order of the panels, with the
computed status (`status`, `status_label`, `until`) and the stored one underneath
(`stored_status`). Strings in a list are valid until `lls_task_list_free`.