Skip to content

[Feat] Make Sessions the primary workspace for Roomote work - #1708

Open
roomote-roomote[bot] wants to merge 35 commits into
developfrom
feature/unified-sessions-2tuskyfsof5bf
Open

[Feat] Make Sessions the primary workspace for Roomote work#1708
roomote-roomote[bot] wants to merge 35 commits into
developfrom
feature/unified-sessions-2tuskyfsof5bf

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • makes Sessions the primary continuity and navigation unit while preserving Task, TaskRun, worker, controller, SDK, webhook, and /task/:id contracts
  • adds additive Session persistence, task/participant/pin linkage, usage attribution, status/read/notified rollups, transactional visible-task and Fast-conversation creation, and a bounded resumable reconciliation job
  • adds the unified Session API surface for scoped list/board/search, composed timeline, detail, read state, archive/rename/pins, task resolution, cost and analytics rollups, and task-authorized detail redaction
  • ships the Session-first Home flow, full filter URL contract, command/navigation integration, responsive list/board/detail UI, execution cards and nested task panels, Task workspace breadcrumbs/return paths, unread tracking, and updated public docs
  • adds independently reversible sessions_data, sessions_ui, and sessions_comms flags, with Session-aware communication links/copy and additive coarse telemetry
  • keeps the data-only rollout isolated from unified Session UI by gating task links, breadcrumbs, trackers, and detail resolution on sessions_ui
  • evaluates runtime Session flags without requiring Redis, while a 30-second process-local metadata cache and in-flight request coalescing prevent per-message database reads

Why 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 rollout gates and migration behavior were tightened during review so enabling Session persistence alone does not expose unavailable UI, deleted tasks cannot keep Sessions blocked, deployments without environments can still start conversational Sessions, and existing Fast-mode opt-outs remain intact.

Impact

The schema change is additive and N-1 safe. After develop migration 0063_organic_garia.sql, migration 0064_deep_vengeance.sql creates the Session tables and indexes and adds a nullable session_id usage dimension. Migration 0065_enable_fast_mode_for_existing_users.sql enables the new default only for users with no saved preference, preserving explicit false and true values.

Rollout order remains sessions_data first, then sessions_ui, then sessions_comms. Each flag can be reversed independently. Settings changes explicitly invalidate both Redis and process-local deployment metadata caches; otherwise local metadata refreshes within 30 seconds.

Current develop is merged into the branch. The final checks include 109 Cloud Agents files / 993 tests with Redis deliberately unreachable; 8 focused web server tests; 57 focused Session client tests; 10 responsive Session workspace tests; the full web client suite at 247 files / 1,869 tests; and the full DB suite at 59 files / 638 tests. The original navigation failures pass 24/24 focused tests, and the migration-journal consistency regression is covered by the complete DB run. Web, Cloud Agents, and DB fast type checks pass, as do the pre-push oxlint, residual lint, monorepo fast typecheck, and knip gates. A fresh database applied all migrations through 0065, and migration fixtures produced false:false, missing:true, and true:true.

One scope item remains deliberately 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.

Screenshots

Task workspace with Sessions UI disabled and no Session links

@roomote-community

roomote-community Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Gate task workspace Session breadcrumbs and the Session detail route on sessions_ui so the data-only rollout does not expose unified Session UI.
  • Exclude soft-deleted tasks from Session detail and timeline status calculations.
  • Allow Auto to start Fast Sessions without requiring an environment when sessions_ui is enabled.
  • Avoid an uncached deployment-settings lookup for every Fast-agent message write.
  • apps/web/src/app/(sandbox)/sessions/[sessionId]/page.tsx:160: export and configure getFastSessionTasks in the Fast-session page test mock so the legacy detail tests run.
  • packages/db/drizzle/0065_enable_fast_mode_for_existing_users.sql:5: preserve users who explicitly opted out of Fast response mode instead of overwriting their preference.

Reviewed f08c61a

Comment thread apps/web/src/app/(sandbox)/task/[taskId]/Header.tsx Outdated
Comment thread apps/web/src/lib/server/sessions.ts Outdated
Comment thread apps/web/src/app/(authenticated)/home/Home.tsx
@roomote-roomote

roomote-roomote Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the failed Test check in f82c6ff8 and completed the cache follow-up in 4cc33a32. Session runtime flag reads no longer require Redis; deployment metadata is cached in-process for 30 seconds with concurrent-read coalescing and explicit invalidation.

The branch is merged with current develop and mergeable. The full Cloud Agents suite passes with Redis deliberately unreachable (107 files, 963 tests), and pre-push lint, fast type checks, and knip pass. The related cache review thread was resolved after the follow-up push. See task.

Comment thread packages/feature-flags/src/server/deployment.ts Outdated
…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
@roomote-roomote

roomote-roomote Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the failed Roomote review and merge conflicts through 02b13d20. Current develop was merged in 44fa99ed; Session UI routing is gated during the data-only rollout, soft-deleted tasks no longer affect Session details or status, environment-free Auto starts work with Sessions UI enabled, Redis-free flag reads are cached, legacy Fast detail mocks are complete, and the Fast-default migration preserves explicit opt-outs.

Exact checks: Cloud Agents 109 files / 993 tests with Redis unreachable; DB Session helpers 22 tests; focused web server 8 tests; focused web client 57 tests; responsive Session workspace 10 tests; web, Cloud Agents, and DB fast type checks; pre-push oxlint, residual lint, monorepo fast typecheck, and knip. A fresh database applied migrations through 0065; fixtures remained false:false, missing:true, and true:true. The latest review reports no code issues, every review thread is resolved, and the PR is mergeable. See task.

Comment thread packages/db/drizzle/0065_enable_fast_mode_for_existing_users.sql Outdated
@roomote-roomote

roomote-roomote Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the failing Test check through f08c61a4. The first run exposed two stale navigation assertions left behind when Tasks became Sessions; a3e67ba0 updates them to the shipped Sessions / /sessions navigation. The rerun then exposed migration 0065 carrying an earlier timestamp than generated 0064; f08c61a4 restores the journal’s monotonic timestamp invariant.

Exact checks: focused navigation tests 24/24; complete web client suite 247 files / 1,869 tests; complete DB suite 59 files / 638 tests; web and DB fast type checks; targeted oxlint; pre-push oxlint, residual lint, monorepo fast typecheck, and knip. The replacement GitHub Test job 98814409791 passed in 2m37s. Production behavior is unchanged. See task.

@brunobergher
brunobergher marked this pull request as ready for review August 28, 2026 09:55
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