From 490f099d9aec96c3792e477c4b4cbe9d92458249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 1 Dec 2026 09:06:47 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs:=20the=20crate=20list=20and?= =?UTF-8?q?=20file=20paths=20follow=20the=20forge-web=20split,=20and=20the?= =?UTF-8?q?=20audit=20route=20scan=20reads=20every=20crate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/architecture.md | 12 ++++++++---- docs/ui-language.md | 2 +- scripts/audit/run.sh | 2 +- style/fonts/README.md | 2 +- style/main.scss | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 0fc5994..54ddecb 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -46,8 +46,12 @@ project_git/ forge-core/ domain types, store, migrations, config, secret key, authz, names, passwords, tokens, sessions forge-git/ safe git command builder, process spawn and streaming, pkt-line, repo init, managed gitconfig, version check forge-ssh/ russh server: pubkey auth, exec allow-list and parse, GIT_PROTOCOL env, piping, timeouts - forge-web/ crate, builds the `forge` binary: Topcoat UI, auth, smart-HTTP routes, internal hook API, `hook` subcommand, admin CLI - forge-web-base/ forge-web modules with no routes and no dependency on pages: i18n, render, theme and accents, templates, blobs + forge-web/ builds the `forge` binary: boot, admin CLI, and the route tests that span page crates + forge-web-base/ modules with no routes: i18n, render, theme and accents, templates, blobs + 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 + forge-web-pages/ pages the others build on: repo, tree, issues, pulls core, CI runs, wiki, releases, repo settings + forge-web-account/ account, admin, org and profile pages (on forge-web-pages) + forge-web-repo/ code, commits, pull views, discussions, issue view pages (on forge-web-pages) 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` ``` @@ -239,7 +243,7 @@ Raw and user-uploaded files are served from `user_content_base_url` (for example ### 5.6 Response compression -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: +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: - the content type is text (HTML, CSS, plain text, JSON, SVG, JavaScript); - 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 ### 5.7 Live pages -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. +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. | Page | Stream | Topics it follows | | --- | --- | --- | diff --git a/docs/ui-language.md b/docs/ui-language.md index 62eb32c..a6fe43c 100644 --- a/docs/ui-language.md +++ b/docs/ui-language.md @@ -1,7 +1,7 @@ # Forge page language Every page follows this, with no exceptions. The look lives in one place, `style/_one.scss`, the parts -in `crates/forge-web/src/views/parts.rs`. A page writes structure and classes only: no page has its +in `crates/forge-web-app/src/views/parts.rs`. A page writes structure and classes only: no page has its own button, field, menu, tab, tag or box. If something does not fit, change the part, never the page. `scripts/audit/measure.ts` reads the computed look of every control on every page and reports anything diff --git a/scripts/audit/run.sh b/scripts/audit/run.sh index cd73ba8..cae74ed 100755 --- a/scripts/audit/run.sh +++ b/scripts/audit/run.sh @@ -102,5 +102,5 @@ fi echo "[run] screenshots" AUDIT_PROXY_PORT="${AUDIT_PROXY_PORT:-$((PORT + 10))}" \ - python3 "$ROOT/scripts/audit/shoot.py" "http://127.0.0.1:$PORT" "$OUT" "$ROOT/crates/forge-web/src" 2>&1 | tee "$OUT/shoot.log" + python3 "$ROOT/scripts/audit/shoot.py" "http://127.0.0.1:$PORT" "$OUT" "$ROOT/crates" 2>&1 | tee "$OUT/shoot.log" echo "[run] done: $OUT/index.md" diff --git a/style/fonts/README.md b/style/fonts/README.md index 9c0cb31..8040a5a 100644 --- a/style/fonts/README.md +++ b/style/fonts/README.md @@ -1,6 +1,6 @@ # Bundled fonts -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. +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. | File | Served at | Size (bytes) | SHA-256 | Source | License | |---|---|---|---|---|---| diff --git a/style/main.scss b/style/main.scss index cddc352..e93ef0b 100644 --- a/style/main.scss +++ b/style/main.scss @@ -2,7 +2,7 @@ // No JavaScript; everything here is layout and presentation. // Fonts are bundled, not fetched from a CDN (the CSP is 'self' only). Files live in -// style/fonts/ and are served by crates/forge-web/src/pages/assets.rs under /assets/fonts/. +// style/fonts/ and are served by crates/forge-web-account/src/pages/assets.rs under /assets/fonts/. // Figtree (SIL OFL 1.1) is split into latin and latin-ext subsets, so browsers only fetch // the glyphs a page uses; the unicode-range values come from @fontsource-variable/figtree. @font-face { @@ -4669,7 +4669,7 @@ html.js form.runner-load[data-dirty-form][data-dirty] .runner-save { // CI: runs list and run detail. The split view has the runs on the left and the selected run on the // right. Bars and the timeline are SVG, so their sizes are in viewBox units and need no inline style. -// The timeline sizes match the constants in crates/forge-web/src/pages/ci_runs.rs. +// The timeline sizes match the constants in crates/forge-web-pages/src/pages/ci_runs.rs. .ci-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);