Skip to content

feat(threads): show linked environments in the archive preview - #772

Merged
lastobelus merged 6 commits into
lastcode/mainfrom
lastcode/archive-owned-across-machines
Nov 20, 2026
Merged

lastobelus merged 6 commits into
lastcode/mainfrom
lastcode/archive-owned-across-machines

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Part of #751

What this PR does

Archive preview now shows owned conversations on linked environments and names peers it cannot check. This is part 1 of the two-PR split of D4. Linked threads stay open unless the user explicitly selected them through another archive entry in a bulk selection.

What users see

  • An available machine lists its owned threads with project, typed-in, active, unread, and protected state. Ordinary archive, bulk archive, saved-workspace confirmation, and the mobile alert use the same information. The t3_thread_archive_family tool returns per-machine sections.
  • An offline machine shows Pending · Offline. A refusal shows Blocked · Access denied. An older build shows Blocked · Update this machine to review its threads.
  • Each destination applies the paired link's authorization and walks its recorded ownership for the source thread and that thread's locally owned work. Work owned through a second peer needs a separate review.
  • Peer inventory is read-only. Once the local roster supplies the machine names, owner lookup, link resolution and requests use the remaining time in a shared one-second budget. Each machine's result is retained as it answers. Bulk previews run concurrently and list the selected threads with archive labels and locations. An unavailable peer prompts for review. Empty inventories alone leave the normal idle archive flow in place.

Archive and restore in part 2

Part 2 records one operation per local archive generation, with an exact selection and receipt for each destination. Local archive finishes independently of the peers. An explicit retry reuses a reviewed selection while it remains valid and asks for fresh review when the destination could not be inspected. Restore reopens the exact committed threads and reports unreachable destinations for retry. The recorded selection preserves consent without a standing retry service.

Verification

  • GitHub CI and Codex review passed on 6b36558175043c85896f9bea8ffc88103ca567b9, with zero unresolved review threads. GitHub CI · Codex review
  • Rebased over feat(threads): remove temporary projects at wrap-up #771 so local temporary-project removal and linked preview appear in the same confirmation. The later rebase over docs(agents): teach agents the thread ownership vocabulary #768 required regenerating only the context budget. The rebase passed 118 focused tests, 81 web checks, 17 Chromium tests, and the translation catalog check. The final deadline and bulk-label fixes passed 33 focused tests and scoped lint. Quick CI passed on 6b36558175043c85896f9bea8ffc88103ca567b9 against 1aaf7683dc0d16bb937721b7b1585f25348f4379.
  • Production indexed reads exercised two separate SQLite environments. The fixtures included transitive ownership across projects, archived and deleted intermediates on both sides, and a thread ID reused under a different environment. Transport tests checked link authorization, refusal, offline, unsupported, and the deadline during both resolution and HTTP.
  • In the isolated dev app, the real web client named an expired test link as blocked and moved the local thread to Archived after confirmation. The Incognito QA tab paired with the isolated dev credential. Chromium component tests rendered available, offline, and older peers. Mobile tests exercised alert contents and local archive consent.
  • Six batches of 50 synthetic local archive commands per checkout measured dispatch through completion, with shared dependencies. Median was 3.047 s on the original main baseline, with a 2.081–3.230 s range. The preview branch measured 3.106 s, with a 1.981–3.472 s range. The archive command does not call peers.
  • The archive tool eval passed 17/18 samples with GPT-6.1 Sol on the final head. Five cases passed 3/3. The busy-owner case passed 2/3, matching a run against main at 1aaf7683dc0d16bb937721b7b1585f25348f4379. The one failure skipped the archive-family inspection while leaving the busy owner and its work alone. The same case was 0/3 after docs(agents): teach agents the thread ownership vocabulary #768 with the earlier preview wording, and all six cases passed 18/18 before docs(agents): teach agents the thread ownership vocabulary #768.
  • Repository budget bytes moved from 23,198 to 23,198 for Claude system append, from 24,196 to 24,196 for Codex additional context, and from 85,506 to 85,503 for the MCP tool list (−3 bytes).
Browser component captures

Before — local archive choices.

Archive confirmation with local threads

After — available, offline, and older machines in the same confirmation.

Archive confirmation with sections for linked machines

Upstream-owned files touched

