Repository navigation
feat(threads): add Pause session to park provider sessions and save RAM #12172
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
Changes from all commits
9466941
8409a5e
cf47ca9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -34,7 +34,7 @@ export { snoozeWakeLabel }; | |||||
| * (approval), "in motion" (working), and "broken" (failed). Ready is the | ||||||
| * unlabeled resting state. | ||||||
| */ | ||||||
| export type ThreadListV2Status = "approval" | "input" | "working" | "failed" | "ready"; | ||||||
| export type ThreadListV2Status = "approval" | "input" | "working" | "failed" | "paused" | "ready"; | ||||||
| export type ThreadListV2SwipeAction = "archive" | "settle" | "unsettle" | "snooze" | "unsnooze"; | ||||||
|
|
||||||
| export function resolveThreadListV2SnoozeMenuSelection(input: { | ||||||
|
|
@@ -147,6 +147,11 @@ export function resolveThreadListV2Status( | |||||
| if (thread.session?.status === "error") { | ||||||
| return "failed"; | ||||||
| } | ||||||
| if (thread.session != null && thread.session.status === "stopped") { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium Sessions with
Suggested change
🤖 Copy this AI Prompt to have your agent fix this: |
||||||
| // A stopped session carrying a failure still reads as failed, never as | ||||||
| // the calm Paused state. Mirrors the web sidebar's Paused pill gating. | ||||||
| return thread.session.lastError != null ? "failed" : "paused"; | ||||||
| } | ||||||
| return "ready"; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: pingdotgg/t3code
Length of output: 15285
🏁 Script executed:
Repository: pingdotgg/t3code
Length of output: 50372
🤖 get_repo_knowledge executed:
get_repo_knowledge pingdotgg/t3code /tmp/coderabbit-repo-knowledge/pingdotgg-t3code-ca3faa49/conventions /tmp/coderabbit-repo-knowledge/pingdotgg-t3code-ca3faa49/learningsLength of output: 3351
🏁 Script executed:
Repository: pingdotgg/t3code
Length of output: 50372
🏁 Script executed:
Repository: pingdotgg/t3code
Length of output: 50372
🏁 Script executed:
Repository: pingdotgg/t3code
Length of output: 50372
Include Pause session in settled slim-row menus.
Settled threads render as
variant: "slim"even whencanPauseSession(thread)is true. The web action contract also offers Pause whencanPauseNowis true, regardless of settlement. Mobile currently excludespauseMenuItemsfromslimMenuActions, and!canUnsettleprevents those items from being populated. Removing only that guard is insufficient. AddpauseMenuItemstoslimMenuActionsand remove the row-shape guard. Otherwise, users must un-settle the thread before they can stop its provider session and free its process memory.🤖 Prompt for AI Agents