Fix: "Create your first routine" CTA opens Task form instead of starting routine flow#1629
Open
sambhavi0 wants to merge 2 commits into
Open
Fix: "Create your first routine" CTA opens Task form instead of starting routine flow#1629sambhavi0 wants to merge 2 commits into
sambhavi0 wants to merge 2 commits into
Conversation
Contributor
Author
|
Just opened a pr for issue #1563. Kindly lmk if any changes are required @aryandas2911 |
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 free
to 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.
📌 Description
On an empty Routine Builder page, clicking "+ Create your first routine" opened the Task creation modal (Title, Priority, Due Date, Repeat, etc.) instead of starting the actual routine-building flow, since the empty state's CTA was wired to the same handler used for adding tasks to the library. This PR fixes that by giving the routine empty-state CTA its own logic: if the user already has tasks to work with, it scrolls up and highlights the weekly grid to guide them toward drag-and-drop scheduling; only if their task library is empty does it fall back to opening the Task form, since a task is needed before anything can be scheduled.
🔗 Related Issue
Closes #1563
🛠 Changes Made
📸 Screenshots (if applicable)
✅ Checklist
🚀 Notes for Reviewers
This issue originally described the routine creation form collecting task fields (Priority, Due Date, Repeat), but after digging in I found that form belongs to TaskFormModal (task creation) the actual routine save flow already only asks for Name + Description, which was correct. The real bug was narrower: the "Create your first routine" empty state button was wired to open that same Task form instead of guiding the user toward the drag and drop scheduling flow, so this PR fixes that specific wiring. I left a comment on the issue explaining the re scope before starting work, happy to adjust if you'd rather handle it differently. Verified with eslint and a production build (both clean), but wasn't able to do a full manual click-through locally due to local env setup issues, so flagging that in case you'd like to test the highlight/pulse behavior yourself before merging.