The crate list and file paths follow the forge-web split, and the audit route scan reads every crate
Browse files at this commit490f099d9aec96c3792e477c4b4cbe9d92458249Parent: bdda6d8All checks have passed
Show checks
ci/buildSucceededDetails
- docs
- the crate list and file paths follow the forge-web split, and the audit route scan reads every crate
5 changed files +13 -9
- docs/architecture.md +8 -4
- docs/ui-language.md +1 -1
- scripts/audit/run.sh +1 -1
- style/fonts/README.md +1 -1
- style/main.scss +2 -2
docs/architecture.mdmodified+8 -4
| @@ -46,8 +46,12 @@ project_git/ | |||
| 46 | forge-core/ domain types, store, migrations, config, secret key, authz, names, passwords, tokens, sessions | 46 | forge-core/ domain types, store, migrations, config, secret key, authz, names, passwords, tokens, sessions |
| 47 | forge-git/ safe git command builder, process spawn and streaming, pkt-line, repo init, managed gitconfig, version check | 47 | forge-git/ safe git command builder, process spawn and streaming, pkt-line, repo init, managed gitconfig, version check |
| 48 | forge-ssh/ russh server: pubkey auth, exec allow-list and parse, GIT_PROTOCOL env, piping, timeouts | 48 | forge-ssh/ russh server: pubkey auth, exec allow-list and parse, GIT_PROTOCOL env, piping, timeouts |
| 49 | - forge-web/ crate, builds the `forge` binary: Topcoat UI, auth, smart-HTTP routes, internal hook API, `hook` subcommand, admin CLI | 49 | + forge-web/ builds the `forge` binary: boot, admin CLI, and the route tests that span page crates |
| 50 | - forge-web-base/ forge-web modules with no routes and no dependency on pages: i18n, render, theme and accents, templates, blobs | 50 | + forge-web-base/ modules with no routes: i18n, render, theme and accents, templates, blobs |
| 51 | + forge-web-app/ everything below the pages: state, auth, live, views, CI, mail, backup, replication, git smart-HTTP, LFS, OCI, the HTTP APIs, test_support; its build.rs compiles the stylesheet | ||
| 52 | + forge-web-pages/ pages the others build on: repo, tree, issues, pulls core, CI runs, wiki, releases, repo settings | ||
| 53 | + forge-web-account/ account, admin, org and profile pages (on forge-web-pages) | ||
| 54 | + forge-web-repo/ code, commits, pull views, discussions, issue view pages (on forge-web-pages) | ||
| 51 | forge-e2e/ end-to-end tests. They run `FORGE_BIN` when it is set, so CI tests the binary it ships, and otherwise build `forge` | 55 | forge-e2e/ end-to-end tests. They run `FORGE_BIN` when it is set, so CI tests the binary it ships, and otherwise build `forge` |
| 52 | ``` | 56 | ``` |
| 53 | 57 | ||
| @@ -239,7 +243,7 @@ Raw and user-uploaded files are served from `user_content_base_url` (for example | |||
| 239 | 243 | ||
| 240 | ### 5.6 Response compression | 244 | ### 5.6 Response compression |
| 241 | 245 | ||
| 242 | -Topcoat's builder-wide compression is off on the public router, so it cannot compress git responses by mistake. `crates/forge-web/src/compression.rs` (`ResponseCompression`) runs instead. It gzips or brotlis a response only when all of these hold: | 246 | +Topcoat's builder-wide compression is off on the public router, so it cannot compress git responses by mistake. `crates/forge-web-base/src/compression.rs` (`ResponseCompression`) runs instead. It gzips or brotlis a response only when all of these hold: |
| 243 | 247 | ||
| 244 | - the content type is text (HTML, CSS, plain text, JSON, SVG, JavaScript); | 248 | - the content type is text (HTML, CSS, plain text, JSON, SVG, JavaScript); |
| 245 | - the body size is known and between 32 bytes and 4 MiB (streamed bodies are never compressed); | 249 | - the body size is known and between 32 bytes and 4 MiB (streamed bodies are never compressed); |
| @@ -250,7 +254,7 @@ Content types outside the list (`application/x-git-*`, `application/octet-stream | |||
| 250 | 254 | ||
| 251 | ### 5.7 Live pages | 255 | ### 5.7 Live pages |
| 252 | 256 | ||
| 253 | -Pages update without a reload. A write that changes what a page shows calls `LiveHub::bump` on a topic (`crates/forge-web/src/live.rs`). The page's stream sends one `changed` event, and `nav.js` re-fetches the page in place. The event carries no data and nothing polls. Each stream re-reads a short fingerprint of its page on a wake and sends only when it differs. | 257 | +Pages update without a reload. A write that changes what a page shows calls `LiveHub::bump` on a topic (`crates/forge-web-app/src/live.rs`). The page's stream sends one `changed` event, and `nav.js` re-fetches the page in place. The event carries no data and nothing polls. Each stream re-reads a short fingerprint of its page on a wake and sends only when it differs. |
| 254 | 258 | ||
| 255 | | Page | Stream | Topics it follows | | 259 | | Page | Stream | Topics it follows | |
| 256 | | --- | --- | --- | | 260 | | --- | --- | --- | |
docs/ui-language.mdmodified+1 -1
| @@ -1,7 +1,7 @@ | |||
| 1 | # Forge page language | 1 | # Forge page language |
| 2 | 2 | ||
| 3 | Every page follows this, with no exceptions. The look lives in one place, `style/_one.scss`, the parts | 3 | Every page follows this, with no exceptions. The look lives in one place, `style/_one.scss`, the parts |
| 4 | -in `crates/forge-web/src/views/parts.rs`. A page writes structure and classes only: no page has its | 4 | +in `crates/forge-web-app/src/views/parts.rs`. A page writes structure and classes only: no page has its |
| 5 | own button, field, menu, tab, tag or box. If something does not fit, change the part, never the page. | 5 | own button, field, menu, tab, tag or box. If something does not fit, change the part, never the page. |
| 6 | 6 | ||
| 7 | `scripts/audit/measure.ts` reads the computed look of every control on every page and reports anything | 7 | `scripts/audit/measure.ts` reads the computed look of every control on every page and reports anything |
scripts/audit/run.shmodified+1 -1
| @@ -102,5 +102,5 @@ fi | |||
| 102 | 102 | ||
| 103 | echo "[run] screenshots" | 103 | echo "[run] screenshots" |
| 104 | AUDIT_PROXY_PORT="${AUDIT_PROXY_PORT:-$((PORT + 10))}" \ | 104 | AUDIT_PROXY_PORT="${AUDIT_PROXY_PORT:-$((PORT + 10))}" \ |
| 105 | - python3 "$ROOT/scripts/audit/shoot.py" "http://127.0.0.1:$PORT" "$OUT" "$ROOT/crates/forge-web/src" 2>&1 | tee "$OUT/shoot.log" | 105 | + python3 "$ROOT/scripts/audit/shoot.py" "http://127.0.0.1:$PORT" "$OUT" "$ROOT/crates" 2>&1 | tee "$OUT/shoot.log" |
| 106 | echo "[run] done: $OUT/index.md" | 106 | echo "[run] done: $OUT/index.md" |
style/fonts/README.mdmodified+1 -1
| @@ -1,6 +1,6 @@ | |||
| 1 | # Bundled fonts | 1 | # Bundled fonts |
| 2 | 2 | ||
| 3 | -All three families are embedded in the forge binary (`include_bytes!` in `crates/forge-web/src/pages/assets.rs`) and served from `/assets/fonts/`. All are licensed under the SIL Open Font License 1.1 (OFL-1.1); the license text ships alongside each font. | 3 | +All three families are embedded in the forge binary (`include_bytes!` in `crates/forge-web-account/src/pages/assets.rs`) and served from `/assets/fonts/`. All are licensed under the SIL Open Font License 1.1 (OFL-1.1); the license text ships alongside each font. |
| 4 | 4 | ||
| 5 | | File | Served at | Size (bytes) | SHA-256 | Source | License | | 5 | | File | Served at | Size (bytes) | SHA-256 | Source | License | |
| 6 | |---|---|---|---|---|---| | 6 | |---|---|---|---|---|---| |
style/main.scssmodified+2 -2
| @@ -2,7 +2,7 @@ | |||
| 2 | // No JavaScript; everything here is layout and presentation. | 2 | // No JavaScript; everything here is layout and presentation. |
| 3 | 3 | ||
| 4 | // Fonts are bundled, not fetched from a CDN (the CSP is 'self' only). Files live in | 4 | // Fonts are bundled, not fetched from a CDN (the CSP is 'self' only). Files live in |
| 5 | -// style/fonts/ and are served by crates/forge-web/src/pages/assets.rs under /assets/fonts/. | 5 | +// style/fonts/ and are served by crates/forge-web-account/src/pages/assets.rs under /assets/fonts/. |
| 6 | // Figtree (SIL OFL 1.1) is split into latin and latin-ext subsets, so browsers only fetch | 6 | // Figtree (SIL OFL 1.1) is split into latin and latin-ext subsets, so browsers only fetch |
| 7 | // the glyphs a page uses; the unicode-range values come from @fontsource-variable/figtree. | 7 | // the glyphs a page uses; the unicode-range values come from @fontsource-variable/figtree. |
| 8 | @font-face { | 8 | @font-face { |
| @@ -4669,7 +4669,7 @@ html.js form.runner-load[data-dirty-form][data-dirty] .runner-save { | |||
| 4669 | 4669 | ||
| 4670 | // CI: runs list and run detail. The split view has the runs on the left and the selected run on the | 4670 | // CI: runs list and run detail. The split view has the runs on the left and the selected run on the |
| 4671 | // right. Bars and the timeline are SVG, so their sizes are in viewBox units and need no inline style. | 4671 | // right. Bars and the timeline are SVG, so their sizes are in viewBox units and need no inline style. |
| 4672 | -// The timeline sizes match the constants in crates/forge-web/src/pages/ci_runs.rs. | 4672 | +// The timeline sizes match the constants in crates/forge-web-pages/src/pages/ci_runs.rs. |
| 4673 | .ci-split { | 4673 | .ci-split { |
| 4674 | display: grid; | 4674 | display: grid; |
| 4675 | grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); | 4675 | grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); |