diff --git a/.github/workflows/lazurio-fork-ci.yml b/.github/workflows/lazurio-fork-ci.yml index 11e1ab24ef24..f2aea7f78420 100644 --- a/.github/workflows/lazurio-fork-ci.yml +++ b/.github/workflows/lazurio-fork-ci.yml @@ -71,6 +71,11 @@ jobs: apps/web/src/lazurio/promptDraft.ts apps/web/src/main.tsx apps/web/src/routes/_chat.tsx + # The Lazurio shell slot (issue #33): the loader, the rail, the padding and + # Buddy in index.html, and the column head at the top of the sidebar. The + # shell itself is served by the Environment's Launchpad; without it nothing renders. + apps/web/index.html + apps/web/src/components/AppSidebarLayout.tsx ) unexpected="$(git diff --name-only "$UPSTREAM_SHA..HEAD" | grep -E '^(apps/(web|mobile|desktop)|packages)/' | diff --git a/apps/web/index.html b/apps/web/index.html index c2d164742402..4c0ec0a771c1 100644 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -478,8 +478,21 @@ } T3 Code (Alpha) + + + +
@@ -487,6 +500,7 @@
+ diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsx index 05d965d95d06..acf04704fb18 100644 --- a/apps/web/src/components/AppSidebarLayout.tsx +++ b/apps/web/src/components/AppSidebarLayout.tsx @@ -1,6 +1,8 @@ import { useAtomValue } from "@effect/atom-react"; import * as Schema from "effect/Schema"; import { + createElement, + useCallback, useEffect, useState, useSyncExternalStore, @@ -78,10 +80,10 @@ function readInitialThreadSidebarWidth(): number { } } -function SidebarControl() { +function SidebarControl({ lazurioColumnHeadHeight }: { lazurioColumnHeadHeight: number }) { const usagePageOpen = useLocation({ select: (location) => location.pathname === "/usage" }); const keybindings = useAtomValue(primaryServerKeybindingsAtom); - const { toggleSidebar } = useSidebar(); + const { isMobile, toggleSidebar } = useSidebar(); const isSidebarVisible = useSidebarVisibility(); const environmentIdentificationMode = useEnvironmentIdentificationMode(); const stageBackdropVariant = useSidebarStageBackdropVariant( @@ -132,6 +134,12 @@ function SidebarControl() {
0 + ? { top: `calc(var(--workspace-controls-top) + ${lazurioColumnHeadHeight}px)` } + : undefined + } > { + if (!element || typeof ResizeObserver === "undefined") return; + const observer = new ResizeObserver(() => setLazurioColumnHeadHeight(element.offsetHeight)); + observer.observe(element); + return () => { + observer.disconnect(); + setLazurioColumnHeadHeight(0); + }; + }, []); const [isWindowFullscreen, setIsWindowFullscreen] = useState(() => { const getWindowFullscreenState = window.desktopBridge?.getWindowFullscreenState; return isMacosDesktop && typeof getWindowFullscreenState === "function" @@ -316,6 +335,8 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) { onResize: setSidebarWidth, }} > + {/* Lazurio shell (docs/operations/lazurio-fork-release.md): the Environment picker and the app switch, above the upstream top row. Undefined, it renders nothing. */} + {createElement("lazurio-column-head", { active: "chat", ref: observeLazurioColumnHead })} {isOnSettings ? ( <> @@ -329,7 +350,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) { {children} - + diff --git a/docs/operations/lazurio-fork-release.md b/docs/operations/lazurio-fork-release.md index 7df71f604ad5..5db266bd394f 100644 --- a/docs/operations/lazurio-fork-release.md +++ b/docs/operations/lazurio-fork-release.md @@ -8,8 +8,8 @@ Admin (Matěj, `immakermatty`) ho jen schválí v GitHub environmentu. Lazurio Mašiny. T3 vždy běží v kořeni vlastního hostname (`https://t3code...lazurio.io/`) za TLS reverse proxy. Oficiální desktop a mobilní aplikace se připojují jako neupravení upstream klienti. -Vzhled a branding webového klienta zůstávají upstream; jediný rozhodnutý zásah -do jeho UI je načtení shellu Lazuria (viz [Lazurio shell](#lazurio-shell)). +Vzhled a branding webového klienta zůstávají upstream; jediný zásah do jeho UI +je slot pro shell Lazuria (viz [Lazurio shell](#lazurio-shell)). ## Kanál aktualizací @@ -83,14 +83,15 @@ nabídne normálně. `main` je přesný upstream stable tag a nad ním jen tyto commity: -| Commit | Proč ho Lazurio potřebuje | v0.0.45 | -| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `hosted: configurable client session TTL` | `T3CODE_CLIENT_SESSION_TTL` (Machines nastavuje `365d`). | retain: upstream má pevných 30 dní | -| `hosted: serve behind an explicit HTTPS external origin` | `T3CODE_EXTERNAL_ORIGIN`: server na loopbacku za proxy je dosažitelný zvenku, používá Secure cookie `__Host-t3_session` a mutace a WebSocket upgrady autentizované cookie přijímá jen z tohoto originu. | retain: upstream ekvivalent nemá | -| `hosted: explicit environment label` | `T3CODE_ENVIRONMENT_LABEL` pojmenuje kontejnerový Workspace (například `Acme / Management`). | retain: upstream čte jen `PRETTY_HOSTNAME` a hostname, Machines nastavují proměnnou | -| `feat: in-app update from the configured release channel` | `T3CODE_RELEASE_REPOSITORY` a server-advertised `availableServerUpdate`: Mašina nabízí aktualizaci na nejvyšší vydání z nastaveného repozitáře a instaluje ho tlačítkem Update. Navrženo upstreamu. | retain: upstream má pevné `pingdotgg/t3code` a bere první vydání kanálu | -| `release: Lazurio distribution` | Tento dokument, `Dockerfile.lazurio`, `.dockerignore`, kontraktní test a workflow `lazurio-fork-ci.yml`, `lazurio-cli-archives.yml` a `lazurio-release.yml`. | retain | -| `lazurio: unsent prompt draft by link from the shell` | „+ Nový modul“ otevře Chat se zadáním v poli zprávy nového vlákna, neodeslaným ([Zadání z Launchpadu](#zadání-z-launchpadu)). | retain: upstream nemá vstup pro koncept zprávy zvenku | +| Commit | Proč ho Lazurio potřebuje | v0.0.45 | +| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `hosted: configurable client session TTL` | `T3CODE_CLIENT_SESSION_TTL` (Machines nastavuje `365d`). | retain: upstream má pevných 30 dní | +| `hosted: serve behind an explicit HTTPS external origin` | `T3CODE_EXTERNAL_ORIGIN`: server na loopbacku za proxy je dosažitelný zvenku, používá Secure cookie `__Host-t3_session` a mutace a WebSocket upgrady autentizované cookie přijímá jen z tohoto originu. | retain: upstream ekvivalent nemá | +| `hosted: explicit environment label` | `T3CODE_ENVIRONMENT_LABEL` pojmenuje kontejnerový Workspace (například `Acme / Management`). | retain: upstream čte jen `PRETTY_HOSTNAME` a hostname, Machines nastavují proměnnou | +| `feat: in-app update from the configured release channel` | `T3CODE_RELEASE_REPOSITORY` a server-advertised `availableServerUpdate`: Mašina nabízí aktualizaci na nejvyšší vydání z nastaveného repozitáře a instaluje ho tlačítkem Update. Navrženo upstreamu. | retain: upstream má pevné `pingdotgg/t3code` a bere první vydání kanálu | +| `release: Lazurio distribution` | Tento dokument, `Dockerfile.lazurio`, `.dockerignore`, kontraktní test a workflow `lazurio-fork-ci.yml`, `lazurio-cli-archives.yml` a `lazurio-release.yml`. | retain | +| `lazurio: unsent prompt draft by link from the shell` | „+ Nový modul“ otevře Chat se zadáním v poli zprávy nového vlákna, neodeslaným ([Zadání z Launchpadu](#zadání-z-launchpadu)). | retain: upstream nemá vstup pro koncept zprávy zvenku | +| `feat(web): Lazurio shell slot` | Slot pro shell Lazuria ve webovém klientovi: načtení `/.lazurio/shell.js`, rail vedle aplikace, hlavička sloupce nahoře v sidebaru a Buddy (viz [Lazurio shell](#lazurio-shell)). Mimo Lazurio se nic nevykreslí. | retain: upstream ekvivalent nemá | Nenastavené proměnné zachovají upstream chování. Commit odstraň, jakmile upstream nabídne ekvivalent. Klienty, sdílené balíčky a wire kontrakty @@ -103,46 +104,53 @@ necommitují. ### Lazurio shell -**Rozhodnuto 2026-10-03 (rozhodnutí o shellu Lazuria), implementace čeká.** -V tabulce overlaye ani v allowlistu zatím není. - -V Lazuriu je T3 Code aplikace **Chat** v přepínači Chat · Apps · Automate. -Overlay do webového klienta přidá jen načtení shellu Lazuria: rail -Environmentů, přepínač aplikací v sidebaru T3 a plovoucí bublinu Buddyho. -Shell jsou Web Components se Shadow DOM, takže CSS T3 a Lazuria se navzájem -neovlivní. Servíruje je Launchpad daného Environmentu na stejném originu, za -bránou Environmentu: - -- `/.lazurio/shell.js` definuje ``, `` - a `` ve verzi Launchpadu na tom Environmentu. Nový rail proto - nepotřebuje nové vydání forku. -- `/.lazurio/shell.json` drží data: přihlášeného člověka, Environmenty - a Organizace, adresy aplikací a barvu Organizace. Fork data Lazuria nezná - a sám nic nenačítá. - -Patch bude mít zhruba 20 řádků ve zhruba třech souborech `apps/web`: -`