Skip to content

fix: coalesce remote Chat catalog reads for sharing - #72

Draft
Mathis (echobt) wants to merge 1 commit into
mainfrom
fix/desktop-share-catalog-st01a1218a
Draft

Mathis (echobt) wants to merge 1 commit into
mainfrom
fix/desktop-share-catalog-st01a1218a

Conversation

@echobt

Copy link
Copy Markdown
Contributor

What changed

Coalesce remote Chat and signed-in Chat feature catalog loads through remoteChatModels(). All consumers use api.remoteSessions.models(), which populates the Chat core catalog. Code catalog responses no longer share the same key with Chat responses. Concurrent core reads invalidate each other; sharing the in-flight request prevents that race while later calls still refresh.

Follow-up to merged #71 (e424012c), based on current main fdd83ec. The uncommitted broader D03 recovery in /root/cortex-dev/worktrees/ux-d03 remains untouched and is not included or claimed integrated here.

How to try it

Build/start, select a self-hosted connection, sign in with a configured text-only model. Open #/home, then #/share. Select a saved conversation, create a link, revoke it. Share remains functional without tool/image capabilities.

Honest states

Existing loading/error and epoch/route guards remain intact. No indefinitely cached catalog is introduced. This bounded PR does not claim full DSK-07 discovery recovery or installed macOS/Windows/backend assembly. M09/M10 still require M11.

Verification

bun run lint, bun run typecheck, bun run audit:i18n, production bun run build: passed. Complete unit suite: 65 files, 521 passed, one existing conditional skip. Catalog regression proves one shared pending request plus a fresh request after settlement.

Real built Electron Share test: two cases passed, link create/list/revoke through the actual main/IPC transport and local HTTP producer fixture. Screenshots inspected in light/dark, 1440x900 and 960x640. Existing Chat tools: three observed passes. Broader existing remote Chat regression fails on the merged registry/legacy route defect; no assertion was changed. Historical #71 has 13 failed native CI jobs, independently queried.

Evidence: /root/omo-herdr-wt/hermes-docs-qa-docs-attempt2/.omo/evidence/D03/D03-share-catalog-manual-qa.md and /root/cortex-dev/ux-implementation/D03/share-catalog-current.

Risk and rollback

Renderer catalog ownership only. Revert this follow-up to restore independent reads. Broader recovery changes, native integration and required CI completion remain separate and unverified.


Attestation

Tick a box only if it is true. If a line does not apply, leave it unticked and say
why on the line. Do not delete this block.

  • Rules read. I read AGENTS.md and the relevant files in .rules/ before writing code, and this change follows them.
  • Error copy is product language. No user-facing string names a vendor, a status code, a stack fragment, or an internal identifier. Failures say which Cortex capability is affected and what the user can do next. (.rules/02-errors.md)
  • Responsive and themed. Every screen I touched is usable from the 960×640 minimum window up to 1440 and beyond, in both dark and light, using the theme variables rather than raw hex. (.rules/03-responsive.md)
  • Security holds. No provider key or session material reaches the renderer; no secret is in the diff; the renderer stays sandboxed; local mode works without an account. (.rules/01-security.md)
  • Docs updated in this PR. AGENTS.md is updated if this change touches product surfaces, engine routes, environment/configuration, or error copy; other affected docs under docs/ are updated too. (.rules/05-documentation.md) Nested Chat AGENTS.md and docs/providers.md updated. Exact root AGENTS.md patch supplied to parent; not yet applied.
  • I verified this carefully. I ran the app and the checks above, read my own diff end to end, and did not weaken a test or an assertion to get a green result. Scoped Share acceptance passes; existing remote Chat failures and latest CI remain unresolved.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@blacksmith-sh

blacksmith-sh Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Found 39 test failures on Blacksmith runners:

Failures

Test View Logs
tests/e2e/
bot-safety.spec.ts:102:3 › Preview Bot shares saved look, draft, pause and activity — 1
440 dark
View Logs
tests/e2e/
bot-safety.spec.ts:102:3 › Preview Bot shares saved look, draft, pause and activity — 1
440 light
View Logs
tests/e2e/
bot-safety.spec.ts:102:3 › Preview Bot shares saved look, draft, pause and activity — 9
60 dark
View Logs
tests/e2e/
bot-safety.spec.ts:102:3 › Preview Bot shares saved look, draft, pause and activity — 9
60 light
View Logs
tests/e2e/
chat-missing.spec.ts:18:1 › a failed deferred delete restores the Chat with an error
View Logs
tests/e2e/
chat-missing.spec.ts:43:40 › Deleted Chat shows truthful missing-page recovery — dark
View Logs
tests/e2e/
chat-missing.spec.ts:43:40 › Deleted Chat shows truthful missing-page recovery — light
View Logs
tests/e2e/
components.spec.ts:4:40 › Components catalog: families, variants and three-preview ceil
ing (dark)
View Logs
tests/e2e/
components.spec.ts:4:40 › Components catalog: families, variants and three-preview ceil
ing (light)
View Logs
tests/e2e/
composer-safety.spec.ts:25:3 › Code keeps cancelled and no-model drafts, locks pending
submits — dark
View Logs

...and 29 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

This branch has not been deployed

No deployments
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.

1 participant