Skip to content

Docs: the Environment browser's architecture for apps and forks (0191 addendum) - #526

Merged
immakermatty merged 7 commits into
mainfrom
agent/DEV-6646-environment-browser-architecture
Oct 12, 2026
Merged

immakermatty merged 7 commits into
mainfrom
agent/DEV-6646-environment-browser-architecture

Conversation

@immakermatty

@immakermatty immakermatty commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Why

Matěj asked on 2026-10-11 for one document that says how Lazurio thinks about the Environment browser, and how it fits T3 Code, Lazurio MausBot and Codex Desktop. It is to be followed whenever a fork is updated, or upstream T3 Code or Codex Desktop ships a new version. Until now the model was spread over root decisions 0191 and 0195 and LazurioPlatform's F38, F39 and F47.

What changes

  • manual/environment-browser.md (new, Czech like the other manuals). It summarises the decisions in force and makes no new one; on any conflict the decisions win.

    • The principles:
      • one browser per Environment, with shared sign-ins;
      • agents work in it through the agent-browser fork, in T3 Code through its preview_* tools on the same browser;
      • people see a tab only through the Platform's view;
      • it is managed from the Launchpad;
      • a tab lives while something holds it;
      • Environment boundaries.
    • Who owns which part, and how a tab is born and ends: the hub's graces as F47 point 5 states them.
    • The host app contract:
      • the <lazurio-new-tab> shell element;
      • the view frame and its messages;
      • holder files with record times on the boot clock, kept in each app's own store;
      • releasing on archive;
      • only Platform interfaces.
    • Each app in turn: the Launchpad; T3 Code as the main compatibility target; MausBot, which gets the same design later; Codex Desktop as a conscious compromise (agent-browser plus a view link, and the standalone /new-tab).
    • The fork-update rules:
      • upstream first;
      • the contract wins;
      • every browser capability has a row in the Overlay table of the fork's runbook;
      • a check after each update;
      • versions released together.
    • Upstream T3 Code's direction as of today: its own browser on the T3 server, server-held tabs, a hard-coded "+", and the rewritten orchestration.
    • What stays open.
  • manual/decision-register.md. 0191 gains the 2026-10-11 evening addendum (points 24–27), recording Matěj's rules:

    • one architecture for apps and forks;
    • T3 Code compatibility first, with a bounded, minimal overlay;
    • archiving or deleting a T3 Code thread closes its tabs, while a tab another place holds is only let go (0195 point 11 stands). This settles the question F47 left open;
    • the same design for MausBot bots;
    • the Codex Desktop compromise.
  • manual/decision-register.md, 0195 gains the 2026-10-12 addendum (points 13–16), from Matěj's answers on the task 501 design:

    • every app's strip shows its own place's tabs: a T3 Code thread's tabs, or the tabs opened in the Launchpad. Přehled in Nová karta shows every tab in each app;
    • × on any strip closes the person's view and lets go for that place, with Vrátit. The tab stays in the Environment and in Přehled while anything else needs it. Only Přehled's Zavřít closes for everyone;
    • T3 Code's thread strip:
      • the panel opens by itself only when the agent opens a tab or a window;
      • closing the last tab closes the panel, as upstream does;
      • new tabs keep one order on every device, positions stay each device's, and tabs can be dragged.

    The document follows these points and records that T3 Code keeps its record times in its holder file, like the Launchpad (the approved task 501 design).

  • manual/README.md lists the document.

What doesn't change

No code, deployment or runtime. The decisions keep precedence over the summary. The Platform's implementation is DEV-6656 task 917 (F47 steps 1–3; steps 1 and 2 are approved PRs) and the T3 Code side DEV-6646 task 2026-10-11-501.

Verification

  • bun run check:docs: passed.
  • bun run pr:preflight: ready_to_push.
  • I checked every factual claim against F47 (design and the step 1–2 notes), 0191, 0195, the T3 fork's runbook and Matěj's messages of 2026-10-11.
  • The added lines name no client Organization.

