Feat/sidebar current task widget - #25
Open
MegaBadCoder wants to merge 2 commits into
Open
Conversation
added 2 commits
August 13, 2026 13:41
The widget answered "what am I on" but not "for how long" — the thing you actually open it for — so you still had to go to the calendar. Each row now carries the remaining time, a progress bar, and the pomodoro count, with a left accent bar echoing the calendar's current-time line. The window maths moved into a private getWindow(), so the active-task filter and the progress readout are built on one definition and cannot disagree. Header is now "Идёт сейчас": the old "Текущая задача" was singular while the list can hold several rows. Rows carry a border rather than relying on bg-sidebar-accent/40 alone — in light mode that fill sat within 1.7% of the sidebar background (0.968 vs 0.985 oklch) and the rows were effectively invisible. The play button keeps its 32px visual size but expands to a 44px hit area via ::before, and the progress fill honours prefers-reduced-motion.
The row now says whether the timer is on this task — a red pulsing "идёт" while it ticks, a muted "пауза" while it is armed but stopped. This is not only a label: the play button is removed in the running state because startTask() rewinds to the first phase, so a stray click on a live task would discard the pomodoros already worked. The paused state keeps a button, which resumes via toggleTimer instead of restarting. That matters because startTask only *arms* a session — ticking starts separately — so a row lands in `paused` immediately after the widget's own play click. Dropping the button there would have made the widget unable to start a timer at all. timer-store now exposes activeTaskId; without it a row cannot tell "running" from "running on something else".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.