You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b10b6c9
Browse filesBrowse the repository at this point in the historyBrowse files
web(look): fixes from an independent review of the look
An agent review that RAN the build (44 findings, each independently
verified) found real defects in the first commit. Fixed:
Layout (web/workspace)
- The switch read the tab model before the extension host had the chat's
tab, so closing the chat and clicking "Editor + chat" left it undocked:
wait on onDidChangeTabs, and for the chat to be the active editor.
- A later choice now stops an earlier arrangement still waiting (the
start-up one resumed and put the chat back on the right).
- A reload's restored empty group is closed on the way to chat-first;
columns, not list order, say which group is on the left.
- Start-up no longer reveals the Explorer or moves focus after the first
time in a workspace (workspaceState, not globalState).
- The layout commands and the folder command are registered before the
store is opened, so a browser that refuses IndexedDB still has them.
- Opening a folder from the computer sets the editor layout.
- No default key binding (Cmd+Alt+L is Find in Selection on macOS).
Chat skin
- Card actions revealed on hover only where there is hover; a tap landed
on rename/delete. Enter/Space resume a card. aria-modal off the docked
list; a /sessions-opened overlay no longer reappears as a modal.
- Accent text and the focus ring use the link colour (was 2.2-2.7:1).
- The footer row is no longer dimmed with opacity (it dimmed its popover).
- The rail and the account card take the theme's palette; the sign-in
dialog scrolls in a short window; the empty state is not clipped; the
chat paints its own ground; starters make sense with no file open.
Workbench
- Code-OSS's own Chat view is hidden for real: create() returns a
disposable, so workbench.commands was undefined and the first attempt
never ran. The gate key is set through the module's commands, again
after the gate's own write at 5 s. The title-bar toggle is hidden.
- editor.padding.top: 24 (the scroll shadow washed out line one).
- No page-level color-scheme: stock webviews (Markdown preview) were
white under a dark theme.
- The build id covers the declarative built-ins' sources.
Tests: unit 73 files on macOS and Linux Node 18; e2e-look 26 checks, ten
runs in a row; the other end-to-end checks unchanged. The test helper
retries F1 (a key sent while the chat takes the focus is lost).
Copy file name to clipboardExpand all lines: docs/WEB.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,21 +104,29 @@ extension, a stylesheet or a build-time edit of the browser build's own copy of
104
104
| First paint |`initialColorTheme` in `web/lib/config.mjs`, picked by `pickInitialTheme` in `web/main.js`| The colours painted for the half second before the theme extension has loaded, so a dark visitor does not see a light flash. |
105
105
| Default theme |`withoutConfigurationDefaults` in `web/lib/extensions.mjs`| An extension's `configurationDefaults`**outrank** the embedder's. `levelcode-themes` pins its own default theme, so the staged copy of it has that key removed (its two themes stay selectable). The desktop source is untouched. |
106
106
| Panels, activity bar |`workbench.experimental.modernUI`, `workbench.activityBar.location: top`, `workbench.layoutControl.type: toggles`| Code-OSS's own switches. `modernUI` is **experimental**: if a bump renames or drops it the editor is still fine, only plainer (`e2e-look.mjs` still passes its theme and layout checks; its screenshots are the thing to look at). |
107
-
| Chrome |`web/chrome.css`, linked by `main.js`**after** the workbench's stylesheet | Hides source control, run and extensions (this edition has none of them), the Outline and Timeline headers and the keyboard-layout status item. The selectors are workbench class names: when a bump stops matching them `e2e-look.mjs` fails on "not offered" rather than the icons quietly coming back. |
108
-
| The workbench's own chat |`hideBuiltInChat` in `main.js`| Code-OSS's Copilot chat view appears in the secondary side bar on the web even with `chat.disableAIFeatures`; it is told it is disabled through an internal context key. Look for a "Chat" tab on the right on a bump. |
107
+
| Chrome |`web/chrome.css`, linked by `main.js`**after** the workbench's stylesheet | Hides the activity-bar entries for source control, run and extensions (this edition has none of them), the Outline and Timeline headers, the keyboard-layout status item and the title bar's secondary-side-bar toggle. The selectors are workbench class names and aria labels: when a bump stops matching them `e2e-look.mjs` fails rather than the icons quietly coming back. Their **menus, palette entries and shortcuts are the workbench's own** and still lead to empty views (Run and Debug, Extensions, Source Control, an empty Terminal panel). |
108
+
| The workbench's own chat |`hideBuiltInChat` in `main.js`| Code-OSS registers its Copilot Chat view on the web even with `chat.disableAIFeatures`, and opened it fills the window with a dead composer ("No default agent contributed"). Its `when` clause is gated by `chatAccountPolicyGateActive`, which nothing else reads; `main.js` sets it (and `chatSetupDisabledInWorkspace`) through the embedder's `commands.executeCommand('_setContext', …)` — the **module's**`commands`: `create()` returns a disposable, not the workbench — and again after five seconds, because the gate's own contribution writes its key again then. `e2e-look.mjs` opens the bar and fails on a "Chat" tab. |
109
+
| Editor padding |`editor.padding.top: 24`|`modernUI` fades the top 24 px of every editor into the ground, line one included. |
110
+
| No page-level `color-scheme`|`index.html`, `boot.css`| A page that declares `color-scheme: dark light` made every stock webview (the Markdown preview) paint an opaque *white* page under a dark theme. The chat page paints its own ground (`body.lc-web { background: … }`) for the same reason. |
109
111
| Welcome page |`web/ai-extension/copy.js`| The desktop opens its walkthrough once, in front of everything. In a tab the chat is the first thing there is; the walkthrough stays in the Command Palette. |
110
112
| The chat page |`web/ai-extension/skin.js` + `skin/chat.css` + `skin/chat.js`| Three exact insertions into the **embedded copy** of `media/chat.html`: a style block, `class="lc-web"` on `<body>`, a nonce'd script. Every rule is under `body.lc-web`; the script sends only messages the page already sends. The build **fails** if chat.html stops having the places the skin is cut into. The desktop's `chat.html` is never edited for this (the desktop suites pin it). |
111
113
112
114
**Layouts.**`levelcode.web.layout` is `chatFirst` (the chat alone, side bars closed, conversations on its
113
115
left — the way a chat app is used) or `split` (Explorer, files on the left, the chat docked on the right — the
114
-
way an editor is used). The status bar item at the left, **LevelCode: Layout: Switch** and `Cmd/Ctrl+Alt+L`
115
-
change the setting; one listener applies it, so Settings does the same. The first start is `chatFirst`. The
116
-
chat panel is not restored by a reload, so a `split` layout is applied again at start. Only existing workbench
117
-
commands are used, so what the visitor then arranges by hand is an ordinary layout.
116
+
way an editor is used). The status bar item at the left and **LevelCode: Layout: Switch** change the setting
117
+
(there is no default key binding: `Cmd+Alt+L` is Find in Selection on macOS); one listener applies it, so Settings
118
+
does the same. The first start in a workspace is `chatFirst`. The chat panel is not restored by a reload, so a
119
+
`split` layout docks the chat again at start — without revealing the Explorer or moving the focus (that is done
120
+
once per workspace, `workspaceState`), so an Explorer the visitor closed stays closed. The start-up and a switch wait
121
+
for the chat's tab to exist (`onDidChangeTabs`, 2.5 s) rather than reading the tab model at a guessed time. Only
122
+
existing workbench commands are used, so what the visitor then arranges by hand is an ordinary layout. Files that are
123
+
open when going back to `chatFirst` stay as tabs beside the chat.
118
124
119
125
**Widths.** The chat page decides by **its own width**, not the window's: from 1000 px it docks the
120
126
conversation list as a 264 px rail; below 760 px it compacts; in between the list is the dialog it is on the
121
-
desktop. In `split` the chat is a narrower column, so it will usually be in the dialog form. The *workbench* is
127
+
desktop. On a touch device (no hover) the rail's card actions are always shown, as in the dialog, and the second
128
+
line gives way; with a mouse they appear on hover or focus. Enter and Space on a card resume it (the desktop's
129
+
card is a `div` with a click handler only; the skin adds the keys). In `split` the chat is a narrower column, so it will usually be in the dialog form. The *workbench* is
122
130
not responsive: below about 760 px the Explorer, tabs and status bar are the desktop's, and a phone is not a
123
131
supported size for this edition yet.
124
132
@@ -129,6 +137,10 @@ Constraints worth knowing before changing it:
129
137
**before** it moves the chat (`applyLayout`, pinned by `workspace.test.js`).
130
138
- The rail asks the page for its conversations with `listSessions`; it must never call `openSessions()`,
131
139
which seeds the list with sample conversations when nothing has arrived yet.
140
+
- Text drawn in the theme's accent uses `textLink.foreground`, not `focusBorder` (which is translucent and a line
141
+
colour: 2.2–2.7:1 as text). The footer row is not dimmed with `opacity`: that dims its popovers as well.
142
+
-`chat.html`'s own palettes for the conversation list and the account card (`--cc-*`, One Dark) are re-pointed at
143
+
the theme by the skin.
132
144
133
145
## Signing in
134
146
@@ -364,6 +376,16 @@ Say these out loud rather than discover them in production:
364
376
landmark at wide widths and the dialog it already was below them.
365
377
-**`workbench.experimental.modernUI` across a Code-OSS bump.** It is the workbench's own experimental flag; the
366
378
pinned checkout was the only one run.
379
+
-**The docked layout after a real browser reload.**`e2e-look.mjs` reloads through the debugger; the workbench
380
+
flushes the Explorer's visibility to its own storage on shutdown, and whether a closed tab always gets that
381
+
flush written was not measured. The layout is applied again at start (the chat docked), the side bar's state is
382
+
the workbench's.
383
+
-**The Markdown preview's content.** The pane's ground is now the theme's (it was white); in headless Chrome the
384
+
preview's body rendered no text on the old and the new build alike, and that was not investigated.
385
+
-**Known and left:** the Command Palette's "Chat: …" commands and the menus of features this edition lacks (above);
386
+
the empty Terminal panel behind the panel toggle (a terminal is the next stage, below); the chat page's
387
+
composer does not move with the soft keyboard on a phone; `levelcode.ai.chat.startLocation: none` is not
388
+
consulted by the layout.
367
389
-**The operating system's folder picker itself.** It needs a person. Everything after it — the command, the
368
390
workbench's `file` provider on a real `FileSystemDirectoryHandle`, the agent's list, read and write — is run
369
391
(`web/test/e2e.mjs` section 5), with the origin-private file system standing in for the picker. Permission
0 commit comments