Open questions (for Matěj, listed in the document)

  • At the refresh onto stable 0.0.46, whether the fork turns upstream's server browser off or points it at DevTools on 9222. There is no 0.0.46 stable yet, only previews and nightlies, so task 501 builds on v0.0.45 with a port-friendly overlay.
  • The idle-window setting and the close-or-sleep strategy in the Launchpad's settings (DEV-6656 task 943, after spike 916).

🤖 Generated with Claude Code

@immakermatty
immakermatty marked this pull request as ready for review October 11, 2026 19:17

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T19:19:49.485281Z 78f136d Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78f136dbc7

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

Comment thread manual/environment-browser.md Resolved

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immakermatty Na exact head 78f136d žádám dvě opravy dokumentační smlouvy:

  1. manual/environment-browser.md:88–98: Ukázka holder souboru vypisuje jen tabs jako ID, ale o pár řádků níže požaduje per-tab čas v tomtéž Launchpad souboru. Na otevřené vlákno v PR navazuji: uveďte i skutečné pole recordedAt jako mapu ID → {boot, at} (viz LazurioPlatform #318 holderFileText / parseHolderRecords), a odlište tuto writer část od projekce, kterou hub čte. Jinak je to pro implementátora neúplný wire kontrakt a chybí mu pořadí vůči tabs.json.

  2. manual/environment-browser.md:15–16, 46–52, 117–123 (a úvod): Současný čas („běží“, „ukazuje“, „čte“) bez stavového vymezení působí jako tvrzení o nasazeném řešení. Root 0191 výslovně říká, že jde o cíl, nic z toho zatím není nasazené; F47 #316/#318 jsou jen otevřené větve kroků 1–2 a kroky 3–5 včetně UI a skutečného ověření ještě čekají. Přidejte hned na začátek explicitní „cílová smlouva, nikoli popis nasazeného stavu“, s rozlišením těchto kroků. Neměnit rozhodnutí, jen čtenáři zabránit považovat budoucí návod za dnešní provoz.

Jinak architektura včetně lifecycle/grace, archive/shared držení a hranic odpovídá 0191/0195/F47. Lokálně bun run check:docs po doplnění plné historie izolovaného checkoutu prošel; CI je zelené na tomto SHA. Po opravě prosím nový exact-head review; tento PR nemerguji.

@immakermatty

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai Both findings are fixed in 62f05a8. Re-review requested on that head.

  1. The holder contract (manual/environment-browser.md, host app contract point 3) now separates:

    • the part the hub reads: {"strip": "<strip>", "label": "<label>", "tabs": ["<id>"]}. strip must equal the file name, only DevTools target ids count, and the file is atomic, 0600 in a 0700 directory;
    • the record times, which only the writing app reads: taken from the boot clock when the app adds the tab to its strip and stored with it. T3 Code keeps them in its thread state; the Launchpad keeps them as "recordedAt": {"<id>": {"boot", "at"}} in its holder file, which the hub ignores. A tab without a time counts as recorded long ago;
    • tabs.json as the hub writes it: {"tabs": ["<id>"], "takenAt": {"boot", "at"}}, where takenAt is when the snapshot began;
    • the order (keptTabs): a list of another boot is ignored and a listed tab stays. A missing tab goes only when takenAt is later than its record; a tab recorded at the same moment or later stays.

    These match holderFileText, parseHolderRecords, LiveTabs and keptTabs in LazurioPlatform's src/browser/people/holds.ts (DEV-6556: require nested AGENTS rewrite after Organization fork #316/Add subscription-backed manual Claude review #318).

  2. A status block now opens the document: it is the target contract, not the deployed state.

I resolved the Codex bot's thread on the same point. Checks: bun run check:docs passed, pr:preflight is ready_to_push, and CI is running on 62f05a8.

@immakermatty

Copy link
Copy Markdown
Contributor Author

One more correction before the re-review: e359e26 names the T3 fork runbook's sections as they are on its main. Its overlay table is under "Overlay" and the refresh is "Přestavba na nový upstream tag"; "Canonical overlay inventory" was the heading of an older revision. The seams also belong in the fork CI's allowed_upstream_changes allowlist. Re-review goes to e359e26 once CI is green.

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immakermatty Exact-head re-review e359e26: obě předchozí výhrady jsou opravené. Úvod výslovně odděluje cílovou smlouvu od dnešního nasazení a kroků F47; holder/recordedAt/tabs.json a pořadí keptTabs souhlasí se zdrojem v LazurioPlatform #318. Opravené názvy „Overlay“ a „Přestavba na nový upstream tag“ odpovídají aktuálnímu runbooku forku. Diff jsou jen tři dokumenty; git diff --check a lokální bun run check:docs prošly, šest kontrol CI je zelených, jediné review vlákno je vyřešeno. Schvaluji pouze tento head; bez merge.

@immakermatty

Copy link
Copy Markdown
Contributor Author

A correction after the approval: a21b90f fixes a wrong claim, and the PR needs a re-review on that head.

The document said an agent-browser daemon ends after an hour without a command, by its default idle timeout, as F47 point 5 said too. For the Environment browser that is not true. agent-browser's default timeout skips a browser it did not launch (blocks_default_idle_shutdown in cli/src/native/browser.rs of Lazurio/agent-browser 83c4241); only an explicit setting ends such a daemon.

The document now says the hour holds once the Platform sets "idleTimeout": "1h" in ~/.agent-browser/config.json, in four places: the status (still to come), how a tab ends, Codex Desktop, and the agent-browser contract. On a timeout the daemon only disconnects, and the hub still decides when the tab ends. The Platform's fix and F47's correction are tracked in Lazurio/LazurioPlatform#326.

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immakermatty Exact-head re-review a21b90f: oprava pravdivě odlišuje výchozí idle timeout od explicitního „idleTimeout: 1h“ pro daemon připojený přes DevTools a ponechává nastavení Platformy jako budoucí krok (#326). Ověřil jsem agent-browser 83c4241: blocks_default_idle_shutdown, načtení konfigurace a BrowserManager::close (připojený prohlížeč nezavírá). Zbytek dokumentu odpovídá rozhodnutím 0191/0195; git diff --check a lokální bun run check:docs prošly. Šest CI kontrol na tomto headu je zelených, 0 nevyřešených vláken. Schvaluji pouze tento head; bez merge.

immakermatty and others added 7 commits October 12, 2026 02:26
… addendum)

Matěj asked for one document that says how Lazurio thinks about the
Environment browser and how it fits T3 Code, Lazurio MausBot and Codex Desktop,
to be followed whenever a fork is updated or upstream or Codex Desktop ships a
new version.

manual/environment-browser.md:
- the principles: one browser per Environment with shared sign-ins; agents work
  through the agent-browser fork; people see a tab only through the Platform's
  view; management from the Launchpad; a tab lives while something holds it;
  Environment boundaries;
- who owns what, and how a tab is born and ends;
- the host app contract;
- each app in turn: T3 Code as the main target, MausBot with the same contract,
  Codex Desktop as a conscious compromise;
- the fork-update rules, and upstream T3 Code's direction as of today (its own
  browser on the T3 server, which the fork must point at the Environment
  browser or turn off).

