-
Notifications
You must be signed in to change notification settings - Fork 287
Skip create task on import #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Skip "Create a Task" when importing existing project that already contains at least 1 task.
WalkthroughThe post-import redirection logic in the project import workflow was updated. After importing a project, the system now checks asynchronously if the project contains tasks. Based on this check, the user is redirected either to the task selection page or to the project page for task creation. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI (edit_project.svelte)
participant API
User->>UI (edit_project.svelte): Import project
UI (edit_project.svelte)->>API: Import project request
API-->>UI (edit_project.svelte): Project imported (project_id)
UI (edit_project.svelte)->>API: GET /projects/{project_id}/tasks
API-->>UI (edit_project.svelte): List of tasks or error
alt Tasks exist
UI (edit_project.svelte)->>User: Redirect to /setup/select_task
else No tasks or error
UI (edit_project.svelte)->>User: Redirect to project page (create tasks)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
📊 Coverage ReportOverall Coverage: 92% Diff: origin/main...HEADNo lines with coverage information in this diff.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One UX idea, otherwise looks good.
|
||
if (should_skip_task_creation) { | ||
// Project has tasks, go directly to main app | ||
goto("/run") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try UX of /setup/select_task
(private window will remove saved data). Let's them pick a task, which they won't have done yet right after import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
What does this PR do?
When importing an existing Kiln project that already contains tasks, users were being redirected through the "Create a Task" setup flow.
This PR adds routing logic that checks whether an imported project already has existing tasks. If the project has existing tasks it would now skip the task creation step and go to Select Task. If the project has no tasks, the flow remained the same as before.
Summary by CodeRabbit
New Features
Bug Fixes