feat: chat-first UI for canonical memory users#10171
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d082a9fe7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return MemorySystem.LEGACY | ||
|
|
||
| return MemorySystem.CANONICAL | ||
| return MemorySystem.CANONICAL if canonical_memory_cohort.is_canonical_memory_user(uid) else MemorySystem.LEGACY |
There was a problem hiding this comment.
Preserve canonical selection for local memory fixtures
In the local/offline dev harness, seed-memory-scenario still writes Alice/Bob as canonical_users and child_env_for exports that selection as MEMORY_CANONICAL_USERS, but this resolver now ignores both db_client and the harness env/manifest and only checks the static production/E2E whitelist. After seeding the documented happy_path, alice therefore resolves LEGACY and /v3/memories/run-canonical-promotion no longer exercise the canonical memory path the fixture advertises.
Useful? React with 👍 / 👎.
9d082a9 to
9ec1bb3
Compare
Adds the server-owned, fail-closed chat_first_ui capability and operator guardrails, plus the singleton source filter and Firestore indexes required for the Omi capture archive. Regenerates all affected app clients.\n\nVerification:\n- BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-chat-first-backend-tests.txt bash backend/test.sh\n- backend/scripts/openapi_runner.sh scripts/export_openapi.py --surface app-client --check ../docs/api-reference/app-client-openapi.json\n- Python Swift/TypeScript OpenAPI generator freshness checks\n- app-client OpenAPI compatibility against origin/main\n- Black and git diff --check\n- fresh Sol pre-commit review
Projects the server-owned Chat-first capability through the desktop agent runtime and adds a main-Chat-only structured block tool. The backend validates canonical references; the local journal atomically binds receipts to the producing assistant turn. Legacy surfaces keep the unchanged base manifest and render new block cases inert.\n\nVerification:\n- backend focused chat-first capability/block suite (64 tests)\n- desktop agent focused journal/manifest/session suite (103 tests)\n- desktop agent build and tool-surface generator check\n- desktop Swift debug build and agent-logic harness\n- app-client OpenAPI export, generator freshness, compatibility, Black, desktop test-quality, and git diff checks\n- fresh Sol review-and-fix gate
Keep the generation-fenced main-Chat capability when an accepted run inherits its context snapshot, while reapplying the destination surface gate so non-main sessions remain off.\n\nVerification:\n- 55 focused agent capability/context/history/manifest tests\n- desktop agent TypeScript build\n- fresh Sol regression review and diff check
Adds the capability-gated main-Chat search_chat_history tool. The stdio child relays only after normal authorization; the parent kernel searches the caller's current-generation journal with strict ownership, date, excerpt, and 500-turn bounds.\n\nVerification:\n- 65 focused journal/search/manifest tests\n- desktop agent TypeScript build and tool-surface generator check\n- fresh Sol review: 69 focused tests and tool-surface contract suite\n- shared full agent harness deferred until concurrent T06 Swift compile completes
Adds fail-closed server-owned proactive intent, deferral, budget, receipt, and materialization-fetch contracts. It reserves budget before any judge call, emits no feature work for capability-off users, and never writes a chat transcript.\n\nVerification:\n- 35 focused T04 backend/API/generator tests (plus 11 generator tests)\n- app-client OpenAPI export, TS/Swift generation, and compatibility checks\n- Black and git diff checks\n- fresh Sol review-and-fix gate\n\nDeferred: source-owner wake hooks, real grounded judge binding, kernel materialization, and UI rendering.
Adds a server-sampled, fail-closed parallel shell with Chat as home, typed primary/More navigation, and capability projection before chat warmup. More→Dashboard routes to the one Chat rather than embedding an inline second composer; legacy shell behavior is preserved.\n\nVerification:\n- ChatFirstShell XCTest suite (including stable goals automation route)\n- Swift debug build and desktop test-quality check\n- agent-logic Swift gate: 438 focused lifecycle/state tests\n- agent runtime/node harness: 104 + 104 tests\n- named omi-chat-first-t06 bundle: signed/launched, healthy runtime, capability-off legacy shell and legacy Chat/Tasks/Conversations routes verified\n- fresh Sol review-and-fix gate\n\nEnabled live shell was not exercised because the server-authoritative dev control returned off for the seeded account; no local override was used.
Add the cohort-gated rich main-chat block renderer and an Omi-hardware capture archive with source-safe cache queries, typed discuss-in-chat routing, and honest playback states.\n\nVerification: git diff --check and desktop test-quality static check passed. Runtime Swift builds/tests are intentionally deferred to the final consolidated verification pass at user direction; no queued results are claimed.
Make question suggestions durable, one-tap normal chat interactions with tail-only controls, restart recovery, and a separate capability-gated deferral outbox. Add the cohort-only shared-store Tasks workspace with owner-fenced rollback behavior and source-safe capture links.\n\nVerification: static diff checks and independent Sol review/fix gates completed. Runtime builds, test suites, harness, and UI exercise are intentionally deferred to the single final verification pass at user direction.
Add the cohort-gated foreground Chat materializer, receipt-safe ordered kernel batch, and normal journal reconciliation for server-owned proactive intents.\n\nVerification: static diff checks plus a fresh Sol review/fix gate completed. Runtime builds, suites, harness, and UI exercise remain deferred to the single final verification pass at user direction.
Add the cohort-scoped canonical Goals surface and a generation-bound rich/sparse cold-start path. Cold-start delivery remains receipt-backed, and sparse-sequence terminal state now lifts proactive suppression through a durable journal receipt.\n\nVerification: static diff checks and fresh Sol review/fix gates completed. Runtime builds, suites, harness, and UI exercise remain intentionally deferred to the final consolidated verification pass at user direction.
Add shape-only Chat-first analytics, local-only focus acknowledgement evidence, and non-production fixture contracts for cohort-negative validation.\n\nVerification: static diff checks plus fresh Sol review/fix gate completed. The consolidated runtime, manifest-byte, and named-bundle verification pass begins next.
Repair Swift runtime, wire, and view integration faults surfaced by the consolidated desktop compile.\n\nVerification: static parse/diff checks and a fresh Sol repair review passed; focused Swift runtime verification resumes next.
Repair actor-isolated analytics injection, materialization driver capture, and explicit shared task-store ownership.\n\nVerification: static parse/diff checks and fresh Sol review passed; focused Swift verification resumes next.
Add an explicit JournalOperationResult initializer for materialization fields and repair async archive assertions.\n\nVerification: focused desktop compile and 39 Chat-first/capture tests passed; fresh Sol review passed.
Project immutable journal revisions correctly and reclaim expired deferral leases without allowing stale delivery settlement.\n\nVerification: focused journal suite passes 54/54; fresh Sol review passed.
Failure-Class: none
Failure-Class: none
Failure-Class: none
Failure-Class: none
…flight Backend unit suite: update test fixtures to use the canonical-memory cohort selector instead of the retired TaskWorkflowMode gating model. The PR rewrote conversation_capture.py and candidates.py to gate on is_canonical_memory_user rather than workflow_mode, but existing tests still mocked the old model. Desktop Swift: move the chatFirst capability validation before the manifest digest check so an invalid capability surfaces as .invalidChatFirstCapability rather than a misleading .staleManifest from the digest comparison. PR Metadata Preflight: fix the invariant ID from INV-AGENT-1 to INV-AGENT-* to match the registry wildcard.
558f16e to
9d5e4c3
Compare
|
Monitor follow-up:
Verification:
Left unresolved intentionally:
|
…moval Upstream commit 4a82447 ('remove typing from the floating bar') replaced the inline follow-up text field with a 'Continue in Omi' affordance and moved continueAgent/archiveCurrentExchange calls out of the view. The static-contract tests (source-inspection assertions) were not updated in that commit because the Swift test suite was skipped (no Swift file changes detected by the path filter). This PR touches Swift files, causing the full Swift test suite to run and exposing the stale assertions. Additionally, this PR renamed 'prompt: trimmedText' to 'prompt: effectivePrompt' to support question-card continuation flows. Updated assertions: - FloatingBarTimingSignalTests: isFollowUpFocused → Continue in Omi - AgentPillLifecycleTests: manager.continueAgent → Continue in Omi (x2) - AgentPillLifecycleTests: archiveCurrentExchange(using:) now absent - DesktopCoordinatorServiceTests: prompt: trimmedText → effectivePrompt
|
Monitor follow-up: fixed three failing Desktop Swift static-contract test suites. Root cause: upstream commit Changes (3 test files, no production code):
Verification:
Note: the PR remains DIRTY (mergeable=CONFLICTING) due to a rebase conflict at commit 26/37 that predates this fix. The test assertion fixes will take effect once the rebase is resolved and CI re-runs. |
Summary
Verification
make preflightcd backend && .venv/bin/pytest tests/unit/test_chat_first_blocks.py tests/unit/test_workstream_router_contract.py -q(33 passed)cd desktop/macos/agent && npm run build && npm test -- --run tests/omi-tool-manifest.test.ts tests/chat-first-capability-projection.test.ts tests/surface-session.test.ts tests/conversation-journal.test.ts(99 passed)cd desktop/macos/Desktop && swift test --filter ChatFirstRichBlockTests(8 passed)python3 .github/scripts/test_pr_preflight.py(22 passed)Product invariants
INV-AGENT-*, INV-AUTH-1, INV-CHAT-1, INV-VOICE-1, INV-MEM-1, INV-MEM-3
Failure-Class: none