File Added Removed
apps/mobile/src/i18n/translations/de.json 10 1
apps/mobile/src/i18n/translations/en.json 10 1
apps/mobile/src/i18n/translations/es.json 10 1
apps/mobile/src/i18n/translations/fr.json 10 1
apps/mobile/src/i18n/translations/ja.json 10 1
apps/mobile/src/i18n/translations/ko.json 10 1
apps/mobile/src/i18n/translations/pt-BR.json 10 1
apps/mobile/src/i18n/translations/ru.json 10 1
apps/mobile/src/i18n/translations/sv.json 10 1
apps/mobile/src/i18n/translations/zh.json 10 1
apps/server/src/mcp/toolkits/thread/handlers.ts 7 4
apps/server/src/mcp/toolkits/thread/tools.ts 1 1
apps/server/src/peer/PeerLinks.test.ts 3 0
apps/server/src/peer/PeerLinks.ts 9 3
apps/server/src/provider/agentContextBudget.json 1 1
apps/server/src/server.ts 7 0
apps/server/src/ws.ts 8 0
apps/web/src/i18n/translations/de.json 11 1
apps/web/src/i18n/translations/en.json 11 1
apps/web/src/i18n/translations/es.json 11 1
apps/web/src/i18n/translations/fr.json 11 1
apps/web/src/i18n/translations/ja.json 11 1
apps/web/src/i18n/translations/ko.json 11 1
apps/web/src/i18n/translations/pt-BR.json 11 1
apps/web/src/i18n/translations/ru.json 11 1
apps/web/src/i18n/translations/sv.json 11 1
apps/web/src/i18n/translations/zh.json 11 1
packages/contracts/src/index.ts 1 0
packages/contracts/src/orchestrationV2.ts 2 0

Local review: 8 rounds with gpt-6.1-terra (xhigh), approved.

@lastobelus
lastobelus force-pushed the lastcode/archive-owned-across-machines branch from d0e0ebf to ae32f08 Compare November 20, 2026 06:57
@lastobelus lastobelus changed the title Show linked environments in the archive preview feat(threads): show linked environments in the archive preview Nov 20, 2026
@lastobelus
lastobelus marked this pull request as ready for review November 20, 2026 06:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T08:38:55.115135Z 6b36558 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: ae32f08f71

ℹ️ 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".

@lastobelus
lastobelus force-pushed the lastcode/archive-owned-across-machines branch from ae32f08 to 443f516 Compare November 20, 2026 07:28
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 443f516e9f

ℹ️ 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".

@lastobelus
lastobelus force-pushed the lastcode/archive-owned-across-machines branch from 443f516 to 686f68a Compare November 20, 2026 07:34
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 686f68ae3c

ℹ️ 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".

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0e6c9e0ac4

ℹ️ 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".

Archive confirmation only shows the current environment, which hides owned work elsewhere. Load each linked environment's inventory using its existing link authorization and show when it cannot answer. This preview keeps remote work open until recorded archive and restore land.

Implemented with GPT-6.2 Sol in Codex via T3 Code.

Carry-Group: incubator
Carry-Fix: #751
Read activity only for the authorized inventory rows and resolve peers without saving name changes. Give discovery and inventory requests a shared deadline and load separate bulk previews together.

Implemented with GPT-6.2 Sol in Codex via T3 Code.

Carry-Group: incubator
Carry-Fix: #751
Label a thread with its environment-qualified bulk selection and omit the blanket keep-open message when the user selected work on a linked machine. Compose the preview layer separately so the expanded server route stack stays within the Effect pipe arity.

Implemented with GPT-6.2 Sol in Codex via T3 Code.

Carry-Group: incubator
Carry-Fix: #751
Use retained ownership records to walk through deleted owners. Show only live threads and keep the archive confirmation for machines with work or an unavailable inventory.

Implemented with GPT-6.2 Sol in Codex via T3 Code.

Carry-Group: incubator
Carry-Fix: #751
Share the preview deadline between owner lookup and peer inventory. Display archive labels and locations for idle bulk selections when a linked machine prompts for confirmation.

Implemented with GPT-6.2 Sol in Codex via T3 Code.

Carry-Group: incubator
Carry-Fix: #751
@lastobelus
lastobelus force-pushed the lastcode/archive-owned-across-machines branch from 0e6c9e0 to a2a27e1 Compare November 20, 2026 08:22
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: a2a27e1a9e

ℹ️ 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".

Name owner consultation in the archive-family description and clarify the default typed-in selection. Linked preview threads stay open.

Implemented with GPT-6.2 Sol in Codex via T3 Code.

Carry-Group: incubator
Carry-Fix: #751
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 6b36558175

ℹ️ 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".

@lastobelus
lastobelus merged commit 9dcd92c into lastcode/main Nov 20, 2026
55 checks passed
@lastobelus
lastobelus deleted the lastcode/archive-owned-across-machines branch November 20, 2026 10:15
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