The decision register's 0191 gains the 2026-10-11 evening addendum (points
24-27) recording Matěj's rules, and manual/README.md lists the document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…et, not deployed state

Pablo's review of 78f136d:
- The holder contract now separates the part the hub reads
  ({strip, label, tabs}) from the record times only the writing app reads.
  T3 Code keeps them in its thread state, the Launchpad as recordedAt
  (id -> {boot, at}) in its holder file. It also gives tabs.json's shape and
  keptTabs' order, as LazurioPlatform's holds.ts has them.
- A status block opens the document: it is the target contract. It says what
  runs today, what waits for review (F47 steps 1-2, #316/#318) and what is
  still to come (steps 3-5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ir current names

The fork's runbook on main names its overlay table "Overlay" and the
refresh "Přestavba na nový upstream tag"; "Canonical overlay inventory"
was the heading of an older revision. Seams also belong in the fork CI's
allowed_upstream_changes allowlist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t by itself

agent-browser's default idle timeout skips a browser it did not launch
(blocks_default_idle_shutdown in cli/src/native/browser.rs). Only an explicit
setting ends such a daemon. So an hour without a command holds only once the
Platform sets idleTimeout in agent-browser's user config. The document now
says so in the status, in how a tab ends, for Codex Desktop and in the
agent-browser contract. On a timeout the daemon only disconnects; the hub
still decides when the tab ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed closes for all (0195 addendum)

Matěj, 2026-10-12, after the T3 Code design for task 501:
- The Launchpad's strip shows the tabs the Launchpad holds, no longer every
  tab of the Environment; Přehled in Nová karta shows every tab in each app.
- × on any strip closes the person's view and lets go for that place, with
  Vrátit. The tab stays in the Environment and in Přehled while anything
  else needs it. Only Přehled's Zavřít closes for everyone.
- T3 Code's thread strip: the panel opens by itself only when the agent
  opens a tab or a new window; closing the last tab closes the panel, as
  upstream does; new tabs keep one order on every device, positions stay
  each device's, and tabs can be dragged (upstream's #17730 ported to
  v0.0.45).

0195 gains points 13-16. The architecture document follows them, and it
records that T3 Code keeps its record times in its holder file like the
Launchpad (the approved task 501 design), so T3 Code's database stays
upstream's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@immakermatty
immakermatty force-pushed the agent/DEV-6646-environment-browser-architecture branch from 8f515f3 to ca394e6 Compare October 12, 2026 00:27
@immakermatty

Copy link
Copy Markdown
Contributor Author

After the approval on a21b90f, Matěj answered the task 501 design and decided one model for all strips. The PR now records it. Re-review needed on ca394e6, which is also rebased onto the new main (5122119):

  • 0195, addendum of 2026-10-12, points 13–16.
    • Every app's strip shows its own place's tabs: a T3 Code thread's tabs, or the tabs the Launchpad holds. Přehled in Nová karta shows every tab in each app.
    • × on any strip closes the person's view and lets go for that place, with Vrátit. The tab stays in the Environment and in Přehled while anything else needs it. Only Přehled's Zavřít closes for everyone.
    • T3 Code's strip: the panel opens by itself only when the agent opens a tab or a window; closing the last tab closes the panel, as upstream does; new tabs keep one order on every device, positions stay each device's, and tabs can be dragged.
    • Point 16 names what it changes in points 9, 10 and 11.
  • The architecture document follows these points: principle 4, how a tab ends, contract point 4, and the Launchpad and T3 Code sections. Contract point 3 now says T3 Code keeps its record times in its holder file like the Launchpad (the approved task 501 design). The open question about tab order is gone.

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@immakermatty Exact-head re-review ca394e6: schvaluji dokumentační změnu, bez merge. Starší schválení na e359e26/a21b90f pro tento head nepřenáším.

Dodatek 0195 (13–16) výslovně mění 9 (lišta Launchpadu jen jeho karty), 10 (Nová karta po poslední kartě jen v Launchpadu) a 11 (Zavřít všem pouze v Přehledu); bod 5 dál platí pro Přehled. Manuál drží stejné rozlišení v principech, konci karty, smlouvě hostitelské aplikace i částech Launchpad/T3 Code. Sdílená karta, archivace vlákna, Vrátit, otevření panelu agentem a globální pořadí nových karet s lokální polohou existujících si neodporují. recordedAt ve holder souboru pro obě aplikace a tabs.json zůstávají konzistentní s již ověřeným kontraktem; cílový stav je odlišen od nasazení. Diff pouze tři dokumenty; git diff --check origin/main...HEAD a lokální bun run check:docs prošly; šest CI kontrol je zelených, 0 nevyřešených vláken, čerstvý main 5122119 se integruje bez konfliktu.

Navazující práce (ne blokace tohoto docs PR): F47 v LazurioPlatform docs/decisions.md na main má dosud staré znění bodů 5/9 a původní poznámku o výchozím timeoutu připojeného agent-browseru. Před implementací kroku 3 jej aktualizujte podle 0195 (13–16) a #326. Nadřazené rozhodnutí i tento manuál už jasně určují cílový kontrakt.

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