web: split app.js into view modules
Pure move, behaviour unchanged: app.js is now the shell (boot, state, client wiring, connection/banner, navigation and routes, render dispatch, header). Views live under src/views with shared DOM and format helpers. client.js stays DOM-free; no circular imports; every server-derived string still uses textContent.
This commit is contained in:
+9
-5
@@ -12,9 +12,10 @@ not this one, decides whether a feature is done.
|
||||
framework and no runtime dependency** — no React/Vue/Svelte, no bundler
|
||||
required. Keep it that way unless a concrete feature cannot be built without
|
||||
one, and say why in the item's note.
|
||||
- **Simple but beautiful**: hand-written CSS (`styles.css`), the app's dark
|
||||
palette and spacing, real attention to hierarchy and detail. "Simple" is about
|
||||
the stack, never about the finish.
|
||||
- **Simple but beautiful**: hand-written CSS split by area (`base.css`,
|
||||
`lists.css`, `run-detail.css`, `chat.css`, `graph.css`, `dialogs.css`,
|
||||
`settings.css`), the app's dark palette and spacing, real attention to
|
||||
hierarchy and detail. "Simple" is about the stack, never about the finish.
|
||||
- **Trusted LAN/VPN only.** The server has no authentication; the page stores
|
||||
nothing but the server URL in `localStorage`. Never bake in a server address,
|
||||
never store secrets, never expose the API to an untrusted network.
|
||||
@@ -27,8 +28,11 @@ not this one, decides whether a feature is done.
|
||||
| `src/serverUrl.js` | `data/transport/ServerUrl.kt` | `validateServerUrl`, `resolveArtifactUrl` |
|
||||
| `src/client.js` | `data/transport/PipelinesClient.kt` | one reused socket, id matching, timeout, backoff. **DOM-free** |
|
||||
| `src/repository.js` | `data/PipelinesRepository.kt` | typed request builders |
|
||||
| `src/app.js` | `ui/**` | the DOM UI. Grow it toward `PARITY.md` |
|
||||
| `index.html`, `styles.css` | — | shell + styling |
|
||||
| `src/app.js` | `ui/**` | page shell: boot, state, client wiring, connection/banner, navigation/routes, render dispatch, header |
|
||||
| `src/dom.js` | — | `h()`, shared DOM helpers and clipboard/share actions |
|
||||
| `src/format.js` | `ui/Format.kt` (DOM-facing bits) | status tone and error-text helpers |
|
||||
| `src/views/*.js` | `ui/**` | one module per destination/dialog surface: attention, settings, pipelines, templates, runs, runDetail, chat, search, dialogs |
|
||||
| `index.html`, `*.css` | — | shell + area styles linked in a fixed order |
|
||||
| `serve.mjs` | — | static server + `/connect` proxy |
|
||||
| `test/*.test.mjs` | `app/src/test/**` | `node --test`, no server needed |
|
||||
| `test/smoke.mjs` | — | protocol smoke against a live server |
|
||||
|
||||
Reference in New Issue
Block a user