Skip to content

Comments

Flowr timer feature#4

Open
Victor-Dixon wants to merge 7 commits intomainfrom
cursor/flowr-timer-feature-3b40
Open

Flowr timer feature#4
Victor-Dixon wants to merge 7 commits intomainfrom
cursor/flowr-timer-feature-3b40

Conversation

@Victor-Dixon
Copy link
Owner

@Victor-Dixon Victor-Dixon commented Dec 24, 2025

Add a Flowr UI mockup with an auto-finishing timer.

This PR implements a timer that automatically finishes a "smoking" session based on a rule ("next hour" or "fixed duration"), addressing the user's desire for a timer that "just knows" when it's done without manual intervention. It also includes intro/outro messages and optional keyword commands.


Open in Cursor Open in Web


Note

Introduces a standalone web mockup for Flowr with a client-side session timer and auto-finish logic.

  • New flowr-mockup/ with index.html, styles.css, and app.js
  • Implements a state machine (idlerunningfinished) with localStorage persistence
  • Auto-finish rules: nextHour (top of next hour) or duration (N minutes), including manual finish/reset
  • UI wiring for elapsed timer, session timestamps, and mode/duration controls; live updates via 250ms interval
  • Toast notifications for intro/outro messages and a simple command bar (smoke/done/reset/help)

Written by Cursor Bugbot for commit c7059a8. Configure here.

Co-authored-by: dadudekc <dadudekc@gmail.com>
@cursor
Copy link

cursor bot commented Dec 24, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

if (!autoFinishTs) return state;
if (now < autoFinishTs) return state;

const finished = { ...state, finishTs: now };
Copy link

Choose a reason for hiding this comment

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

Auto-finish records current time instead of scheduled time

When finishIfDue auto-finishes a session, it sets finishTs to now (the current time when the check runs) rather than autoFinishTs (the scheduled finish time). If a user closes and reopens the page after the scheduled finish time, the recorded finish time and elapsed duration will be incorrect—showing the time of page reload rather than when the session was actually supposed to end. For example, a session scheduled to end at 4:00 PM would show a finish time of 5:00 PM if the page is reopened at 5:00 PM.

Fix in Cursor Fix in Web

cursoragent and others added 3 commits December 24, 2025 20:48
Co-authored-by: dadudekc <dadudekc@gmail.com>
Co-authored-by: dadudekc <dadudekc@gmail.com>
This commit introduces a new state version (v2) with a more structured approach to storing session data, settings, and UI states. It also adds several new features including focus mode, wake lock, improved history management, and a confirmation modal for session endings. The code has been refactored to better handle these changes and improve overall maintainability.

Co-authored-by: dadudekc <dadudekc@gmail.com>
@Victor-Dixon Victor-Dixon marked this pull request as ready for review December 24, 2025 22:01
cursoragent and others added 3 commits December 24, 2025 22:29
Co-authored-by: dadudekc <dadudekc@gmail.com>
Co-authored-by: dadudekc <dadudekc@gmail.com>
Co-authored-by: dadudekc <dadudekc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants