[Feat] Make Sessions the primary workspace for Roomote work - #1708
[Feat] Make Sessions the primary workspace for Roomote work#1708roomote-roomote[bot] wants to merge 27 commits into
Conversation
|
2 issues outstanding. See task
Reviewed d8efdac |
| const queryClient = useQueryClient(); | ||
| const [isRenameDialogOpen, setIsRenameDialogOpen] = useState(false); | ||
| const [titleDraft, setTitleDraft] = useState(task?.title ?? ''); | ||
| const parentSessionOptions = trpc.sessions?.forTask?.queryOptions({ |
There was a problem hiding this comment.
With sessions_data enabled but sessions_ui still off (the documented rollout order), this query resolves a Session and renders the new breadcrumbs for every task. Those links target /sessions/<session-id>, but the detail page falls back to a Fast-conversation lookup while sessions_ui is off, so direct-task Sessions land on a 404. Gate this query/rendering on sessions_ui as well.
There was a problem hiding this comment.
This is still not gated. The follow-up changed the detail route to resolve unified Sessions even when sessions_ui is false, so the Header's unconditional query/breadcrumb now opens the full unified Session workspace during the data-only rollout. Keep the detail route on the legacy Fast path and gate the Header Session query, tracker, breadcrumbs, and link on sessions_ui.
| }) | ||
| .from(sessionTasks) | ||
| .innerJoin(tasks, eq(tasks.id, sessionTasks.taskId)) | ||
| .where(eq(sessionTasks.sessionId, sessionId)) |
There was a problem hiding this comment.
This detail query does not filter soft-deleted tasks, unlike the list/hydration queries. Deleting a failed task leaves it in this result, so the session detail/timeline still displays it and deriveSessionStatus can remain blocked from a task that disappeared everywhere else. Exclude tasks.deletedAt here (and refresh the cached status when deleting).
| return; | ||
| } | ||
|
|
||
| if (isAutoWorkspace && sessionsUiEnabled) { |
There was a problem hiding this comment.
This branch makes Auto start a Fast Session, which needs no environment, but submitDisabledReason still disables Auto whenever the deployment has no environments. TaskPromptInput therefore prevents this branch from running on a new/no-environment deployment, leaving no way to start the newly primary Session flow. Exempt sessionsUiEnabled from that environment requirement.
|
Fixed the failed Test check in The branch is merged with current |
…ssions-2tuskyfsof5bf # Conflicts: # apps/docs/fast-sessions.mdx # apps/web/src/app/(authenticated)/home/Home.tsx # apps/web/src/app/(sandbox)/sessions/[sessionId]/SessionWorkspace.tsx # packages/communication/src/fast-session-footer.ts # packages/db/drizzle/meta/0061_snapshot.json # packages/db/drizzle/meta/_journal.json
|
Addressing the three remaining findings from the failed Roomote code review: Session breadcrumb flag gating, soft-deleted task exclusion/status refresh, and no-environment Session starts. Follow the task. |
What changed
/task/:idcontractssessions_data,sessions_ui, andsessions_commsflags, with Session-aware communication links/copy and additive coarse telemetryWhy this change was made
Users currently move between conversation and execution as separate top-level objects. This change keeps conversation, delegated work, review context, unread state, artifacts, pull requests, and cost under one durable Session without changing operational Task identity or runtime contracts.
The runtime flag path was also made independent of Redis after unavailable Redis connections caused cascading Cloud Agents test timeouts. The bounded local cache preserves message throughput without reintroducing Redis as a write-path dependency.
Impact
The schema change is additive and N-1 safe: migration
0063_peaceful_stature.sqlcreates the Session tables and indexes and adds a nullablesession_idusage dimension after the migrations already present ondevelop. Historical billing rows are not rewritten; reads combine stamped usage with legacy reconstruction without double counting.Rollout order is
sessions_datafirst, thensessions_ui, thensessions_comms. Each flag defaults off and can be reversed independently. Settings changes explicitly invalidate both Redis and process-local deployment metadata caches; otherwise local metadata refreshes within 30 seconds.The bounded backfill is idempotent, resumes from a durable cursor, and becomes a recent-Session/orphan reconciliation pass after completion. The plan defaults remain in place: composed timelines, direct explicit-workspace launches, current task authorization for execution details, Ready fast-only Sessions in All scope, full bounded backfill, and a soft
/tasksredirect behindsessions_ui.One scope item is explicitly deferred: durable multi-task Session-level notification coalescing from M12. Existing per-run Fast-parent delivery claims/dedup remain active; the new read/notified cursors and Session projection are in place for a follow-up implementation.
The final Cloud Agents suite passes all 963 tests with Redis deliberately unreachable, including focused coverage for cache TTL, concurrent-read coalescing, explicit invalidation, and Session linkage. Monorepo pre-push lint, fast type checks, and knip also pass.