Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3577,3 +3577,93 @@ hashes, and the
wording rule on the elements' text. The page was checked in Chrome against temporary
fixture Folders, local and with a recorded entry, in both languages at 1440×900,
1470×956 and 390×844. These are no rendered-page CI gates (root decision 0178).

**Addendum 2026-10-04, decided by Matěj with Anička (plan DEV-6639): the Organization
rail.** Built to the shell wireframe at `HumanAndMachine-ai/prototypes-lazurio`
1cbad15, its default navigation (`envNav = "org"`), and the design system's selection
rule at `design-system-lazurio` 5bbc1f7 (#54, variant A). Generic kind icons look the same
in every Organization and a wrong click was easy; an Organization's GitHub avatar is
recognised at a glance. So the rail switches Organizations and the head of the left
column picks the Environment. Root decision 0179 (the rail of Environments) is being
amended by the Operator to match. This supersedes, in F36 point 1, the rail's personal
Environments, Organization folders, "+N", the Environment fill in the Organization's
accent and the gear in the rail; in point 7, the three-section Apps (already two since
F32's final addendum), the column's module list and search, the status rows of tiles
and their new-tab arrows, and the Organization picker in the home's head.

1. **Rail** (`<lazurio-rail app="…">`): the Lazurio logo (the personal Dashboard), the
jump to any Environment (⌘⇧E), your personal space marked with your initials, a
divider, one GitHub avatar per Organization (the active one ringed in ink), "+" to
add an Organization in the Dashboard, and at the foot only the account, with your
GitHub photo where known. Labels show at once. A click on a space leads to the last
Environment this browser was in there, else its first, in the same app (Chat, Apps or
Automate); a space without one leads to its Dashboard. No Environment icons, folders
or colour fills, and no gear.
2. **Column head** (`<lazurio-column-head active="…" settings="…">`): the Environment
picker (a glyph, the Environment's name, a line saying who it is for) with the gear
of this Environment's Settings right beside it, then the switch Chat · Apps ·
Automate. The picker drops its list over the column: the Organization's head
(`lz-menu__head`) opening its Dashboard, then its Environments with the current one
checked as "tady jsi", and "Všechny Organizace" widening it to every space. The
panel under the head stays the app's own, which is what the forks need.
3. **Names.** An Environment is never named by its machine's technical name. A Team
Environment is its Team's ("Team Sales", by the Team's display name in the catalog),
an Automated one its persona's Team, a work one "Pracovní", a personal one "Osobní",
a workstation "Tento počítač"; the second line says who it is for (`@login` of a work
Environment's assigned person, "sdílený Teamem", "automatizace", "jen tvůj",
"tento počítač"). The machine's name stays the document's id and in Settings → This
Environment.
4. **Contract, changed in place.** The producer and the elements ship in one binary and
no fork consumes `lazurio.shell.v1` yet, so the shape changes without a compatibility
layer: an Environment's `label` is its own name or null, it gains `assignee`; an
Organization loses `accent` and gains `dashboard`
(`https://dashboard.lazurio.ai/orgs/<slug>`, the Dashboard's canonical
Organization slug); the operator gains `avatar`; the document gains
`addOrganization` (`https://dashboard.lazurio.ai/add-organization`). An
Organization's slug is its manifest's (any nonblank text, here at most 128 characters
without control characters), never held to the GitHub login's rule, which applies
only to `forgeLogin`.
5. **Apps column:** "Všechny moduly", "Soubory", the favourites ("Oblíbené"; a hint
while there are none) and, at the foot, "Marketplace" marked "již brzy", whose page
says it is coming. No search and no module list; a module's overview is reached from
its tile's menu. In Settings the column is their navigation with "Zpět".
6. **Apps home:** the Organization's name with, under it, the Environment you are in,
and "Guide" (the Lazurio documentation) top right. Two sections, Workspace and
Productionspace (repositories, counted as such), without subtitles. Clean tiles:
stone, name, short description, a small star when favourite. The "⋯" menu at a tile's
top right adds or removes the favourite and leads to "Informace o modulu" (the
module's overview) or, for a production repository, "Informace o repozitáři" (its
GitHub page). A click opens the module's app in a new tab as before; a module without
an app, one that cannot start and a repository only say so in a short message in the
wireframe's words. `infra` stays hidden (F32's final addendum, root #486).
7. **Favourites** belong to the person and the Organization. Until the Dashboard account
holds them they are kept in this browser's `localStorage`, one list per Organization
(`lazurio.favorites:<slug>`), never in the Folder, which a Team Environment shares
with its whole Team. They come first in their section in the column's order, and only
those this Environment's catalog has are shown.
8. **"+ Nový modul"** ends Workspace only where this Environment's GitHub identity is an
Owner of the Organization: GitHub's own, live answer (`gh api
user/memberships/orgs/<forge login>`: active, role `admin`), read by the Launchpad
behind the same admission as every read (`GET /api/organizations/<org>/owner`),
bounded by a timeout, kept five minutes per login, failing closed. A Team
Environment (the Team's brokered identity) and an Organization without a bound
GitHub login get no tile, without a call. No local rule stands in for GitHub. Its
click copies the wireframe's prompt to the clipboard and opens this Environment's
Chat in a new tab, with a short message to paste it into a new chat; a workstation
has no Chat origin and only copies. Once the T3 Code fork takes a prompt draft by
link (Lazurio/t3code#35) Chat opens with it in the composer.

**Not in this addendum, each an issue:** "Přístup k modulu" in the tile menu (the
Dashboard's `/orgs/<slug>/application-access` sets a person's access level inside an
application, not which Teams reach a module's repository), remembering the last
Environment after sign-in (the Dashboard's), and Chat opening with the prompt already in
its composer (Lazurio/t3code#35).

Verified by unit and HTTP tests: the contract and its parser, the producer's names (Team,
persona, kind, assigned person) and Dashboards, the rail's spaces and their targets in
each app, the picker's list (one space, all of them, filtered), the Apps sections without
subtitles, tile actions and the wireframe's messages, favourites first and their stored
list read defensively, the Owner answer (only an active admin, cached, a member, a
refusal and a timeout are no, no call on a Team Environment), and the admission of the
Owner route; and in Chrome against temporary fixture Folders, hosted and local, in both
languages.
60 changes: 35 additions & 25 deletions docs/launchpad-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,35 +169,45 @@ was settled by F32's addenda: the read-only `repositories`; `infra` is not liste

## The shell as built (decision F36)

The first cut of the [target shell](#target-shell), DEV-6639; [decision
The [target shell](#target-shell) as built, DEV-6639: [decision
F36](decisions.md#f36--the-lazurio-shell-one-library-in-the-platform-served-at-lazurioshelljs-with-lazurioshelljson-the-launchpad-is-its-first-consumer)
records what is functional and what is a facade until its source exists.
and its addendum of 2026-10-04, the Organization rail of the wireframe at
prototypes-lazurio 1cbad15. Where the target shell above still describes a rail of
Environments, folders and a gear in the rail, the addendum supersedes it.

- **Library.** `src/shell/`: `contract.ts` (`lazurio.shell.v1` and its parser),
`view.ts` (the rail, the switch and the jump list as pure functions), `elements.ts`
(`<lazurio-rail>`, `<lazurio-column-head>`), `styles.ts` (the vendored tokens on
`:host`), `fonts.ts`, `index.ts` (the entry of `/.lazurio/shell.js`) and `vendor/`
(tokens, logo and fonts with their hashes). Tests: `tests/shell.test.ts`,
`tests/launchpad-shell-routes.test.ts`, `tests/apps-view.test.ts`.
- **Routes.** `/.lazurio/shell.js` and `/.lazurio/fonts/<file>` beside the page's
routes (`src/launchpad/page.ts`); `/.lazurio/shell.json` in the server after
admission (`src/launchpad/server.ts`, producer `shell-document.ts`).
- **Page.** `index.html` is rail | column | main. The Apps column and home are
`catalog-panel.ts` over `apps-view.ts`, the frame is `shell.ts` and the switch's
pairing is in `ui.ts`. Settings, Tools, Recovery and Files keep their panels in the
new frame and look. A module's name, line and stone come from its default app's
declaration (title, description, `icon`, tags), carried by the catalog as display-only
`display`; the stone falls back by the root Launchpad's org-agnostic semantic key
(`src/shell/stones.ts`), and the Module's own manifest stays the authority. The
sections below that speak of the sidebar, its footer, the
top bar, T3 Code's colours or Chat and MausBot as sidebar links describe the build
before F36.
`view.ts` (the rail's spaces, the Environment picker's list, names and who lines, the
switch, as pure functions), `elements.ts` (`<lazurio-rail>`, `<lazurio-column-head>`),
`styles.ts` (the vendored tokens on `:host`, the design system's selection rule),
`stones.ts`, `fonts.ts`, `index.ts` (the entry of `/.lazurio/shell.js`) and `vendor/`
(tokens, logo, fonts and stones with their hashes). Tests: `tests/shell.test.ts`,
`tests/launchpad-shell-routes.test.ts`, `tests/apps-view.test.ts`,
`tests/organization-owner.test.ts`.
- **Routes.** `/.lazurio/shell.js`, `/.lazurio/fonts/<file>` and
`/.lazurio/stones/<file>` beside the page's routes (`src/launchpad/page.ts`);
`/.lazurio/shell.json` and `/api/organizations/<org>/owner` in the server after
admission (`src/launchpad/server.ts`, producer `shell-document.ts`, the Owner
answer `organization-owner.ts`).
- **Page.** `index.html` is rail | column | main. The Apps column (all modules, Files,
favourites, Marketplace) and home are `catalog-panel.ts` over `apps-view.ts` and
`favorites.ts`, the frame is `shell.ts`, and the switch's pairing and the new
module's hand-over to Chat are in `ui.ts`. A module's name, line and stone come from
its default app's declaration (title, description, `icon`, tags), carried by the
catalog as display-only `display`; the stone falls back by the root Launchpad's
org-agnostic semantic key, and the Module's own manifest stays the authority.
Favourites live in the browser per Organization. Settings, Tools, Recovery and Files
keep their panels. The sections below that speak of the sidebar, its footer, the top
bar, T3 Code's colours or Chat and MausBot as sidebar links describe the build before
F36.
- **Preview.** A temporary fixture Folder, never a live one: `bun
scripts/preview-launchpad.ts local|hosted cs|en <port>` writes an Organization with root-level and workspace modules in Workspace, two production repositories in Productionspace and an `infra` that is not listed, a synthetic home for Files
and Tools, and with `hosted` a recorded entry plus a loopback proxy that adds the
gateway's Host and cookie. Screenshots come from Chrome through playwright-core.
scripts/preview-launchpad.ts local|hosted cs|en <port>` writes an Organization with
root-level and workspace modules in Workspace, two production repositories in
Productionspace and an `infra` that is not listed, a synthetic home for Files and
Tools whose `gh` answers the Owner question for the example Organization, and with
`hosted` a recorded entry plus a loopback proxy that adds the gateway's Host and
cookie. Screenshots come from Chrome through playwright-core.
- **A fork's snippet** is in decision F36 point 5 and in the target shell's "The forks
and `/.lazurio/`".
and `/.lazurio/`": the rail, and the column head at the top of the fork's sidebar.

## Settings: structure, routes and the T3 Code pattern

Expand Down Expand Up @@ -282,7 +292,7 @@ Escape does not leave Settings from a form field, so an unsaved note is not left
behind by a stray key. T3 Code's settings search, `/` shortcut, resizable sidebar and
per-row reset are not built: the page has three sections and no defaults to reset to.
The General settings keep the explicit Preview → Apply of a Folder change instead of
T3 Code's immediate apply. Icons are Lucide (ISC), inlined as SVG symbols.
T3 Code's immediate apply. Icons are Iconoir (MIT), the design system's interface set, inlined as SVG symbols (Lucide before decision F36's addendum of 2026-10-04).

## Launchpad home: the catalog

Expand Down
27 changes: 23 additions & 4 deletions scripts/preview-launchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Folder, never a live one: `bun scripts/preview-launchpad.ts local|hosted
// cs|en [port]`. One Organization with root-level and workspace modules in
// Workspace, production repositories in Productionspace and an `infra` the
// Launchpad does not list (and a second Organization locally, for the
// picker), a
// synthetic home for Files and Tools. Prints one JSON line: `url` to open
// Launchpad does not list (and a second Organization locally, for the rail),
// a synthetic home for Files and Tools. Prints one JSON line: `url` to open
// (local: with the fragment token) and, hosted, `proxy`: a loopback listener
// that adds the gateway's Host and cookie, which a browser automation routes
// the entry's origin through. Synthetic names only; stop it with Ctrl-C.
Expand All @@ -25,6 +24,7 @@ import { executionOs } from "../src/folder/platform";
import { presetProfile } from "../src/folder/presets";
import { startLaunchpad } from "../src/launchpad/server";
import { toolsEnvironmentOf } from "../src/tools/overview";
import { runTool } from "../src/tools/status";
import {
writeModule,
writeOrganization,
Expand Down Expand Up @@ -134,6 +134,10 @@ if (mode === "local")
// A synthetic home: the Files page shows its Documents, never the account's,
// and the Tools page reads no real tool or sign-in.
const home = join(parent, "home");
await mkdir(join(home, "bin"), { recursive: true });
await writeFile(join(home, "bin", "gh"), "#!/bin/sh\nexit 1\n", {
mode: 0o755,
});
await mkdir(join(home, "Documents", "Nabídky"), { recursive: true });
await mkdir(join(home, "Documents", "Smlouvy"), { recursive: true });
await writeFile(
Expand All @@ -151,7 +155,22 @@ const app = await startLaunchpad(
undefined,
undefined,
mode === "hosted" ? { fetcher: async () => new Response("ok") } : {},
toolsEnvironmentOf({ PATH: "", HOME: home }, process.platform),
// The preview's GitHub identity answers the Owner question of the Apps
// home ("+ Nový modul") as an Owner of the example Organization; no real
// account is asked.
toolsEnvironmentOf(
{ PATH: join(home, "bin"), HOME: home },
process.platform,
async (command, timeoutMs, env) =>
command[1] === "api" &&
command[2]?.startsWith("user/memberships/orgs/example")
? {
exitCode: 0,
stdout: JSON.stringify({ state: "active", role: "admin" }),
stderr: "",
}
: runTool(command, timeoutMs, env),
),
{},
undefined,
undefined,
Expand Down
Loading
Loading