forge
Explore
Log in

Don't you dare go Hollow

One Lit Thing across the whole app: the accent marks only what is live, selected or primary, depth comes from tone rather than shadows, labels are mono uppercase and titles use Archivo, and all colour settings keep working in light and dark

Browse files at this commit

f74e69ebd058bae605e8d016f7877dd65f2694d9Ahmet Kaan GümüşParent: e832da0
  • style
    • One Lit Thing across the whole app: the accent marks only what is live, selected or primary, depth comes from tone rather than shadows, labels are mono uppercase and titles use Archivo, and all colour settings keep working in light and dark
  • feat
    • the Code tab becomes a timeline: tree and README panes above a dock with the newest CI run and a strip of the last 48 commits, sized by lines changed and marked by run state
    • a run page is one line of header, a Jobs pane, Log and Timeline tabs and the same dock
    • the row you click grows into the title of the page it opens, off for reduced motion
    • empty states and the 404 page are reworded in English and Turkish
  • fix
    • raw escape codes no longer show in a run page's log
  • docs
    • Archivo's source and licence are recorded
Show full message
💄 style: One Lit Thing across the whole app: the accent marks only what is live, selected or primary, depth comes from tone rather than shadows, labels are mono uppercase and titles use Archivo, and all colour settings keep working in light and dark; ✨ feat: the Code tab becomes a timeline: tree and README panes above a dock with the newest CI run and a strip of the last 48 commits, sized by lines changed and marked by run state; a run page is one line of header, a Jobs pane, Log and Timeline tabs and the same dock; the row you click grows into the title of the page it opens, off for reduced motion; empty states and the 404 page are reworded in English and Turkish; 🐛 fix: raw escape codes no longer show in a run page's log; 📝 docs: Archivo's source and licence are recorded

44 changed files +1910 -165

README.mdmodified+1 -1
@@ -243,4 +243,4 @@ CI workflows are TOML files in `.forge/ci.toml` in your repo. Jobs run on runner
243 243
244 forge is free software, licensed under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later).244 forge is free software, licensed under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later).
245 245
246-The web UI bundles the Figtree and IBM Plex Mono fonts, both under the SIL Open Font License 1.1. Licenses and checksums are in `style/fonts/`.246+The web UI bundles the Archivo, Figtree and IBM Plex Mono fonts, all under the SIL Open Font License 1.1. Licenses and checksums are in `style/fonts/`.
crates/forge-git/src/churn.rsadded+85 -0
@@ -0,0 +1,85 @@
1+//! Lines changed per commit, for the history strip on the repo page and the CI page: the newest
2+//! commits reachable from a commit, each counted against its first parent. One `git log` run with
3+//! `--shortstat`, so the output is a few bytes per commit however big the commits are.
4+
5+use std::path::Path;
6+use std::time::Duration;
7+
8+use crate::command::GitEnv;
9+use crate::error::{Error, Result};
10+use crate::history::{git, read_capped, validate_oid};
11+
12+/// Most commits one call returns.
13+pub const MAX_COMMITS: usize = 48;
14+/// Longest a single walk may take. A huge commit is one diff for git to count, so this bounds the
15+/// page's wait; the child is killed when the timeout drops the read.
16+const WALK_TIMEOUT: Duration = Duration::from_secs(5);
17+/// Record start in the `log` format, so a commit's header can be told from its stat line.
18+const REC: u8 = 0x1e;
19+
20+/// One commit and the lines it changed: additions plus deletions against its first parent.
21+/// A root commit counts against the empty tree. Binary files add nothing to the count.
22+#[derive(Debug, Clone, PartialEq, Eq)]
23+pub struct CommitChurn {
24+ pub oid: String,
25+ pub lines: u64,
26+}
27+
28+/// The newest `limit` commits reachable from `head` (a full object id), newest first, capped at
29+/// [`MAX_COMMITS`]. Merge commits count their diff against the first parent only.
30+pub async fn recent_churn(
31+ env: &GitEnv,
32+ repo: &Path,
33+ head: &str,
34+ limit: usize,
35+) -> Result<Vec<CommitChurn>> {
36+ validate_oid(head)?;
37+ let limit = limit.clamp(1, MAX_COMMITS);
38+ let cmd = git(env, "log")
39+ .git_dir(repo)
40+ .arg("--no-color")
41+ .arg("--no-ext-diff")
42+ .arg("--no-textconv")
43+ .arg("--no-renames")
44+ .arg("--root")
45+ .arg("--shortstat")
46+ .arg("--diff-merges=first-parent")
47+ .arg("--format=%x1e%H")
48+ .user_opt("--max-count", &limit.to_string())?
49+ .user_revs(&[head])?;
50+ let read = match tokio::time::timeout(WALK_TIMEOUT, read_capped(cmd)).await {
51+ Ok(read) => read?,
52+ Err(_) => return Err(Error::Failed("commit walk timed out".into())),
53+ };
54+ Ok(parse(&read.0))
55+}
56+
57+/// Splits `log` output into records. Each record is one commit id, then its stat line when the
58+/// commit changed anything.
59+fn parse(buf: &[u8]) -> Vec<CommitChurn> {
60+ buf.split(|&b| b == REC)
61+ .filter_map(|rec| {
62+ let text = String::from_utf8_lossy(rec);
63+ let mut lines = text.lines();
64+ let oid = lines.next()?.trim();
65+ validate_oid(oid).ok()?;
66+ let lines_changed = lines.map(stat_line_total).sum();
67+ Some(CommitChurn {
68+ oid: oid.to_owned(),
69+ lines: lines_changed,
70+ })
71+ })
72+ .collect()
73+}
74+
75+/// The insertions plus deletions in one `--shortstat` line, such as
76+/// " 3 files changed, 10 insertions(+), 2 deletions(-)". Zero for any other line.
77+fn stat_line_total(line: &str) -> u64 {
78+ if !line.contains("changed") {
79+ return 0;
80+ }
81+ line.split(',')
82+ .filter(|part| part.contains("insertion") || part.contains("deletion"))
83+ .filter_map(|part| part.split_whitespace().next()?.parse::<u64>().ok())
84+ .sum()
85+}
crates/forge-git/src/lib.rsmodified+1 -0
@@ -4,6 +4,7 @@ pub mod backup;
4 pub mod blame;4 pub mod blame;
5 pub mod branches;5 pub mod branches;
6 pub mod browse;6 pub mod browse;
7+pub mod churn;
7 pub mod command;8 pub mod command;
8 pub mod error;9 pub mod error;
9 pub mod fsck;10 pub mod fsck;
crates/forge-web/assets/nav.jsmodified+53 -4
@@ -352,6 +352,47 @@
352 else { window.scrollTo(0, 0); }352 else { window.scrollTo(0, 0); }
353 }353 }
354 354
355+ // Continuity: the row a reader clicked grows into the title of the page it opens. The row takes the
356+ // name forge-row once the response has arrived, just before the transition; the new page's main
357+ // heading takes it in the transition's update callback, where the swap runs, after the old state
358+ // is captured. Names are removed when the transition ends, since a duplicate name aborts a transition.
359+ // Without the API or with reduced motion the swap runs as it always has. Only a link from a row
360+ // comes here: live refreshes, back and forward and form posts never animate.
361+ var MORPH_NAME = 'forge-row';
362+
363+ function morph(row, run) {
364+ if (!row || !document.startViewTransition || motionHeld()) { run(); return undefined; }
365+ row.style.viewTransitionName = MORPH_NAME;
366+ return new Promise(function (resolve, reject) {
367+ var ran = false;
368+ var title = null;
369+ function update() {
370+ if (ran) { return; }
371+ ran = true;
372+ // The old row leaves the page now, so its name goes with it.
373+ row.style.viewTransitionName = '';
374+ try { run(); } catch (err) { reject(err); return; }
375+ title = document.querySelector('main h1');
376+ if (title) { title.style.viewTransitionName = MORPH_NAME; }
377+ resolve();
378+ }
379+ var transition;
380+ try {
381+ transition = document.startViewTransition(update);
382+ } catch (err) {
383+ update();
384+ return;
385+ }
386+ // A skipped transition may never call its callback: the swap then runs here instead.
387+ transition.ready.catch(function () { });
388+ transition.updateCallbackDone.then(update, update);
389+ transition.finished.then(function () {
390+ row.style.viewTransitionName = '';
391+ if (title) { title.style.viewTransitionName = ''; }
392+ }, function () { });
393+ });
394+ }
395+
355 // A live change keeps the reader's place in a diff. Before the swap: the first element marked396 // A live change keeps the reader's place in a diff. Before the swap: the first element marked
356 // data-keep-anchor (a diff file, keyed by its path) that is still at least partly in view, and397 // data-keep-anchor (a diff file, keyed by its path) that is still at least partly in view, and
357 // its offset from the top of the view. After the swap: the same key, moved so it sits at that398 // its offset from the top of the view. After the swap: the same key, moved so it sits at that
@@ -499,9 +540,15 @@
499 // A live refresh that lands on another path (a revoked session sent to the login page) is a540 // A live refresh that lands on another path (a revoked session sent to the login page) is a
500 // navigation: it gets a history entry, so the address bar shows where the page now is.541 // navigation: it gets a history entry, so the address bar shows where the page now is.
501 var how = o.how === 'live' && res.url.pathname !== o.target.pathname ? 'nav' : o.how;542 var how = o.how === 'live' && res.url.pathname !== o.target.pathname ? 'nav' : o.how;
502- swap(res.html, dest, how, !!o.keep && res.url.pathname === o.target.pathname);543+ var keep = !!o.keep && res.url.pathname === o.target.pathname;
503- // Other parts of this file follow page changes through this event (list memory, say).544+ var finish = function () {
504- document.dispatchEvent(new CustomEvent('forge:swapped', { detail: { how: how, url: dest } }));545+ swap(res.html, dest, how, keep);
546+ // Other parts of this file follow page changes through this event (list memory, say).
547+ document.dispatchEvent(new CustomEvent('forge:swapped', { detail: { how: how, url: dest } }));
548+ };
549+ // A link from a row swaps inside its transition, and the load counts as done only after it.
550+ if (how === 'nav' && o.morph) { return morph(o.morph, finish); }
551+ finish();
505 }).catch(function () {552 }).catch(function () {
506 if (mark !== latest || o.how === 'live') { return; }553 if (mark !== latest || o.how === 'live') { return; }
507 if (o.post) { o.form.submit(); } else { location.assign(o.dest.href); }554 if (o.post) { o.form.submit(); } else { location.assign(o.dest.href); }
@@ -1532,7 +1579,9 @@
1532 return;1579 return;
1533 }1580 }
1534 saveScroll();1581 saveScroll();
1535- load({ target: withoutHash(url), dest: url, init: GET_INIT, how: 'nav', keep: false, post: false, form: null });1582+ // The row the link sits in, if any: the page it opens grows out of that row (see morph).
1583+ var row = a.closest('[data-kb-row]');
1584+ load({ target: withoutHash(url), dest: url, init: GET_INIT, how: 'nav', keep: false, post: false, form: null, morph: row });
1536 }, true);1585 }, true);
1537 1586
1538 document.addEventListener('submit', function (e) {1587 document.addEventListener('submit', function (e) {
crates/forge-web/src/i18n/code.rsmodified+4 -4
@@ -318,8 +318,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
318 (FilteredTo, Tr) => "Şuna göre filtrelendi: ",318 (FilteredTo, Tr) => "Şuna göre filtrelendi: ",
319 (ClearFilter, En) => "Clear filter",319 (ClearFilter, En) => "Clear filter",
320 (ClearFilter, Tr) => "Filtreyi temizle",320 (ClearFilter, Tr) => "Filtreyi temizle",
321- (NoCommits, En) => "No commits.",321+ (NoCommits, En) => "No commits yet. Push a branch and its history shows up here.",
322- (NoCommits, Tr) => "Commit yok.",322+ (NoCommits, Tr) => "Henüz commit yok. Bir dal gönderin, geçmişi burada görünsün.",
323 (Committed, En) => "committed",323 (Committed, En) => "committed",
324 (Committed, Tr) => "commit etti",324 (Committed, Tr) => "commit etti",
325 (BrowseFilesShort, En) => "Browse files",325 (BrowseFilesShort, En) => "Browse files",
@@ -328,8 +328,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
328 (NewerLink, Tr) => "Daha yeni",328 (NewerLink, Tr) => "Daha yeni",
329 (OlderLink, En) => "Older",329 (OlderLink, En) => "Older",
330 (OlderLink, Tr) => "Daha eski",330 (OlderLink, Tr) => "Daha eski",
331- (NothingHere, En) => "Nothing here yet.",331+ (NothingHere, En) => "Nothing here yet. Push a commit and it shows up.",
332- (NothingHere, Tr) => "Henüz burada bir şey yok.",332+ (NothingHere, Tr) => "Henüz burada bir şey yok. Bir commit gönderin, burada görünsün.",
333 (DefaultBadge, En) => "default",333 (DefaultBadge, En) => "default",
334 (DefaultBadge, Tr) => "varsayılan",334 (DefaultBadge, Tr) => "varsayılan",
335 (TagsTitle, En) => "Tags",335 (TagsTitle, En) => "Tags",
crates/forge-web/src/i18n/community.rsmodified+2 -2
@@ -236,8 +236,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
236 (WikiNoPages, Tr) => "Bu wiki'de henüz sayfa yok.",236 (WikiNoPages, Tr) => "Bu wiki'de henüz sayfa yok.",
237 (CreateFirstPage, En) => "Create the first page",237 (CreateFirstPage, En) => "Create the first page",
238 (CreateFirstPage, Tr) => "İlk sayfayı oluştur",238 (CreateFirstPage, Tr) => "İlk sayfayı oluştur",
239- (NoPagesYet, En) => "No pages yet.",239+ (NoPagesYet, En) => "No pages yet. Create the first page to start the wiki.",
240- (NoPagesYet, Tr) => "Henüz sayfa yok.",240+ (NoPagesYet, Tr) => "Henüz sayfa yok. İlk sayfayı oluşturarak wiki'yi başlatın.",
241 (BackToPage, En) => "Back to page",241 (BackToPage, En) => "Back to page",
242 (BackToPage, Tr) => "Sayfaya dön",242 (BackToPage, Tr) => "Sayfaya dön",
243 (NoChangesYet, En) => "No changes yet.",243 (NoChangesYet, En) => "No changes yet.",
crates/forge-web/src/i18n/integrations.rsmodified+2 -2
@@ -373,8 +373,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
373 (NoDeliveries, Tr) => "Henüz teslimat yok.",373 (NoDeliveries, Tr) => "Henüz teslimat yok.",
374 (NoMirrors, En) => "No mirrors yet.",374 (NoMirrors, En) => "No mirrors yet.",
375 (NoMirrors, Tr) => "Henüz yansı yok.",375 (NoMirrors, Tr) => "Henüz yansı yok.",
376- (NoWebhooks, En) => "No webhooks yet.",376+ (NoWebhooks, En) => "No webhooks yet. Add one to send events to another service.",
377- (NoWebhooks, Tr) => "Henüz web kancası yok.",377+ (NoWebhooks, Tr) => "Henüz web kancası yok. Olayları başka bir servise göndermek için bir tane ekleyin.",
378 (NoneYet, En) => "none yet",378 (NoneYet, En) => "none yet",
379 (NoneYet, Tr) => "henüz yok",379 (NoneYet, Tr) => "henüz yok",
380 (NoResponse, En) => "no response",380 (NoResponse, En) => "no response",
crates/forge-web/src/i18n/issues.rsmodified+2 -2
@@ -461,8 +461,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
461 (K::NewIssue, Lang::Tr) => "Yeni sorun",461 (K::NewIssue, Lang::Tr) => "Yeni sorun",
462 (K::NoIssuesMatch, Lang::En) => "No issues match these filters.",462 (K::NoIssuesMatch, Lang::En) => "No issues match these filters.",
463 (K::NoIssuesMatch, Lang::Tr) => "Bu filtrelerle eşleşen sorun yok.",463 (K::NoIssuesMatch, Lang::Tr) => "Bu filtrelerle eşleşen sorun yok.",
464- (K::NoIssuesYet, Lang::En) => "No issues yet.",464+ (K::NoIssuesYet, Lang::En) => "No issues yet. Open one to start a conversation.",
465- (K::NoIssuesYet, Lang::Tr) => "Henüz sorun yok.",465+ (K::NoIssuesYet, Lang::Tr) => "Henüz sorun yok. Konuşmayı başlatmak için bir sorun açın.",
466 (K::SearchTitles, Lang::En) => "Search titles",466 (K::SearchTitles, Lang::En) => "Search titles",
467 (K::SearchTitles, Lang::Tr) => "Başlıklarda ara",467 (K::SearchTitles, Lang::Tr) => "Başlıklarda ara",
468 (K::IssuesByState, Lang::En) => "Issues by state",468 (K::IssuesByState, Lang::En) => "Issues by state",
crates/forge-web/src/i18n/mod.rsmodified+3 -2
@@ -40,6 +40,7 @@ pub mod push;
40 pub mod releases_ci;40 pub mod releases_ci;
41 pub mod repo_admin;41 pub mod repo_admin;
42 pub mod server_settings;42 pub mod server_settings;
43+pub mod timeline;
43 44
44 /// A UI language. English is the default; Turkish is the only other one for now.45 /// A UI language. English is the default; Turkish is the only other one for now.
45 #[derive(Clone, Copy, Debug, PartialEq, Eq)]46 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
@@ -824,8 +825,8 @@ pub fn t(lang: Lang, key: Key) -> &'static str {
824 (ErrConfirmUsername, En) => "Type your username exactly to confirm.",825 (ErrConfirmUsername, En) => "Type your username exactly to confirm.",
825 (ErrConfirmUsername, Tr) => "Onaylamak için kullanıcı adınızı birebir yazın.",826 (ErrConfirmUsername, Tr) => "Onaylamak için kullanıcı adınızı birebir yazın.",
826 827
827- (NoSshKeys, En) => "No SSH keys yet.",828+ (NoSshKeys, En) => "No SSH keys yet. Add one to push over SSH.",
828- (NoSshKeys, Tr) => "Henüz SSH anahtarı yok.",829+ (NoSshKeys, Tr) => "Henüz SSH anahtarı yok. SSH ile göndermek için bir tane ekleyin.",
829 (NoGpgKeys, En) => "No GPG keys yet.",830 (NoGpgKeys, En) => "No GPG keys yet.",
830 (NoGpgKeys, Tr) => "Henüz GPG anahtarı yok.",831 (NoGpgKeys, Tr) => "Henüz GPG anahtarı yok.",
831 (AddSshKeyTitle, En) => "Add an SSH key",832 (AddSshKeyTitle, En) => "Add an SSH key",
crates/forge-web/src/i18n/pulls.rsmodified+2 -2
@@ -116,8 +116,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
116 (FiltersApplied, Tr) => "Filtreler uygulandı · ",116 (FiltersApplied, Tr) => "Filtreler uygulandı · ",
117 (ClearFilters, En) => "Clear filters",117 (ClearFilters, En) => "Clear filters",
118 (ClearFilters, Tr) => "Filtreleri temizle",118 (ClearFilters, Tr) => "Filtreleri temizle",
119- (NoPullRequestsYet, En) => "No pull requests yet",119+ (NoPullRequestsYet, En) => "No pull requests yet. Push a branch, then open one to propose its changes.",
120- (NoPullRequestsYet, Tr) => "Henüz çekme isteği yok",120+ (NoPullRequestsYet, Tr) => "Henüz çekme isteği yok. Bir dal gönderin, ardından değişikliklerini önermek için bir çekme isteği açın.",
121 (NoPullRequestsMatch, En) => "No pull requests match these filters.",121 (NoPullRequestsMatch, En) => "No pull requests match these filters.",
122 (NoPullRequestsMatch, Tr) => "Bu filtrelere uyan çekme isteği yok.",122 (NoPullRequestsMatch, Tr) => "Bu filtrelere uyan çekme isteği yok.",
123 (SortNewest, En) => "Newest",123 (SortNewest, En) => "Newest",
crates/forge-web/src/i18n/releases_ci.rsmodified+6 -2
@@ -50,6 +50,7 @@ pub enum K {
50 TriggerScheduled,50 TriggerScheduled,
51 NextScheduledRun,51 NextScheduledRun,
52 NoJobs,52 NoJobs,
53+ Jobs,
53 Newer,54 Newer,
54 Older,55 Older,
55 DeletedUser,56 DeletedUser,
@@ -257,6 +258,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
257 (TriggerScheduled, Tr) => "zamanlanmış",258 (TriggerScheduled, Tr) => "zamanlanmış",
258 (NextScheduledRun, En) => "Next scheduled run",259 (NextScheduledRun, En) => "Next scheduled run",
259 (NextScheduledRun, Tr) => "Sonraki zamanlanmış çalıştırma",260 (NextScheduledRun, Tr) => "Sonraki zamanlanmış çalıştırma",
261+ (Jobs, En) => "Jobs",
262+ (Jobs, Tr) => "İşler",
260 (NoJobs, En) => "No jobs.",263 (NoJobs, En) => "No jobs.",
261 (NoJobs, Tr) => "İş yok.",264 (NoJobs, Tr) => "İş yok.",
262 (Newer, En) => "Newer",265 (Newer, En) => "Newer",
@@ -433,8 +436,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
433 (Draft, Tr) => "Taslak",436 (Draft, Tr) => "Taslak",
434 (Latest, En) => "Latest",437 (Latest, En) => "Latest",
435 (Latest, Tr) => "En son",438 (Latest, Tr) => "En son",
436- (NoReleasesYet, En) => "No releases yet.",439+ (NoReleasesYet, En) => "No releases yet. Tag a commit to publish the first one.",
437- (NoReleasesYet, Tr) => "Henüz sürüm yok.",440+ (NoReleasesYet, Tr) => "Henüz sürüm yok. Bir etiket ekleyerek ilk sürümü yayımlayın.",
438 (NoAssetsYet, En) => "No assets yet.",441 (NoAssetsYet, En) => "No assets yet.",
439 (NoAssetsYet, Tr) => "Henüz dosya yok.",442 (NoAssetsYet, Tr) => "Henüz dosya yok.",
440 (NoAssets, En) => "No assets.",443 (NoAssets, En) => "No assets.",
@@ -632,6 +635,7 @@ mod tests {
632 K::NoRunsHint,635 K::NoRunsHint,
633 K::TriggerScheduled,636 K::TriggerScheduled,
634 K::NextScheduledRun,637 K::NextScheduledRun,
638+ K::Jobs,
635 K::NoJobs,639 K::NoJobs,
636 K::Newer,640 K::Newer,
637 K::Older,641 K::Older,
crates/forge-web/src/i18n/timeline.rsadded+46 -0
@@ -0,0 +1,46 @@
1+//! Strings for the history strip and the CI line above it on the repo page and the CI page.
2+
3+use super::Lang;
4+
5+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6+pub enum K {
7+ Timeline,
8+ AllRuns,
9+}
10+
11+pub fn t(lang: Lang, key: K) -> &'static str {
12+ use K::*;
13+ use Lang::*;
14+ match (key, lang) {
15+ (Timeline, En) => "Timeline",
16+ (Timeline, Tr) => "Zaman çizelgesi",
17+ (AllRuns, En) => "All runs",
18+ (AllRuns, Tr) => "Tüm çalıştırmalar",
19+ }
20+}
21+
22+/// "Last 48 commits", the strip's label. `n` is the number of bars drawn.
23+pub fn last_commits(lang: Lang, n: usize) -> String {
24+ match lang {
25+ Lang::En => format!("Last {n} commits"),
26+ Lang::Tr => format!("Son {n} commit"),
27+ }
28+}
29+
30+/// "265 commits", the count beside the CI line.
31+pub fn commit_count(lang: Lang, n: u64) -> String {
32+ match lang {
33+ Lang::En if n == 1 => "1 commit".to_owned(),
34+ Lang::En => format!("{n} commits"),
35+ Lang::Tr => format!("{n} commit"),
36+ }
37+}
38+
39+/// "42 lines changed", the accessible name of a bar.
40+pub fn lines_changed(lang: Lang, n: u64) -> String {
41+ match lang {
42+ Lang::En if n == 1 => "1 line changed".to_owned(),
43+ Lang::En => format!("{n} lines changed"),
44+ Lang::Tr => format!("{n} satır değişti"),
45+ }
46+}
crates/forge-web/src/pages/assets.rsmodified+27 -0
@@ -189,8 +189,13 @@ const PLEX_MONO_600: &[u8] =
189 include_bytes!("../../../../style/fonts/ibm-plex-mono-2.5.0-600.woff2");189 include_bytes!("../../../../style/fonts/ibm-plex-mono-2.5.0-600.woff2");
190 const PLEX_MONO_400_ITALIC: &[u8] =190 const PLEX_MONO_400_ITALIC: &[u8] =
191 include_bytes!("../../../../style/fonts/ibm-plex-mono-2.5.0-400-italic.woff2");191 include_bytes!("../../../../style/fonts/ibm-plex-mono-2.5.0-400-italic.woff2");
192+const ARCHIVO_LATIN: &[u8] =
193+ include_bytes!("../../../../style/fonts/archivo-5.3.0-latin-wdth.woff2");
194+const ARCHIVO_LATIN_EXT: &[u8] =
195+ include_bytes!("../../../../style/fonts/archivo-5.3.0-latin-ext-wdth.woff2");
192 const FIGTREE_LICENSE: &[u8] = include_bytes!("../../../../style/fonts/Figtree-OFL.txt");196 const FIGTREE_LICENSE: &[u8] = include_bytes!("../../../../style/fonts/Figtree-OFL.txt");
193 const PLEX_MONO_LICENSE: &[u8] = include_bytes!("../../../../style/fonts/IBMPlexMono-OFL.txt");197 const PLEX_MONO_LICENSE: &[u8] = include_bytes!("../../../../style/fonts/IBMPlexMono-OFL.txt");
198+const ARCHIVO_LICENSE: &[u8] = include_bytes!("../../../../style/fonts/Archivo-OFL.txt");
194 199
195 type Bytes = (StatusCode, HeaderMap, &'static [u8]);200 type Bytes = (StatusCode, HeaderMap, &'static [u8]);
196 201
@@ -220,6 +225,16 @@ async fn figtree_latin_ext() -> Result<Bytes> {
220 Ok(bytes_response(FIGTREE_LATIN_EXT, "font/woff2", FONT_CACHE))225 Ok(bytes_response(FIGTREE_LATIN_EXT, "font/woff2", FONT_CACHE))
221 }226 }
222 227
228+#[route(GET "/assets/fonts/archivo-5.3.0-latin-wdth.woff2")]
229+async fn archivo_latin() -> Result<Bytes> {
230+ Ok(bytes_response(ARCHIVO_LATIN, "font/woff2", FONT_CACHE))
231+}
232+
233+#[route(GET "/assets/fonts/archivo-5.3.0-latin-ext-wdth.woff2")]
234+async fn archivo_latin_ext() -> Result<Bytes> {
235+ Ok(bytes_response(ARCHIVO_LATIN_EXT, "font/woff2", FONT_CACHE))
236+}
237+
223 #[route(GET "/assets/fonts/ibm-plex-mono-2.5.0-400.woff2")]238 #[route(GET "/assets/fonts/ibm-plex-mono-2.5.0-400.woff2")]
224 async fn plex_mono_400() -> Result<Bytes> {239 async fn plex_mono_400() -> Result<Bytes> {
225 Ok(bytes_response(PLEX_MONO_400, "font/woff2", FONT_CACHE))240 Ok(bytes_response(PLEX_MONO_400, "font/woff2", FONT_CACHE))
@@ -253,6 +268,15 @@ async fn figtree_license() -> Result<Bytes> {
253 ))268 ))
254 }269 }
255 270
271+#[route(GET "/assets/fonts/Archivo-OFL.txt")]
272+async fn archivo_license() -> Result<Bytes> {
273+ Ok(bytes_response(
274+ ARCHIVO_LICENSE,
275+ "text/plain; charset=utf-8",
276+ LICENSE_CACHE,
277+ ))
278+}
279+
256 #[route(GET "/assets/fonts/IBMPlexMono-OFL.txt")]280 #[route(GET "/assets/fonts/IBMPlexMono-OFL.txt")]
257 async fn plex_mono_license() -> Result<Bytes> {281 async fn plex_mono_license() -> Result<Bytes> {
258 Ok(bytes_response(282 Ok(bytes_response(
@@ -275,6 +299,8 @@ mod tests {
275 for uri in [299 for uri in [
276 "/assets/fonts/figtree-5.3.0-latin-wght.woff2",300 "/assets/fonts/figtree-5.3.0-latin-wght.woff2",
277 "/assets/fonts/figtree-5.3.0-latin-ext-wght.woff2",301 "/assets/fonts/figtree-5.3.0-latin-ext-wght.woff2",
302+ "/assets/fonts/archivo-5.3.0-latin-wdth.woff2",
303+ "/assets/fonts/archivo-5.3.0-latin-ext-wdth.woff2",
278 "/assets/fonts/ibm-plex-mono-2.5.0-400.woff2",304 "/assets/fonts/ibm-plex-mono-2.5.0-400.woff2",
279 "/assets/fonts/ibm-plex-mono-2.5.0-500.woff2",305 "/assets/fonts/ibm-plex-mono-2.5.0-500.woff2",
280 "/assets/fonts/ibm-plex-mono-2.5.0-600.woff2",306 "/assets/fonts/ibm-plex-mono-2.5.0-600.woff2",
@@ -300,6 +326,7 @@ mod tests {
300 // Font licences are plain text.326 // Font licences are plain text.
301 for uri in [327 for uri in [
302 "/assets/fonts/Figtree-OFL.txt",328 "/assets/fonts/Figtree-OFL.txt",
329+ "/assets/fonts/Archivo-OFL.txt",
303 "/assets/fonts/IBMPlexMono-OFL.txt",330 "/assets/fonts/IBMPlexMono-OFL.txt",
304 ] {331 ] {
305 let req = Request::builder()332 let req = Request::builder()
crates/forge-web/src/pages/ci_job.rsmodified+2 -2
@@ -83,8 +83,8 @@ fn whole_utf8_len(buf: &[u8]) -> usize {
83 /// past the text, and the number of its first line in the whole log.83 /// past the text, and the number of its first line in the whole log.
84 pub(crate) struct Tail {84 pub(crate) struct Tail {
85 pub(crate) text: String,85 pub(crate) text: String,
86- truncated: bool,86+ pub(crate) truncated: bool,
87- offset: u64,87+ pub(crate) offset: u64,
88 pub(crate) first_line: u64,88 pub(crate) first_line: u64,
89 }89 }
90 90
crates/forge-web/src/pages/ci_runs.rsmodified+326 -11
@@ -39,6 +39,10 @@ use crate::i18n::{
39 releases_ci::{self as g, K},39 releases_ci::{self as g, K},
40 };40 };
41 use crate::pages::ci_estimate::{self, Est, Step};41 use crate::pages::ci_estimate::{self, Est, Step};
42+use crate::pages::ci_job::{Tail, log_tail};
43+use crate::i18n::timeline::{self as tl, K as TK};
44+use crate::pages::repo_side::{commit_strip, run_states, strip_bars};
45+use crate::views::timeline::{StripBar, history_strip};
42 use crate::pages::ci_fail::{self, FailFirst, fail_first_block};46 use crate::pages::ci_fail::{self, FailFirst, fail_first_block};
43 use crate::pages::refs::load_refs;47 use crate::pages::refs::load_refs;
44 use crate::pages::repo::repo_head;48 use crate::pages::repo::repo_head;
@@ -394,6 +398,10 @@ struct JobLine {
394 since: Option<String>,398 since: Option<String>,
395 /// The job id: what the page script keys the row on.399 /// The job id: what the page script keys the row on.
396 id: String,400 id: String,
401+ /// Whether the run page shows this job's log.
402+ selected: bool,
403+ /// The run page's link that selects this job (`?job=`).
404+ pick: String,
397 /// The last non-empty log line, or the queued reason of a job with no output yet.405 /// The last non-empty log line, or the queued reason of a job with no output yet.
398 preview: String,406 preview: String,
399 /// The last lines of the log, at most `LOG_LINES`. Empty when the job has no output.407 /// The last lines of the log, at most `LOG_LINES`. Empty when the job has no output.
@@ -450,9 +458,24 @@ struct RunDetail {
450 gantt: Option<Gantt>,458 gantt: Option<Gantt>,
451 /// The failed job and its first error, shown above the timeline of a failed run.459 /// The failed job and its first error, shown above the timeline of a failed run.
452 failing: Option<FailFirst>,460 failing: Option<FailFirst>,
461+ /// The log of the job the run page selects. None for a run with no jobs.
462+ log: Option<JobLog>,
453 jobs: Vec<JobLine>,463 jobs: Vec<JobLine>,
454 }464 }
455 465
466+/// The log pane of the run page: the selected job's name, its links and the tail of its log.
467+struct JobLog {
468+ name: String,
469+ href: String,
470+ log_href: String,
471+ /// The POST target that runs this job again, for a writer once the job has finished.
472+ rerun: Option<String>,
473+ text: String,
474+ truncated: bool,
475+ offset: String,
476+ first_line: String,
477+}
478+
456 /// A box in an SVG, with its class and its position and size in the SVG's units.479 /// A box in an SVG, with its class and its position and size in the SVG's units.
457 struct Rect {480 struct Rect {
458 class: String,481 class: String,
@@ -1310,7 +1333,7 @@ struct SplitPage {
1310 /// The split view of the runs: the list (left) and the selected run (right). Both routes render it.1333 /// The split view of the runs: the list (left) and the selected run (right). Both routes render it.
1311 /// `number` is the run the URL names. Without one, the newest run of the list page is selected.1334 /// `number` is the run the URL names. Without one, the newest run of the list page is selected.
1312 /// The list is live on every page: a run's state, its hint and its age change on any page of it.1335 /// The list is live on every page: a run's state, its hint and its age change on any page of it.
1313-async fn runs_split(cx: &Cx, number: Option<&str>) -> Result<SplitPage> {1336+async fn runs_split(cx: &Cx, number: Option<&str>, job: Option<&str>) -> Result<SplitPage> {
1314 let owner = path_param::<Owner>(cx);1337 let owner = path_param::<Owner>(cx);
1315 let name = path_param::<Repo>(cx);1338 let name = path_param::<Repo>(cx);
1316 let ctx = load_repo(cx, owner, name).await?;1339 let ctx = load_repo(cx, owner, name).await?;
@@ -1481,6 +1504,7 @@ async fn runs_split(cx: &Cx, number: Option<&str>) -> Result<SplitPage> {
1481 &runners,1504 &runners,
1482 lang,1505 lang,
1483 now,1506 now,
1507+ job,
1484 )1508 )
1485 .await?,1509 .await?,
1486 )1510 )
@@ -1545,8 +1569,10 @@ async fn run_detail(
1545 runners: &HashMap<String, String>,1569 runners: &HashMap<String, String>,
1546 lang: Lang,1570 lang: Lang,
1547 now: i64,1571 now: i64,
1572+ wanted: Option<&str>,
1548 ) -> Result<RunDetail> {1573 ) -> Result<RunDetail> {
1549 let jobs = timings_of(state, &run.id, runners, lang).await?;1574 let jobs = timings_of(state, &run.id, runners, lang).await?;
1575+ let picked = pick_job(&jobs, wanted);
1550 let est = if run.state == RunState::Running {1576 let est = if run.state == RunState::Running {
1551 let samples = state1577 let samples = state
1552 .store1578 .store
@@ -1561,7 +1587,7 @@ async fn run_detail(
1561 let writer = header.writer_csrf.is_some();1587 let writer = header.writer_csrf.is_some();
1562 let mut lines = Vec::with_capacity(jobs.len());1588 let mut lines = Vec::with_capacity(jobs.len());
1563 let mut artifacts = Vec::new();1589 let mut artifacts = Vec::new();
1564- for job in jobs.iter() {1590+ for (index, job) in jobs.iter().enumerate() {
1565 for artifact in state.store.list_artifacts(&job.id).await? {1591 for artifact in state.store.list_artifacts(&job.id).await? {
1566 artifacts.push(ArtifactLine {1592 artifacts.push(ArtifactLine {
1567 href: format!(1593 href: format!(
@@ -1591,6 +1617,8 @@ async fn run_detail(
1591 .is_none_or(|prev: &JobLine| prev.group_of.as_deref() != Some(base));1617 .is_none_or(|prev: &JobLine| prev.group_of.as_deref() != Some(base));
1592 lines.push(JobLine {1618 lines.push(JobLine {
1593 id: job.id.clone(),1619 id: job.id.clone(),
1620+ selected: picked == Some(index),
1621+ pick: format!("{}?job={}", run_href(title, run.number), job.id),
1594 expanded: !tail.is_empty() && starts_expanded(job.state, jobs.len()),1622 expanded: !tail.is_empty() && starts_expanded(job.state, jobs.len()),
1595 preview,1623 preview,
1596 tail: tail.join("\n"),1624 tail: tail.join("\n"),
@@ -1611,6 +1639,35 @@ async fn run_detail(
1611 stopping: job.stopping(),1639 stopping: job.stopping(),
1612 });1640 });
1613 }1641 }
1642+ // The selected job's log: the run page shows one job's log, not every job's tail.
1643+ let log = match picked {
1644+ Some(index) => {
1645+ let job = &jobs[index];
1646+ let Tail {
1647+ text,
1648+ truncated,
1649+ offset,
1650+ first_line,
1651+ } = log_tail(&log_path(&state.config.data_dir, &job.id)).await?;
1652+ let href = job_href(title, &job.id);
1653+ Some(JobLog {
1654+ name: job.name.clone(),
1655+ log_href: format!("{href}/log.txt"),
1656+ href,
1657+ rerun: lines[index].rerun.clone(),
1658+ // Line for line, so line numbers and the byte offset of the stream still match.
1659+ text: text
1660+ .split('\n')
1661+ .map(strip_ansi)
1662+ .collect::<Vec<_>>()
1663+ .join("\n"),
1664+ truncated,
1665+ offset: offset.to_string(),
1666+ first_line: first_line.to_string(),
1667+ })
1668+ }
1669+ None => None,
1670+ };
1614 let can_rerun_failed = writer1671 let can_rerun_failed = writer
1615 && run_finished(&run.state)1672 && run_finished(&run.state)
1616 && jobs.iter().any(|job| {1673 && jobs.iter().any(|job| {
@@ -1670,10 +1727,37 @@ async fn run_detail(
1670 writer_csrf: header.writer_csrf,1727 writer_csrf: header.writer_csrf,
1671 gantt,1728 gantt,
1672 failing,1729 failing,
1730+ log,
1673 jobs: lines,1731 jobs: lines,
1674 })1732 })
1675 }1733 }
1676 1734
1735+/// The job the run page shows: the one `?job=` names, else the first failed job, else the first
1736+/// running one, else the first job. None for a run with no jobs.
1737+fn pick_job(jobs: &[Timing], wanted: Option<&str>) -> Option<usize> {
1738+ wanted
1739+ .and_then(|id| jobs.iter().position(|job| job.id == id))
1740+ .or_else(|| {
1741+ jobs.iter()
1742+ .position(|job| matches!(job.state, JobState::Failure | JobState::Error))
1743+ })
1744+ .or_else(|| jobs.iter().position(|job| job.state == JobState::Running))
1745+ .or_else(|| (!jobs.is_empty()).then_some(0))
1746+}
1747+
1748+/// The job named by `?job=`, if the URL has one.
1749+fn job_from_query(cx: &Cx) -> Option<String> {
1750+ query_value(cx, "job")
1751+}
1752+
1753+/// The value of one query parameter, if the URL has it.
1754+fn query_value(cx: &Cx, key: &str) -> Option<String> {
1755+ let query = uri(cx).query()?;
1756+ form_urlencoded::parse(query.as_bytes())
1757+ .find(|(name, _)| name == key)
1758+ .map(|(_, value)| value.into_owned())
1759+}
1760+
1677 /// The runs page body. The header (the Run workflow and badge menus, the count) is the list's, and the1761 /// The runs page body. The header (the Run workflow and badge menus, the count) is the list's, and the
1678 /// split view sits in the live region. The selected run is marked in the list and drawn on the right.1762 /// split view sits in the live region. The selected run is marked in the list and drawn on the right.
1679 #[component]1763 #[component]
@@ -1858,6 +1942,24 @@ async fn runs_body(
1858 </ul>1942 </ul>
1859 </section>1943 </section>
1860 }1944 }
1945+ run_timeline(lang: lang, run: &run)
1946+ } else {
1947+ <div class="ci-empty">
1948+ <p>(g::t(lang, K::NoRunsYet))</p>
1949+ <p class="muted small">(g::t(lang, K::NoRunsHint))</p>
1950+ </div>
1951+ }
1952+ </section>
1953+ </div>
1954+ })
1955+}
1956+
1957+/// The timeline of the selected run: its gantt with the job connectors, its job list with the last log
1958+/// line of each job, and its artifacts. The list route draws it on the right, and the run page draws it
1959+/// in its Timeline tab.
1960+#[component]
1961+async fn run_timeline(lang: Lang, run: &RunDetail) -> Result<impl View> {
1962+ Ok(view! {
1861 if let Some(g) = run.gantt.as_ref() {1963 if let Some(g) = run.gantt.as_ref() {
1862 <div class="ci-gantt-scroll">1964 <div class="ci-gantt-scroll">
1863 <svg class="ci-gantt" viewBox=(g.view_box.as_str()) role="img" aria-label=(g::t(lang, K::Timeline)) data-origin=(g.origin.as_str()) data-len=(g.len.as_str()) data-live-gantt=(g.live.then_some("true"))>1965 <svg class="ci-gantt" viewBox=(g.view_box.as_str()) role="img" aria-label=(g::t(lang, K::Timeline)) data-origin=(g.origin.as_str()) data-len=(g.len.as_str()) data-live-gantt=(g.live.then_some("true"))>
@@ -1965,12 +2067,193 @@ async fn runs_body(
1965 }2067 }
1966 </ul>2068 </ul>
1967 }2069 }
1968- } else {2070+ })
1969- <div class="ci-empty">2071+}
1970- <p>(g::t(lang, K::NoRunsYet))</p>2072+
1971- <p class="muted small">(g::t(lang, K::NoRunsHint))</p>2073+/// The run page body: a one-line header with the run's actions, the jobs (left) and the selected job's
2074+/// log (right), and the history dock under them. The page fits the window: the panes scroll inside.
2075+/// The live region is the run list's stream, so the page re-renders when a run or a job changes.
2076+#[component]
2077+async fn run_body(
2078+ head: RepoHead,
2079+ lang: Lang,
2080+ notice: Option<(&'static str, bool)>,
2081+ live: Option<String>,
2082+ run: RunDetail,
2083+ owner: String,
2084+ repo: String,
2085+ bars: Vec<StripBar>,
2086+ timeline: bool,
2087+ all_href: String,
2088+) -> Result<impl View> {
2089+ let (fm, fs) = duration_templates(lang);
2090+ Ok(view! {
2091+ repo_head(head: RepoHead { live: String::new(), compact_tabs: true, ..head })
2092+ if let Some((text, is_error)) = notice {
2093+ if is_error {
2094+ alert(message: text)
2095+ } else {
2096+ <section class="card notice" role="status">(text)</section>
2097+ }
2098+ }
2099+ <div data-live=(live.as_deref()) class="ci-run fit-pane" data-run=(run.number) data-now=(now_unix().to_string()) data-fm=(fm.as_str()) data-fs=(fs.as_str())>
2100+ <header class="ci-tl-head">
2101+ <div class="ci-tl-headmain">
2102+ <div class="ci-tl-line">
2103+ <span class="ci-tl-no">(g::t(lang, K::RunNumber)) (run.number)</span>
2104+ <h2 class="ci-tl-title">(headline(run.title.as_str()))</h2>
2105+ <details class="ci-tl-more">
2106+ <summary>(crate::i18n::code::t(lang, crate::i18n::code::K::ShowFullMessage))</summary>
2107+ <p class="small">(run.title.as_str())</p>
2108+ </details>
2109+ </div>
2110+ <div class="ci-tl-meta">
2111+ <span class=(run.state_class.as_str())>(run.state.as_str())</span>
2112+ <span class="muted">(run.trigger.as_str()) " \u{b7} " (run.branch.as_str())</span>
2113+ <a href=(run.commit_href.as_str())><code>(run.commit.as_str())</code></a>
2114+ if !run.actor.is_empty() {
2115+ <span class="muted">(run.actor.as_str())</span>
2116+ }
2117+ if !run.duration.is_empty() {
2118+ if let Some(est) = run.est.as_ref() {
2119+ <span class="ci-tl-dur" data-since=(run.since.as_deref()) data-expected=(est.expected.as_str()) data-left=(est.left.as_str()) data-over=(est.over.as_str()) data-lm=(est.minutes.as_str())>(run.duration.as_str())</span>
2120+ } else {
2121+ <span class="ci-tl-dur" data-since=(run.since.as_deref())>(run.duration.as_str())</span>
2122+ }
2123+ }
2124+ <time class="muted" datetime=(run.when_at.as_str()) data-rel="true">(run.when.as_str())</time>
2125+ <a class="small" href=(all_href.as_str())>(tl::t(lang, TK::AllRuns))</a>
2126+ </div>
2127+ if let Some(est) = run.est.as_ref() {
2128+ <progress class="ci-est ci-est-run" max="100" value=(est.pct.as_str()) data-est="true" data-since=(run.since.as_deref()) data-expected=(est.expected.as_str())></progress>
2129+ }
2130+ </div>
2131+ if let Some(csrf) = run.writer_csrf.as_ref() {
2132+ <div class="ci-actions ci-tl-actions">
2133+ if run.can_approve {
2134+ action_button(action: format!("{}/approve", run.action_base), csrf: csrf.clone(), label: g::t(lang, K::ApproveAndRun))
2135+ }
2136+ if run.can_cancel && run.stopping {
2137+ <button type="button" class="ci-stopping" disabled="disabled">(g::t(lang, K::StoppingButton))</button>
2138+ } else if run.can_cancel {
2139+ action_button(action: format!("{}/cancel", run.action_base), csrf: csrf.clone(), label: g::t(lang, K::Cancel))
2140+ }
2141+ if run.can_rerun_failed {
2142+ action_button(action: format!("{}/rerun-failed", run.action_base), csrf: csrf.clone(), label: g::t(lang, K::RerunFailed))
2143+ }
2144+ action_button(action: format!("{}/rerun", run.action_base), csrf: csrf.clone(), label: g::t(lang, K::Rerun))
1972 </div>2145 </div>
1973 }2146 }
2147+ </header>
2148+ <div class="ci-tl-main">
2149+ <section class="card ci-tl-jobs">
2150+ <h2 class="ci-tl-label">(g::t(lang, K::Jobs))</h2>
2151+ if run.jobs.is_empty() {
2152+ <p class="muted small">(g::t(lang, K::NoJobs))</p>
2153+ } else {
2154+ <ul class="ci-tl-list">
2155+ for job in run.jobs.iter() {
2156+ if let Some(group) = job.group.as_ref() {
2157+ <li class="ci-tl-group">(group.as_str())</li>
2158+ }
2159+ <li class=(job.sub.then_some("ci-tl-sub")) data-kb-row="">
2160+ <a class="ci-tl-job" href=(job.pick.as_str()) aria-current=(if job.selected { "true" } else { "false" })>
2161+ <span class=(job.dot.as_str())></span>
2162+ <span class="ci-tl-name">(job.name.as_str())</span>
2163+ if !job.detail.is_empty() {
2164+ <span class="ci-tl-tag">(job.detail.as_str())</span>
2165+ }
2166+ if job.stopping {
2167+ <span class="muted small">(g::t(lang, K::StateStopping))</span>
2168+ }
2169+ if job.duration.is_empty() {
2170+ <span class="ci-tl-dur muted">(g::t(lang, K::Waiting))</span>
2171+ } else {
2172+ <span class="ci-tl-dur" data-since=(job.since.as_deref())>(job.duration.as_str())</span>
2173+ }
2174+ </a>
2175+ </li>
2176+ }
2177+ </ul>
2178+ }
2179+ if !run.artifacts.is_empty() {
2180+ <h3 class="ci-tl-label">(g::t(lang, K::Artifacts))</h3>
2181+ <ul class="ci-art-list">
2182+ for artifact in run.artifacts.iter() {
2183+ <li>
2184+ <span class="ci-art-name">(artifact.name.as_str())</span>
2185+ <span class="muted small">(artifact.job.as_str()) " \u{b7} " (artifact.size.as_str())</span>
2186+ <a class="ci-art-dl" href=(artifact.href.as_str()) download="">(g::t(lang, K::Download))</a>
2187+ </li>
2188+ }
2189+ </ul>
2190+ if let Some(href) = run.zip_href.as_ref() {
2191+ <a class="button ci-mini" href=(href.as_str()) download="">(g::t(lang, K::DownloadAll))</a>
2192+ }
2193+ }
2194+ </section>
2195+ <section class="card ci-tl-log">
2196+ <input type="radio" name="ci-view" id="ci-view-log" class="ci-tl-radio" checked=(if timeline { None } else { Some("checked") })>
2197+ <input type="radio" name="ci-view" id="ci-view-timeline" class="ci-tl-radio" checked=(if timeline { Some("checked") } else { None })>
2198+ <div class="ci-tl-tabs">
2199+ <label for="ci-view-log" class="ci-tl-tab ci-tl-tab-log">(g::t(lang, K::Log))</label>
2200+ <label for="ci-view-timeline" class="ci-tl-tab ci-tl-tab-timeline">(g::t(lang, K::Timeline))</label>
2201+ </div>
2202+ <div class="ci-tl-panel ci-tl-panel-log">
2203+ if let Some(message) = run.config_error.as_ref() {
2204+ <pre class="ci-config-error">(message.as_str())</pre>
2205+ }
2206+ if !run.warnings.is_empty() {
2207+ <section class="ci-warnings" role="status">
2208+ <p class="ci-warnings-title">(g::t(lang, K::ConfigWarnings))</p>
2209+ <p class="muted small">(g::t(lang, K::ConfigWarningsHint))</p>
2210+ <ul>
2211+ for warning in run.warnings.iter() {
2212+ <li><code>(warning.as_str())</code></li>
2213+ }
2214+ </ul>
2215+ </section>
2216+ }
2217+ if let Some(fail) = run.failing.clone() {
2218+ fail_first_block(lang: lang, fail: fail)
2219+ }
2220+ if let Some(log) = run.log.as_ref() {
2221+ <div class="ci-logbar ci-tl-logbar">
2222+ <span class="ci-tl-label">(g::t(lang, K::Log)) " \u{b7} " (log.name.as_str())</span>
2223+ <input type="search" class="ci-logsearch" data-log-q="true" placeholder=(g::t(lang, K::LogSearch)) aria-label=(g::t(lang, K::LogSearch)) autocomplete="off" spellcheck="false">
2224+ <span class="ci-logcount" data-log-count="true" data-none=(g::t(lang, K::LogNoMatches)) aria-live="polite"></span>
2225+ <button type="button" class="ci-mini" data-log-prev="true" aria-label=(g::t(lang, K::LogPrev)) title=(g::t(lang, K::LogPrev))>"\u{2191}"</button>
2226+ <button type="button" class="ci-mini" data-log-next="true" aria-label=(g::t(lang, K::LogNext)) title=(g::t(lang, K::LogNext))>"\u{2193}"</button>
2227+ <button type="button" class="ci-mini" data-copy-log=(log.log_href.as_str()) data-palette-action="click" data-copied=(g::t(lang, K::CopyDone)) data-failed=(g::t(lang, K::CopyFailed))>(g::t(lang, K::CopyLog))</button>
2228+ <a class="ci-mini" href=(log.href.as_str())>(g::t(lang, K::FullLog))</a>
2229+ if let (Some(action), Some(csrf)) = (log.rerun.as_ref(), run.writer_csrf.as_ref()) {
2230+ <form method="post" action=(action.as_str()) class="inline-form ci-job-rerun">
2231+ <input type="hidden" name="csrf" value=(csrf.as_str())>
2232+ <button type="submit" class="ci-mini">(g::t(lang, K::Rerun))</button>
2233+ </form>
2234+ }
2235+ <span class="ci-logfold" data-log-fold-box="true" hidden="hidden">
2236+ <button type="button" class="ci-mini" data-log-fold="close">(g::t(lang, K::LogCollapseAll))</button>
2237+ <button type="button" class="ci-mini" data-log-fold="open">(g::t(lang, K::LogExpandAll))</button>
2238+ </span>
2239+ </div>
2240+ if log.truncated {
2241+ <p class="muted small">(g::t(lang, K::LogTruncated))</p>
2242+ }
2243+ <pre class="ci-log ci-tl-code" data-live-log="true" data-offset=(log.offset.as_str()) data-first=(log.first_line.as_str())>(log.text.as_str())</pre>
2244+ } else {
2245+ <p class="muted">(g::t(lang, K::NoJobs))</p>
2246+ }
2247+ </div>
2248+ <div class="ci-tl-panel ci-tl-panel-timeline">
2249+ run_timeline(lang: lang, run: &run)
2250+ </div>
2251+ </section>
2252+ </div>
2253+ <section class="repo-dock">
2254+ <div class="dock-history">
2255+ history_strip(lang: lang, owner: owner, repo: repo, bars: bars)
2256+ </div>
1974 </section>2257 </section>
1975 </div>2258 </div>
1976 })2259 })
@@ -1989,17 +2272,19 @@ async fn runs_list_page(cx: &Cx) -> Result<impl View> {
1989 page_title,2272 page_title,
1990 list,2273 list,
1991 detail,2274 detail,
1992- } = runs_split(cx, None).await?;2275+ } = runs_split(cx, None, None).await?;
1993 Ok(view! {2276 Ok(view! {
1994 shell(title: page_title.as_str(), viewer: ctx.viewer.as_ref(),2277 shell(title: page_title.as_str(), viewer: ctx.viewer.as_ref(),
1995 runs_body(head: head, lang: lang, notice: notice, live: live, list: list, detail: detail))2278 runs_body(head: head, lang: lang, notice: notice, live: live, list: list, detail: detail))
1996 })2279 })
1997 }2280 }
1998 2281
1999-/// One run, selected on the right of the list. A run that is not on the list page is still shown.2282+/// One run: its jobs on the left, the log of the selected job on the right and the history dock below.
2283+/// A run that is not on the list page is still shown.
2000 #[page("/{owner}/{repo}/ci/runs/{run_number}")]2284 #[page("/{owner}/{repo}/ci/runs/{run_number}")]
2001 async fn run_page(cx: &Cx) -> Result<impl View> {2285 async fn run_page(cx: &Cx) -> Result<impl View> {
2002 let number = path_param::<RunNumber>(cx).to_owned();2286 let number = path_param::<RunNumber>(cx).to_owned();
2287+ let wanted = job_from_query(cx);
2003 let SplitPage {2288 let SplitPage {
2004 ctx,2289 ctx,
2005 head,2290 head,
@@ -2007,13 +2292,43 @@ async fn run_page(cx: &Cx) -> Result<impl View> {
2007 notice,2292 notice,
2008 live,2293 live,
2009 page_title,2294 page_title,
2010- list,2295+ list: _,
2011 detail,2296 detail,
2012- } = runs_split(cx, Some(&number)).await?;2297+ } = runs_split(cx, Some(&number), wanted.as_deref()).await?;
2298+ let Some(run) = detail else {
2299+ return Err(not_found().into());
2300+ };
2301+ let state = app_context::<AppState>(cx);
2302+ let bars = dock_bars(state, &ctx).await;
2303+ let owner = ctx.repo.owner_name.clone();
2304+ let repo = ctx.repo.name.clone();
2305+ let timeline = query_value(cx, "view").as_deref() == Some("timeline");
2306+ let all_href = ci_href(&title_of(&ctx));
2013 Ok(view! {2307 Ok(view! {
2014 shell(title: page_title.as_str(), viewer: ctx.viewer.as_ref(),2308 shell(title: page_title.as_str(), viewer: ctx.viewer.as_ref(),
2015- runs_body(head: head, lang: lang, notice: notice, live: live, list: list, detail: detail))2309+ run_body(head: head, lang: lang, notice: notice, live: live, run: run, owner: owner, repo: repo, bars: bars, timeline: timeline, all_href: all_href))
2310+ })
2311+}
2312+
2313+/// The dock's bars: the newest commits of the default branch, oldest first, each with its latest CI
2314+/// state. Empty when the branch cannot be read, which draws no strip.
2315+async fn dock_bars(state: &AppState, ctx: &RepoCtx) -> Vec<StripBar> {
2316+ let path = ctx.path.clone();
2317+ let branch = ctx.repo.default_branch.clone();
2318+ let head = tokio::task::spawn_blocking(move || {
2319+ forge_git::browse::resolve_commit(&path, &branch)
2320+ .ok()
2321+ .flatten()
2016 })2322 })
2323+ .await
2324+ .ok()
2325+ .flatten();
2326+ let Some(head) = head else {
2327+ return Vec::new();
2328+ };
2329+ let facts = commit_strip(state, &ctx.repo, &ctx.path, &head).await;
2330+ let ci = run_states(state, &ctx.repo.id).await.unwrap_or_default();
2331+ strip_bars(&facts.commits, &ci)
2017 }2332 }
2018 2333
2019 /// The live `changed` stream of a repo's run list. It is sent on each change of the repo: a run was2334 /// The live `changed` stream of a repo's run list. It is sent on each change of the repo: a run was
crates/forge-web/src/pages/ci_tests.rsmodified+5 -5
@@ -538,10 +538,9 @@ async fn split_view_draws_the_newest_run_or_the_one_named() {
538 .await538 .await
539 .text();539 .text();
540 assert!(named.contains(&format!("data-run=\"{}\"", first.number)));540 assert!(named.contains(&format!("data-run=\"{}\"", first.number)));
541- assert_eq!(541+ // The run page is the focused view now: it links back to the list, and its one aria-current is the
542- current_href(&named),542+ // selected job, not a run row.
543- Some(format!("{RUN_BASE}/runs/{}", first.number).as_str())543+ assert!(named.contains(&format!("href=\"{RUN_BASE}\"")), "All runs link");
544- );
545 assert_eq!(named.matches("aria-current=\"true\"").count(), 1);544 assert_eq!(named.matches("aria-current=\"true\"").count(), 1);
546 545
547 // Thirty runs make two pages. Run 1 is on page 2, so page 1 marks no row and draws run 1.546 // Thirty runs make two pages. Run 1 is on page 2, so page 1 marks no row and draws run 1.
@@ -556,7 +555,8 @@ async fn split_view_draws_the_newest_run_or_the_one_named() {
556 .await555 .await
557 .text();556 .text();
558 assert!(off_page.contains(&format!("data-run=\"{}\"", first.number)));557 assert!(off_page.contains(&format!("data-run=\"{}\"", first.number)));
559- assert_eq!(off_page.matches("aria-current=\"true\"").count(), 0);558+ // The focused run page draws no run list, so no row can be marked there.
559+ assert!(!off_page.contains("ci-run-list"));
560 assert!(off_page.contains(&format!("data-live=\"{RUN_BASE}/events\"")));560 assert!(off_page.contains(&format!("data-live=\"{RUN_BASE}/events\"")));
561 let rows = get(&fx.app, &format!("{RUN_BASE}?page=2"), tahinli.as_deref())561 let rows = get(&fx.app, &format!("{RUN_BASE}?page=2"), tahinli.as_deref())
562 .await562 .await
crates/forge-web/src/pages/commits.rsmodified+2 -0
@@ -288,6 +288,7 @@ async fn commits_page(cx: &Cx) -> Result<impl View> {
288 if has_filter {288 if has_filter {
289 <p class="muted">(g::t(lang, K::FilteredTo)) <code>(filter_text.as_str())</code> " · " <a href=(clear_href.as_str())>(g::t(lang, K::ClearFilter))</a></p>289 <p class="muted">(g::t(lang, K::FilteredTo)) <code>(filter_text.as_str())</code> " · " <a href=(clear_href.as_str())>(g::t(lang, K::ClearFilter))</a></p>
290 }290 }
291+ <div class="commits-fit fit-pane">
291 if empty {292 if empty {
292 empty_state(title: g::t(lang, K::NoCommits),293 empty_state(title: g::t(lang, K::NoCommits),
293 if has_filter {294 if has_filter {
@@ -337,6 +338,7 @@ async fn commits_page(cx: &Cx) -> Result<impl View> {
337 }338 }
338 </nav>339 </nav>
339 }340 }
341+ </div>
340 )342 )
341 })343 })
342 }344 }
crates/forge-web/src/pages/compare.rsmodified+1 -1
@@ -343,7 +343,7 @@ async fn compare_view(
343 }343 }
344 if has_commits {344 if has_commits {
345 <h3>(commits_label.as_str())</h3>345 <h3>(commits_label.as_str())</h3>
346- <ul class="commit-list">346+ <ul class="commit-list compare-commits">
347 for row in rows.iter() {347 for row in rows.iter() {
348 <li class="commit-row">348 <li class="commit-row">
349 <div class="commit-main">349 <div class="commit-main">
crates/forge-web/src/pages/issues_list.rsmodified+5 -2
@@ -1036,7 +1036,7 @@ mod tests {
1036 }1036 }
1037 let empty = send(&fx.router, "GET", &base(), true, None, &[]).await;1037 let empty = send(&fx.router, "GET", &base(), true, None, &[]).await;
1038 assert_eq!(empty.status, 200, "empty list");1038 assert_eq!(empty.status, 200, "empty list");
1039- assert!(empty.text().contains("No issues yet."));1039+ assert!(empty.text().contains("No issues yet. Open one to start a conversation."));
1040 assert_eq!(rows(&empty.text()), 0);1040 assert_eq!(rows(&empty.text()), 0);
1041 let tr = send(1041 let tr = send(
1042 &fx.router,1042 &fx.router,
@@ -1049,7 +1049,10 @@ mod tests {
1049 .await1049 .await
1050 .text();1050 .text();
1051 assert!(tr.contains(">Yeni sorun</a>"), "{tr}");1051 assert!(tr.contains(">Yeni sorun</a>"), "{tr}");
1052- assert!(tr.contains("Henüz sorun yok."), "{tr}");1052+ assert!(
1053+ tr.contains("Henüz sorun yok. Konuşmayı başlatmak için bir sorun açın."),
1054+ "{tr}"
1055+ );
1053 1056
1054 // [refusals] an empty-title draft keeps its body and creates nothing; bad CSRF is 403.1057 // [refusals] an empty-title draft keeps its body and creates nothing; bad CSRF is 403.
1055 let draft = send(1058 let draft = send(
crates/forge-web/src/pages/not_found_page.rsmodified+2 -2
@@ -31,12 +31,12 @@ fn texts(lang: Lang) -> (&'static str, &'static str, &'static str) {
31 match lang {31 match lang {
32 Lang::En => (32 Lang::En => (
33 "Page not found",33 "Page not found",
34- "The page does not exist, or you do not have access to it.",34+ "This page does not exist, or you cannot see it. Check the address, or go back to the start.",
35 "Back to the start",35 "Back to the start",
36 ),36 ),
37 Lang::Tr => (37 Lang::Tr => (
38 "Sayfa bulunamadı",38 "Sayfa bulunamadı",
39- "Sayfa yok ya da erişim izniniz yok.",39+ "Bu sayfa yok ya da görme izniniz yok. Adresi kontrol edin ya da başa dönün.",
40 "Başa dön",40 "Başa dön",
41 ),41 ),
42 }42 }
crates/forge-web/src/pages/pulls_list.rsmodified+1 -1
@@ -404,7 +404,7 @@ mod tests {
404 let fx = fixture(Visibility::Public).await;404 let fx = fixture(Visibility::Public).await;
405 let reply = send(&fx.router, "GET", &base(), true, None, &[]).await;405 let reply = send(&fx.router, "GET", &base(), true, None, &[]).await;
406 assert_eq!(reply.status, 200);406 assert_eq!(reply.status, 200);
407- assert!(reply.text().contains("No pull requests yet"));407+ assert!(reply.text().contains("No pull requests yet. Push a branch, then open one to propose its changes."));
408 assert_eq!(rows(&reply.text()), 0);408 assert_eq!(rows(&reply.text()), 0);
409 }409 }
410 410
crates/forge-web/src/pages/repo.rsmodified+58 -18
@@ -23,7 +23,10 @@ use crate::i18n::{self, Lang};
23 use crate::pages::passkeys::s;23 use crate::pages::passkeys::s;
24 use crate::pages::code_live::{follows_branch, home_live_url};24 use crate::pages::code_live::{follows_branch, home_live_url};
25 use crate::pages::finder::file_finder;25 use crate::pages::finder::file_finder;
26-use crate::pages::repo_side::{repo_ci_line, repo_strip, run_rows, tree_facts};26+use crate::pages::repo_side::{
27+ StripFacts, commit_strip, commit_subject, readme_meta, repo_dock, repo_strip, run_rows,
28+ run_states, strip_bars, tree_facts,
29+};
27 use crate::pages::issue_parts::stamp_unix;30 use crate::pages::issue_parts::stamp_unix;
28 use crate::pages::notifications::watch_form;31 use crate::pages::notifications::watch_form;
29 use crate::pages::packages;32 use crate::pages::packages;
@@ -73,7 +76,7 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
73 description,76 description,
74 archived,77 archived,
75 active,78 active,
76- hide_search,79+ hide_search: _,
77 can_admin,80 can_admin,
78 open_issues,81 open_issues,
79 open_pulls,82 open_pulls,
@@ -90,6 +93,8 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
90 wiki,93 wiki,
91 security,94 security,
92 lang,95 lang,
96+ compact_tabs,
97+ ..
93 } = head;98 } = head;
94 // The title gets its own copies: the view below moves `owner` and `name` into `repo_tabs`.99 // The title gets its own copies: the view below moves `owner` and `name` into `repo_tabs`.
95 let title_owner = owner.clone();100 let title_owner = owner.clone();
@@ -132,7 +137,6 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
132 });137 });
133 let watch_count = g::watching_count(lang, watchers);138 let watch_count = g::watching_count(lang, watchers);
134 let fork_count = g::forks_count(lang, forks);139 let fork_count = g::forks_count(lang, forks);
135- let search_action = repo_href(&owner, &name, "search", "");
136 let mirror_line = mirror.as_ref().map(|source| source.url.clone());140 let mirror_line = mirror.as_ref().map(|source| source.url.clone());
137 // A stamp is shown as a live relative time between the two words; without one, the status is plain text.141 // A stamp is shown as a live relative time between the two words; without one, the status is plain text.
138 let (mirror_before, mirror_after, mirror_at, mirror_status) = match mirror {142 let (mirror_before, mirror_after, mirror_at, mirror_status) = match mirror {
@@ -150,13 +154,22 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
150 None => ("", "", None, String::new()),154 None => ("", "", None, String::new()),
151 };155 };
152 let live_attr = (!live.is_empty()).then(|| live.clone());156 let live_attr = (!live.is_empty()).then(|| live.clone());
157+ // The Code tab has no title row: the path bar names the repo, and the tabs share a row with
158+ // the visibility and the counts and actions at the right end.
159+ let code = active == "code";
160+ // One row for the tabs: the Code tab, or a page that asks for it (`compact_tabs`).
161+ let tabs_head = code || compact_tabs;
162+ let has_origin = fork_line.is_some() || mirror_line.is_some();
153 Ok(view! {163 Ok(view! {
154- <section class="page-head" data-live=(live_attr.as_deref())>164+ <section class=(if tabs_head { "page-head repo-head-code" } else { "page-head" }) data-live=(live_attr.as_deref())>
165+ if !tabs_head || has_origin {
155 <div>166 <div>
156- <div class="repo-title-row">167+ if !tabs_head {
157- <h1 class="repo-title">user_link(shown: title_owner.as_str(), login: title_owner.as_str()) "/" (title_name.as_str())</h1>168+ <div class="repo-title-row">
158- <span class=(badge)>(vis)</span>169+ <h1 class="repo-title">user_link(shown: title_owner.as_str(), login: title_owner.as_str()) "/" (title_name.as_str())</h1>
159- </div>170+ <span class=(badge)>(vis)</span>
171+ </div>
172+ }
160 if let Some((href, label)) = fork_line {173 if let Some((href, label)) = fork_line {
161 <p class="muted small">(g::t(lang, K::ForkedFrom)) <a href=(href.as_str())>(label.as_str())</a></p>174 <p class="muted small">(g::t(lang, K::ForkedFrom)) <a href=(href.as_str())>(label.as_str())</a></p>
162 }175 }
@@ -170,7 +183,14 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
170 </p>183 </p>
171 }184 }
172 </div>185 </div>
186+ }
187+ if tabs_head {
188+ repo_tabs(owner: owner.clone(), repo: name.clone(), default_branch: default_branch.clone(), active: active.clone(), can_admin: can_admin, lang: lang, open_issues: Some(open_issues), open_pulls: Some(open_pulls), discussions: discussions, wiki: wiki, security: security)
189+ }
173 <div class="header-actions">190 <div class="header-actions">
191+ if tabs_head {
192+ <span class=(badge)>(vis)</span>
193+ }
174 if let Some((action, csrf)) = fork_control {194 if let Some((action, csrf)) = fork_control {
175 <form method="post" action=(action.as_str()) class="fork-form">195 <form method="post" action=(action.as_str()) class="fork-form">
176 <input type="hidden" name="csrf" value=(csrf.as_str())>196 <input type="hidden" name="csrf" value=(csrf.as_str())>
@@ -200,16 +220,13 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
200 (g::t(lang, K::ArchivedNotice))220 (g::t(lang, K::ArchivedNotice))
201 </section>221 </section>
202 }222 }
203- // The description and code search belong to the Code tab only; sub-pages keep the compact head.223+ // The description belongs to the Code tab only; sub-pages keep the compact head.
204- if active == "code" && !description.is_empty() {224+ if code && !description.is_empty() {
205 <p class="lead">(description.as_str())</p>225 <p class="lead">(description.as_str())</p>
206 }226 }
207- if active == "code" && !hide_search {227+ if !tabs_head {
208- <form method="get" action=(search_action.as_str()) class="repo-search" role="search">228+ repo_tabs(owner: owner.clone(), repo: name.clone(), default_branch: default_branch.clone(), active: active.clone(), can_admin: can_admin, lang: lang, open_issues: Some(open_issues), open_pulls: Some(open_pulls), discussions: discussions, wiki: wiki, security: security)
209- <input type="search" name="q" placeholder=(g::t(lang, K::SearchCodePlaceholder)) aria-label=(g::t(lang, K::SearchCodePlaceholder))>
210- </form>
211 }229 }
212- repo_tabs(owner: owner, repo: name, default_branch: default_branch, active: active, can_admin: can_admin, lang: lang, open_issues: Some(open_issues), open_pulls: Some(open_pulls), discussions: discussions, wiki: wiki, security: security)
213 })230 })
214 }231 }
215 232
@@ -490,10 +507,28 @@ async fn repo_page(cx: &Cx) -> Result<impl View> {
490 repo_href(&owner_name, &repo_name, "archive", &format!("{branch}.zip")),507 repo_href(&owner_name, &repo_name, "archive", &format!("{branch}.zip")),
491 repo_href(&owner_name, &repo_name, "archive", &format!("{branch}.tar.gz")),508 repo_href(&owner_name, &repo_name, "archive", &format!("{branch}.tar.gz")),
492 );509 );
510+ // The dock: the history strip of the newest commits (cached per head) and the latest run's
511+ // commit subject. Empty repos have no tree, so they have no dock.
512+ let strip = match &head {
513+ Some(commit) if tree.is_some() => commit_strip(state, repo, &ctx.path, commit).await,
514+ _ => StripFacts::default(),
515+ };
516+ let ci_states = run_states(state, &repo.id).await?;
517+ let bars = strip_bars(&strip.commits, &ci_states);
518+ let total = strip.total;
519+ let subject = match runs.first() {
520+ Some(run) => commit_subject(state, &ctx.path, &run.commit).await,
521+ None => None,
522+ };
523+ let search_href = repo_href(&owner_name, &repo_name, "search", "");
524+ let show_search = !header.hide_search;
525+ let has_chips = latest.is_some() || !packages.is_empty();
493 Ok(view! {526 Ok(view! {
494 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),527 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
495 repo_head(head: header)528 repo_head(head: header)
496- repo_strip(lang: lang, facts: facts, release: latest, packages: packages)529+ if has_chips {
530+ repo_strip(lang: lang, facts: None, release: latest, packages: packages)
531+ }
497 if !banners.is_empty() {532 if !banners.is_empty() {
498 recent_pushes(banners: banners, now: now, lang: lang)533 recent_pushes(banners: banners, now: now, lang: lang)
499 }534 }
@@ -505,20 +540,25 @@ async fn repo_page(cx: &Cx) -> Result<impl View> {
505 branches_href: branches_href, tags_href: tags_href)540 branches_href: branches_href, tags_href: tags_href)
506 file_finder(lang: lang, owner: owner_name.clone(), repo: repo_name.clone(),541 file_finder(lang: lang, owner: owner_name.clone(), repo: repo_name.clone(),
507 ref_name: branch.clone())542 ref_name: branch.clone())
543+ if show_search {
544+ <a class="small repo-search-link" href=(search_href.as_str())>(g::t(lang, K::SearchCodePlaceholder))</a>
545+ }
508 clone_popover(https: https, ssh: ssh, downloads: Some(downloads), lang: lang)546 clone_popover(https: https, ssh: ssh, downloads: Some(downloads), lang: lang)
509 </div>547 </div>
510- repo_ci_line(lang: lang, runs: runs, ci_href: ci_href)
511 tree_table(rows: rows, latest: bar, lang: lang)548 tree_table(rows: rows, latest: bar, lang: lang)
512 </div>549 </div>
513 <div class="repo-split" role="separator" aria-orientation="vertical"550 <div class="repo-split" role="separator" aria-orientation="vertical"
514 aria-label=(s(lang, "Resize file tree", "Dosya ağacını boyutlandır")) tabindex="0"551 aria-label=(s(lang, "Resize file tree", "Dosya ağacını boyutlandır")) tabindex="0"
515 data-repo-split=""></div>552 data-repo-split=""></div>
516 <div class="repo-readme">553 <div class="repo-readme">
554+ readme_meta(lang: lang, facts: facts)
517 if let Some(readme) = readme {555 if let Some(readme) = readme {
518 readme_card(name: readme.name, markdown: readme.markdown, body: readme.body)556 readme_card(name: readme.name, markdown: readme.markdown, body: readme.body)
519 }557 }
520 </div>558 </div>
521 </div>559 </div>
560+ repo_dock(lang: lang, runs: runs, subject: subject, total: total, ci_href: ci_href,
561+ owner: owner_name.clone(), repo: repo_name.clone(), bars: bars)
522 } else {562 } else {
523 <div class="browse-bar">563 <div class="browse-bar">
524 clone_popover(https: https, ssh: ssh, downloads: None, lang: lang)564 clone_popover(https: https, ssh: ssh, downloads: None, lang: lang)
@@ -712,7 +752,7 @@ mod tests {
712 assert!(body.contains("default"), "default branch marked");752 assert!(body.contains("default"), "default branch marked");
713 let (status, body) = get(&router, "/tahinli/demo/tags").await;753 let (status, body) = get(&router, "/tahinli/demo/tags").await;
714 assert_eq!(status, 200);754 assert_eq!(status, 200);
715- assert!(body.contains("Nothing here yet"));755+ assert!(body.contains("Nothing here yet. Push a commit and it shows up."));
716 let (status, body) = get(&router, "/tahinli/demo/tree/main").await;756 let (status, body) = get(&router, "/tahinli/demo/tree/main").await;
717 assert_eq!(status, 200);757 assert_eq!(status, 200);
718 assert!(body.contains("README.md"));758 assert!(body.contains("README.md"));
crates/forge-web/src/pages/repo_ctx.rsmodified+4 -0
@@ -60,6 +60,9 @@ pub struct RepoHead {
60 pub active: &'static str,60 pub active: &'static str,
61 /// Hide the header's code-search box (the code search page draws its own).61 /// Hide the header's code-search box (the code search page draws its own).
62 pub hide_search: bool,62 pub hide_search: bool,
63+ /// One row for the header: no title row, the tabs at the left and the counts and actions at the
64+ /// right, as on the Code tab. Set by the pages that have their own top (the CI run page).
65+ pub compact_tabs: bool,
63 /// Whether the viewer may open the Settings tab.66 /// Whether the viewer may open the Settings tab.
64 pub can_admin: bool,67 pub can_admin: bool,
65 /// Open issues, for the Issues tab count.68 /// Open issues, for the Issues tab count.
@@ -236,6 +239,7 @@ impl RepoCtx {
236 last_ok: mirror.last_ok,239 last_ok: mirror.last_ok,
237 });240 });
238 Ok(RepoHead {241 Ok(RepoHead {
242+ compact_tabs: false,
239 lang: self.lang,243 lang: self.lang,
240 owner: self.repo.owner_name.clone(),244 owner: self.repo.owner_name.clone(),
241 name: self.repo.name.clone(),245 name: self.repo.name.clone(),
crates/forge-web/src/pages/repo_side.rsmodified+164 -33
@@ -9,6 +9,7 @@ use std::sync::{Mutex, OnceLock};
9 9
10 use forge_core::ci::{JobState, RunState};10 use forge_core::ci::{JobState, RunState};
11 use forge_core::Repo;11 use forge_core::Repo;
12+use forge_git::churn::{self, CommitChurn};
12 use forge_git::{browse, history};13 use forge_git::{browse, history};
13 use time::OffsetDateTime;14 use time::OffsetDateTime;
14 use time::format_description::well_known::Rfc3339;15 use time::format_description::well_known::Rfc3339;
@@ -17,6 +18,7 @@ use topcoat::view::{View, component, view};
17 18
18 use crate::i18n::Lang;19 use crate::i18n::Lang;
19 use crate::i18n::releases_ci as rc;20 use crate::i18n::releases_ci as rc;
21+use crate::i18n::timeline::{self as tl, K as TK};
20 use crate::pages::ci_estimate::{self, Est, Step};22 use crate::pages::ci_estimate::{self, Est, Step};
21 use crate::pages::ci_runs::{duration_templates, duration_text, run_href, state_text};23 use crate::pages::ci_runs::{duration_templates, duration_text, run_href, state_text};
22 use crate::pages::packages::PackageLink;24 use crate::pages::packages::PackageLink;
@@ -24,10 +26,14 @@ use crate::pages::passkeys::s;
24 use crate::pages::releases::LatestRelease;26 use crate::pages::releases::LatestRelease;
25 use crate::repo_stats::{LangShare, languages, license_file, license_id};27 use crate::repo_stats::{LangShare, languages, license_file, license_id};
26 use crate::state::AppState;28 use crate::state::AppState;
29+use crate::views::commit_line::commit_line;
30+use crate::views::timeline::{StripBar, history_strip};
27 use crate::views::{human_size, now_unix, rel_time, short_oid};31 use crate::views::{human_size, now_unix, rel_time, short_oid};
28 32
29 /// CI runs the home page shows: the newest.33 /// CI runs the home page shows: the newest.
30 const RUNS_SHOWN: u32 = 1;34 const RUNS_SHOWN: u32 = 1;
35+/// Runs read to find the latest run of each strip commit: one page, the most the store lists.
36+const STRIP_RUNS: u32 = 100;
31 /// Languages listed before the rest fold into "Other".37 /// Languages listed before the rest fold into "Other".
32 const TOP_LANGUAGES: usize = 4;38 const TOP_LANGUAGES: usize = 4;
33 /// Files the language count reads at most.39 /// Files the language count reads at most.
@@ -111,14 +117,93 @@ pub async fn tree_facts(
111 Ok(facts)117 Ok(facts)
112 }118 }
113 119
120+/// The history strip's commits and the repo's commit count, for one head commit.
121+#[derive(Clone, Default)]
122+pub struct StripFacts {
123+ /// The newest commits, newest first, each with the lines it changed.
124+ pub commits: Vec<CommitChurn>,
125+ pub total: u64,
126+}
127+
128+/// Strip facts by repo id, with the head commit they were read at.
129+fn strip_cache() -> &'static Mutex<HashMap<String, (String, StripFacts)>> {
130+ static CACHE: OnceLock<Mutex<HashMap<String, (String, StripFacts)>>> = OnceLock::new();
131+ CACHE.get_or_init(|| Mutex::new(HashMap::new()))
132+}
133+
134+/// The history strip's facts for `repo` at `head`, read once per head commit and kept in memory,
135+/// since they only change with a push. A failed or timed-out read gives empty facts, which draws no
136+/// strip, and is not cached, so the next load tries again.
137+pub async fn commit_strip(state: &AppState, repo: &Repo, path: &Path, head: &str) -> StripFacts {
138+ if let Some((at, facts)) = strip_cache().lock().expect("strip cache").get(&repo.id)
139+ && at == head
140+ {
141+ return facts.clone();
142+ }
143+ let walk = churn::recent_churn(&state.git, path, head, churn::MAX_COMMITS);
144+ let count = history::count(&state.git, path, head, None);
145+ let (commits, total) = tokio::join!(walk, count);
146+ let (commits, total) = match (commits, total) {
147+ (Ok(commits), Ok(total)) => (commits, total),
148+ (Err(e), _) | (_, Err(e)) => {
149+ tracing::warn!(error = %e, "history strip read failed");
150+ return StripFacts::default();
151+ }
152+ };
153+ let facts = StripFacts { commits, total };
154+ let mut map = strip_cache().lock().expect("strip cache");
155+ // Bounded like the tree facts: at the cap the map is dropped and refills on the next reads.
156+ if map.len() >= 512 {
157+ map.clear();
158+ }
159+ map.insert(repo.id.clone(), (head.to_owned(), facts.clone()));
160+ facts
161+}
162+
163+/// The state of each commit's latest CI run among the repo's newest runs, by commit id. Read on
164+/// every load, since runs change without a push.
165+pub async fn run_states(state: &AppState, repo_id: &str) -> Result<HashMap<String, RunState>> {
166+ let (runs, _) = state.store.list_runs(repo_id, 1, STRIP_RUNS).await?;
167+ let mut out = HashMap::new();
168+ // Newest first, so the first run seen for a commit is its latest.
169+ for run in runs {
170+ out.entry(run.commit_oid).or_insert(run.state);
171+ }
172+ Ok(out)
173+}
174+
175+/// The strip's bars, oldest first, from the newest-first commits and the runs' states.
176+pub fn strip_bars(commits: &[CommitChurn], ci: &HashMap<String, RunState>) -> Vec<StripBar> {
177+ commits
178+ .iter()
179+ .rev()
180+ .map(|commit| StripBar {
181+ oid: commit.oid.clone(),
182+ lines: commit.lines,
183+ ci: ci.get(&commit.oid).copied(),
184+ })
185+ .collect()
186+}
187+
188+/// The subject of a commit, for the CI line. None when it cannot be read.
189+pub async fn commit_subject(state: &AppState, path: &Path, oid: &str) -> Option<String> {
190+ history::log(&state.git, path, oid, None, 0, 1)
191+ .await
192+ .ok()?
193+ .into_iter()
194+ .next()
195+ .map(|commit| commit.summary)
196+}
197+
114 /// One CI run as the column shows it: a link to the run, its dot, and one line of words. A run198 /// One CI run as the column shows it: a link to the run, its dot, and one line of words. A run
115-/// still going has a bar of the jobs done and a clock that ticks.199+/// still going has a clock that ticks.
116 pub struct RunRow {200 pub struct RunRow {
117 pub href: String,201 pub href: String,
118 pub number: i64,202 pub number: i64,
203+ pub state: RunState,
204+ /// The full commit id the run tests.
205+ pub commit: String,
119 pub dot: &'static str,206 pub dot: &'static str,
120- /// The bar's fill and its job count, for a run still going.
121- pub bar: Option<(String, String)>,
122 /// Unix seconds the run started, for the ticking clock of a run still going.207 /// Unix seconds the run started, for the ticking clock of a run still going.
123 pub since: Option<String>,208 pub since: Option<String>,
124 /// The text before the clock: the current job's name.209 /// The text before the clock: the current job's name.
@@ -170,7 +255,7 @@ pub async fn run_rows(state: &AppState, lang: Lang, repo: &Repo) -> Result<Vec<R
170 .strip_prefix("refs/heads/")255 .strip_prefix("refs/heads/")
171 .or_else(|| run.git_ref.strip_prefix("refs/tags/"))256 .or_else(|| run.git_ref.strip_prefix("refs/tags/"))
172 .unwrap_or(&run.git_ref);257 .unwrap_or(&run.git_ref);
173- let (bar, since, pre, label, est) = if matches!(run.state, RunState::Running | RunState::Queued)258+ let (since, pre, label, est) = if matches!(run.state, RunState::Running | RunState::Queued)
174 {259 {
175 let current = jobs260 let current = jobs
176 .iter()261 .iter()
@@ -183,8 +268,6 @@ pub async fn run_rows(state: &AppState, lang: Lang, repo: &Repo) -> Result<Vec<R
183 } else {268 } else {
184 current269 current
185 };270 };
186- // A sliver shows even before the first job is done.
187- let fill = if done == 0 { 0.2 } else { done as f64 };
188 let since_stamp = started.unwrap_or(run.created_at.as_str());271 let since_stamp = started.unwrap_or(run.created_at.as_str());
189 let took = duration_text(lang, Some(since_stamp), None);272 let took = duration_text(lang, Some(since_stamp), None);
190 let est = if run.state == RunState::Running {273 let est = if run.state == RunState::Running {
@@ -215,7 +298,6 @@ pub async fn run_rows(state: &AppState, lang: Lang, repo: &Repo) -> Result<Vec<R
215 None => took,298 None => took,
216 };299 };
217 (300 (
218- Some((format!("{fill}"), total.max(1).to_string())),
219 unix(since_stamp).map(|secs| secs.to_string()),301 unix(since_stamp).map(|secs| secs.to_string()),
220 (!current.is_empty()).then(|| format!("{current} \u{b7} ")),302 (!current.is_empty()).then(|| format!("{current} \u{b7} ")),
221 label,303 label,
@@ -244,13 +326,14 @@ pub async fn run_rows(state: &AppState, lang: Lang, repo: &Repo) -> Result<Vec<R
244 } else {326 } else {
245 format!("{word} \u{b7} {took}")327 format!("{word} \u{b7} {took}")
246 };328 };
247- (None, None, None, label, None)329+ (None, None, label, None)
248 };330 };
249 rows.push(RunRow {331 rows.push(RunRow {
250 href: run_href(&title, run.number),332 href: run_href(&title, run.number),
251 number: run.number,333 number: run.number,
334+ state: run.state,
335+ commit: run.commit_oid.clone(),
252 dot: run_dot(run.state),336 dot: run_dot(run.state),
253- bar,
254 since,337 since,
255 pre,338 pre,
256 label,339 label,
@@ -374,39 +457,87 @@ pub async fn repo_strip(
374 })457 })
375 }458 }
376 459
377-/// The newest CI run as one line over the tree, with a link to all runs. A run still going has460+/// The README pane's header line: the license, the size and the top language, as text at the
378-/// its bar of jobs done and a ticking clock, as the CI pages do.461+/// right end. The full language split is the title. Nothing when the tree has no facts.
462+#[component]
463+pub async fn readme_meta(lang: Lang, facts: Option<TreeFacts>) -> Result<impl View> {
464+ let facts = facts.unwrap_or_default();
465+ let mut parts: Vec<String> = Vec::new();
466+ if let Some((file, id)) = facts.license.as_ref() {
467+ parts.push(if id.is_empty() { file.clone() } else { id.clone() });
468+ }
469+ if facts.size > 0 {
470+ parts.push(human_size(lang, facts.size));
471+ }
472+ if let Some(share) = facts.languages.first() {
473+ parts.push(format!("{} {}%", lang_name(lang, share), share.percent));
474+ }
475+ let all = facts
476+ .languages
477+ .iter()
478+ .map(|share| format!("{} {}%", lang_name(lang, share), share.percent))
479+ .collect::<Vec<_>>()
480+ .join(", ");
481+ let text = parts.join(" \u{b7} ");
482+ let show = !parts.is_empty();
483+ Ok(view! {
484+ if show {
485+ <div class="readme-head">
486+ <span class="readme-meta" title=(all.as_str())>(text.as_str())</span>
487+ </div>
488+ }
489+ })
490+}
491+
492+/// The repo page's bottom dock, always shown: the newest CI run in one line (its dot, number,
493+/// state, sha, commit subject and, while it goes, the elapsed and the time left), the commit count
494+/// and a link to all runs; under it the history strip. The clock attributes on the root let the
495+/// page's ticker count a running run.
379 #[component]496 #[component]
380-pub async fn repo_ci_line(lang: Lang, runs: Vec<RunRow>, ci_href: String) -> Result<impl View> {497+pub async fn repo_dock(
498+ lang: Lang,
499+ runs: Vec<RunRow>,
500+ subject: Option<String>,
501+ total: u64,
502+ ci_href: String,
503+ owner: String,
504+ repo: String,
505+ bars: Vec<StripBar>,
506+) -> Result<impl View> {
381 // The clock: the server's time and the duration words the page's ticker rewrites with.507 // The clock: the server's time and the duration words the page's ticker rewrites with.
382 let now = now_unix();508 let now = now_unix();
383 let (fm, fs) = duration_templates(lang);509 let (fm, fs) = duration_templates(lang);
510+ let commits = tl::commit_count(lang, total);
511+ let all_runs = tl::t(lang, TK::AllRuns);
512+ let aria = tl::t(lang, TK::Timeline);
384 Ok(view! {513 Ok(view! {
385- if let Some(run) = runs.first() {514+ <section class="repo-dock" aria-label=(aria) data-now=(now.to_string()) data-fm=(fm.as_str()) data-fs=(fs.as_str())>
386- <div class="repo-ci" data-now=(now.to_string()) data-fm=(fm.as_str()) data-fs=(fs.as_str())>515+ <div class="dock-info">
387- <a class="side-run-link" href=(run.href.as_str()) title=(run.title.as_str())>516+ if let Some(run) = runs.first() {
388- <span class=(run.dot)></span>517+ <a class="dock-run" href=(run.href.as_str()) title=(run.title.as_str())>
389- <span class="side-run-name">(format!("CI #{}", run.number))</span>518+ <span class=(run.dot)></span>
390- if let Some(est) = run.est.as_ref() {519+ <span class="side-run-name">(format!("CI #{}", run.number))</span>
391- <progress class="side-run-bar" max="100" value=(est.pct.as_str()) data-est="true" data-since=(run.since.as_deref()) data-expected=(est.expected.as_str())></progress>520+ </a>
392- } else if let Some((value, max)) = run.bar.as_ref() {521+ <span class="dock-state">(state_text(lang, run.state.as_str()))</span>
393- <progress class="side-run-bar" value=(value.as_str()) max=(max.as_str())></progress>522+ <span class="sha">(short_oid(&run.commit))</span>
523+ if let Some(subject) = subject.as_ref() {
524+ <span class="dock-subject">commit_line(subject: subject.clone())</span>
394 }525 }
395- <span class="side-run-text muted">526+ if let Some(since) = run.since.as_deref() {
396- if let Some(since) = run.since.as_deref() {527+ if let Some(est) = run.est.as_ref() {
397- if let Some(est) = run.est.as_ref() {528+ <span class="dock-clock muted" data-since=(since) data-pre=(run.pre.as_deref()) data-expected=(est.expected.as_str()) data-left=(est.left.as_str()) data-over=(est.over.as_str()) data-lm=(est.minutes.as_str())>(run.label.as_str())</span>
398- <span data-since=(since) data-pre=(run.pre.as_deref()) data-expected=(est.expected.as_str()) data-left=(est.left.as_str()) data-over=(est.over.as_str()) data-lm=(est.minutes.as_str())>(run.label.as_str())</span>
399- } else {
400- <span data-since=(since) data-pre=(run.pre.as_deref())>(run.label.as_str())</span>
401- }
402 } else {529 } else {
403- (run.label.as_str())530+ <span class="dock-clock muted" data-since=(since) data-pre=(run.pre.as_deref())>(run.label.as_str())</span>
404 }531 }
405- </span>532+ }
406- </a>533+ }
407- <a class="small" href=(ci_href.as_str())>(s(lang, "All runs", "Tüm çalıştırmalar"))</a>534+ <span class="dock-count muted small">(commits.as_str())</span>
535+ <a class="small dock-all" href=(ci_href.as_str())>(all_runs)</a>
408 </div>536 </div>
409- }537+ <div class="dock-history">
538+ history_strip(lang: lang, owner: owner, repo: repo, bars: bars)
539+ </div>
540+ </section>
410 })541 })
411 }542 }
412 543
crates/forge-web/src/views/mod.rsmodified+1 -0
@@ -7,6 +7,7 @@ pub mod diff;
7 pub mod heatmap;7 pub mod heatmap;
8 pub mod repo_list;8 pub mod repo_list;
9 pub mod review_thread;9 pub mod review_thread;
10+pub mod timeline;
10 11
11 use std::sync::OnceLock;12 use std::sync::OnceLock;
12 13
crates/forge-web/src/views/timeline.rsadded+109 -0
@@ -0,0 +1,109 @@
1+//! The history strip: one bar per recent commit, oldest on the left and newest on the right. Each
2+//! bar is a link to its commit. Heights are log-scaled against the window's largest commit. A
3+//! commit whose latest CI run failed is red, and the newest commit is live while its run goes.
4+
5+use forge_core::ci::RunState;
6+use topcoat::Result;
7+use topcoat::view::{View, component, view};
8+
9+use super::{repo_href, short_oid};
10+use crate::i18n::Lang;
11+use crate::i18n::timeline::{self as tl, K};
12+
13+/// The shortest bar, as a share of the strip, so a tiny commit still shows.
14+pub const MIN_BAR_PERCENT: u32 = 6;
15+
16+/// One commit on the strip. `ci` is the state of the commit's latest CI run, if it has one.
17+pub struct StripBar {
18+ pub oid: String,
19+ pub lines: u64,
20+ pub ci: Option<RunState>,
21+}
22+
23+/// A bar's height in percent of the strip. Log-scaled against `max`, the window's largest
24+/// commit, so one huge commit does not flatten the rest. Never below [`MIN_BAR_PERCENT`].
25+pub fn bar_percent(lines: u64, max: u64) -> u32 {
26+ if max == 0 {
27+ return MIN_BAR_PERCENT;
28+ }
29+ let share = (lines as f64 + 1.0).ln() / (max as f64 + 1.0).ln();
30+ let pct = (share * 100.0).round() as u32;
31+ pct.clamp(MIN_BAR_PERCENT, 100)
32+}
33+
34+/// The tone class of a bar: live for the newest commit while its run goes, bad when its latest
35+/// run failed, neutral otherwise.
36+fn tone(ci: Option<RunState>, newest: bool) -> &'static str {
37+ match ci {
38+ Some(RunState::Running | RunState::Queued) if newest => "hs-live",
39+ Some(RunState::Failure | RunState::Error) => "hs-bad",
40+ _ => "hs-neutral",
41+ }
42+}
43+
44+/// One bar as the view draws it: its classes, link and accessible name.
45+struct BarView {
46+ class: String,
47+ href: String,
48+ label: String,
49+}
50+
51+/// The strip for `bars`, given oldest first. Fewer than two commits draw nothing. The label
52+/// counts the bars drawn.
53+#[component]
54+pub async fn history_strip(
55+ lang: Lang,
56+ owner: String,
57+ repo: String,
58+ bars: Vec<StripBar>,
59+) -> Result<impl View> {
60+ let show = bars.len() >= 2;
61+ let max = bars.iter().map(|bar| bar.lines).max().unwrap_or(0);
62+ let newest = bars.len().saturating_sub(1);
63+ let heading = tl::last_commits(lang, bars.len());
64+ let aria = tl::t(lang, K::Timeline);
65+ let items: Vec<BarView> = bars
66+ .into_iter()
67+ .enumerate()
68+ .map(|(i, bar)| BarView {
69+ class: format!(
70+ "hs-bar {} hs-h-{}",
71+ tone(bar.ci, i == newest),
72+ bar_percent(bar.lines, max)
73+ ),
74+ href: repo_href(&owner, &repo, "commit", &bar.oid),
75+ label: format!(
76+ "{} \u{b7} {}",
77+ short_oid(&bar.oid),
78+ tl::lines_changed(lang, bar.lines)
79+ ),
80+ })
81+ .collect();
82+ Ok(view! {
83+ if show {
84+ <div class="history-strip">
85+ <p class="history-label label">(heading.as_str())</p>
86+ <div class="history-bars" role="group" aria-label=(aria)>
87+ for item in items.iter() {
88+ <a class=(item.class.as_str()) href=(item.href.as_str()) aria-label=(item.label.as_str()) title=(item.label.as_str())></a>
89+ }
90+ </div>
91+ </div>
92+ }
93+ })
94+}
95+
96+#[cfg(test)]
97+mod tests {
98+ use super::*;
99+
100+ #[test]
101+ fn bar_heights_are_log_scaled_with_a_floor() {
102+ assert_eq!(bar_percent(0, 0), MIN_BAR_PERCENT);
103+ assert_eq!(bar_percent(0, 1000), MIN_BAR_PERCENT);
104+ assert_eq!(bar_percent(1000, 1000), 100);
105+ // ln 32 / ln 1000 is about half.
106+ assert_eq!(bar_percent(31, 999), 50);
107+ assert!(bar_percent(10, 1000) > bar_percent(2, 1000));
108+ }
109+}
style/_account_admin.scssmodified+6 -6
@@ -6,8 +6,8 @@
6 justify-content: space-between;6 justify-content: space-between;
7 gap: 12px;7 gap: 12px;
8 padding: 8px 16px;8 padding: 8px 16px;
9- background: var(--accent-soft, var(--surface-2));9+ background: var(--surface-2);
10- color: var(--text);10+color: var(--text);
11 border-bottom: 1px solid var(--border);11 border-bottom: 1px solid var(--border);
12 12
13 p {13 p {
@@ -175,8 +175,8 @@ dialog.session-dialog {
175 .user-role {175 .user-role {
176 margin-left: 0;176 margin-left: 0;
177 border-color: transparent;177 border-color: transparent;
178- background: var(--accent-soft, var(--surface-2));178+ background: var(--surface-2);
179- color: var(--accent-ink, var(--text));179+ color: var(--text);
180 }180 }
181 181
182 .user-meta {182 .user-meta {
@@ -441,11 +441,11 @@ dialog.session-dialog {
441 }441 }
442 442
443 &::-webkit-progress-value {443 &::-webkit-progress-value {
444- background: var(--accent);444+ background: var(--text-2);
445 }445 }
446 446
447 &::-moz-progress-bar {447 &::-moz-progress-bar {
448- background: var(--accent);448+ background: var(--text-2);
449 }449 }
450 450
451 &.bad::-webkit-progress-value {451 &.bad::-webkit-progress-value {
style/_admin_rows.scssmodified+6 -6
@@ -118,8 +118,8 @@
118 .runner-log-chip:not(:empty) {118 .runner-log-chip:not(:empty) {
119 padding: 0 6px;119 padding: 0 6px;
120 border-radius: var(--radius-sm);120 border-radius: var(--radius-sm);
121- background: var(--accent-soft);121+ background: var(--surface-2);
122- color: var(--accent-ink);122+ color: var(--text);
123 }123 }
124 124
125 // Job logs pad each numbered line; the runner log has no numbers, so the box pads instead.125 // Job logs pad each numbered line; the runner log has no numbers, so the box pads instead.
@@ -136,7 +136,7 @@
136 136
137 // The runner's metrics sit under its stats: three graphs side by side on a wide page (one column137 // The runner's metrics sit under its stats: three graphs side by side on a wide page (one column
138 // below 900px), each in a panel with its caption and facts above it. Every graph is its own SVG with138 // below 900px), each in a panel with its caption and facts above it. Every graph is its own SVG with
139-// one y axis; colours come from tokens only. A line follows the accent, a sent line is dashed in the139+// one y axis; colours come from tokens only. A line is the secondary text colour, and a sent line is dashed so it is told apart without
140 // secondary text colour so it is told apart without colour.140 // secondary text colour so it is told apart without colour.
141 // The wrapper is `.mx-panels`, not `.mx-grid`: that name is the SVG gridline class below.141 // The wrapper is `.mx-panels`, not `.mx-grid`: that name is the SVG gridline class below.
142 .mx-panels {142 .mx-panels {
@@ -198,7 +198,7 @@
198 display: inline-block;198 display: inline-block;
199 width: 16px;199 width: 16px;
200 margin-right: 6px;200 margin-right: 6px;
201- border-top: 2px solid var(--accent);201+ border-top: 2px solid var(--text-2);
202 vertical-align: middle;202 vertical-align: middle;
203 }203 }
204 204
@@ -223,7 +223,7 @@
223 }223 }
224 224
225 .mx-band {225 .mx-band {
226- fill: var(--accent-soft);226+ fill: var(--surface-2);
227 }227 }
228 228
229 .mx-axis {229 .mx-axis {
@@ -234,7 +234,7 @@
234 234
235 .mx-line {235 .mx-line {
236 fill: none;236 fill: none;
237- stroke: var(--accent);237+ stroke: var(--text-2);
238 stroke-width: 2;238 stroke-width: 2;
239 stroke-linejoin: round;239 stroke-linejoin: round;
240 stroke-linecap: round;240 stroke-linecap: round;
style/_authoring.scssmodified+1 -1
@@ -63,7 +63,7 @@ textarea.md-drop {
63 63
64 &.active,64 &.active,
65 &:hover {65 &:hover {
66- background: var(--accent-soft, var(--hover, var(--border)));66+ background: var(--surface-2);
67 }67 }
68 }68 }
69 69
style/_browse.scssmodified+8 -4
@@ -188,11 +188,12 @@
188 .file-table .ln a {188 .file-table .ln a {
189 display: block;189 display: block;
190 cursor: pointer;190 cursor: pointer;
191+ color: var(--muted);
191 }192 }
192 193
193 .file-actions .link-button {194 .file-actions .link-button {
194 font-size: inherit;195 font-size: inherit;
195- color: var(--link, var(--accent));196+ color: var(--text);
196 cursor: pointer;197 cursor: pointer;
197 }198 }
198 199
@@ -342,14 +343,17 @@ dialog.finder {
342 overflow-wrap: anywhere;343 overflow-wrap: anywhere;
343 }344 }
344 345
345- li[aria-selected="true"] a,346+ li[aria-selected="true"] a {
346- a:hover {
347 background: var(--accent-soft);347 background: var(--accent-soft);
348 }348 }
349 349
350+ a:hover {
351+ background: var(--surface-2);
352+ }
353+
350 mark {354 mark {
351 background: none;355 background: none;
352- color: var(--accent-ink);356+ color: var(--text);
353 font-weight: 700;357 font-weight: 700;
354 }358 }
355 }359 }
style/_continuity.scssadded+27 -0
@@ -0,0 +1,27 @@
1+// Continuity: a row grows into the title of the page it opens. nav.js names the clicked row and the new
2+// main heading `forge-row` for one transition; every other swap is a plain swap with no transition.
3+// The rest of the page does a short crossfade. Reduced motion turns the animations off.
4+::view-transition-group(forge-row) {
5+ animation-duration: 220ms;
6+ animation-timing-function: ease-out;
7+}
8+
9+::view-transition-old(forge-row),
10+::view-transition-new(forge-row) {
11+ animation-duration: 220ms;
12+ animation-timing-function: ease-out;
13+}
14+
15+::view-transition-old(root),
16+::view-transition-new(root) {
17+ animation-duration: 160ms;
18+ animation-timing-function: ease-out;
19+}
20+
21+@media (prefers-reduced-motion: reduce) {
22+ ::view-transition-group(*),
23+ ::view-transition-old(*),
24+ ::view-transition-new(*) {
25+ animation: none;
26+ }
27+}
style/_link.scssmodified+3 -3
@@ -11,13 +11,13 @@
11 transform: translateX(-50%);11 transform: translateX(-50%);
12 max-width: calc(100% - 32px);12 max-width: calc(100% - 32px);
13 padding: 6px 14px;13 padding: 6px 14px;
14- border: 1px solid var(--accent);14+ border: 1px solid var(--border-strong);
15 border-radius: 999px;15 border-radius: 999px;
16 text-align: center;16 text-align: center;
17 font-size: 0.8125rem;17 font-size: 0.8125rem;
18 line-height: 1.4;18 line-height: 1.4;
19 color: var(--text);19 color: var(--text);
20- background: var(--accent-soft);20+ background: var(--surface-2);
21 overflow-wrap: anywhere;21 overflow-wrap: anywhere;
22 }22 }
23 23
@@ -38,7 +38,7 @@
38 .link-offline-mark {38 .link-offline-mark {
39 margin: 0 0 12px;39 margin: 0 0 12px;
40 font-weight: 600;40 font-weight: 600;
41- color: var(--accent);41+ color: var(--text);
42 }42 }
43 43
44 .link-offline-text {44 .link-offline-text {
style/_look.scssadded+99 -0
@@ -0,0 +1,99 @@
1+// The look pass: Archivo titles, mono section labels, depth by tone and a faint accent wash at the
2+// top of the page. Imported last in main.scss so it restyles shared classes. It changes type,
3+// tone and depth only; which colour a thing uses is decided where the thing is styled.
4+
5+// Titles. Page titles and major headings use --display (Archivo) at 700 and 110% width, 24px at
6+// most. Body text stays on --font.
7+h1,
8+h2 {
9+ font-family: var(--display);
10+ font-weight: 700;
11+ font-stretch: 110%;
12+ letter-spacing: -0.01em;
13+}
14+
15+h1 {
16+ font-size: 1.5rem;
17+}
18+
19+.hero h1 {
20+ font-size: 1.5rem;
21+}
22+
23+.repo-title,
24+.issue-heading,
25+.ci-run-title,
26+.import-job-title {
27+ font-family: var(--display);
28+ font-weight: 700;
29+ font-stretch: 110%;
30+}
31+
32+// Mono section labels: table headers, pane headers, card headings that are labels, and the small
33+// muted captions that head a card's table or list. Only static UI text takes this; prose and user
34+// content (commit messages, names, descriptions) keep their case.
35+%mono-label {
36+ font-family: var(--mono);
37+ font-weight: 500;
38+ font-size: 11px;
39+ line-height: 1.4;
40+ letter-spacing: 0.12em;
41+ text-transform: uppercase;
42+ color: var(--muted);
43+}
44+
45+th,
46+.table th,
47+.readme-name,
48+.ci-side-title,
49+.ci-art-title,
50+.ci-warnings-title,
51+.import-log-title,
52+.security-row-title,
53+.notif-group-head,
54+.profile-section-head,
55+.mx-caption,
56+.card > .muted.small:first-child:has(+ .table-wrap, + .table, + ul, + ol) {
57+ @extend %mono-label;
58+}
59+
60+// Depth by tone. Cards and panes sit on the surface tone with an inset 1px hairline instead of a
61+// drop shadow or a heavy border. The border keeps its width (transparent), so nothing moves.
62+.card,
63+.issue-list,
64+.review-box,
65+.pin-card,
66+.pinned-card,
67+.push-card,
68+.release-card,
69+.newrepo-card,
70+.newrepo-mirror,
71+.security-panel,
72+.ci-side,
73+.ci-main,
74+.import-sources,
75+.snippet-meta,
76+.snippet-form .snippet-files,
77+.readme {
78+ border-color: transparent;
79+ background: var(--surface);
80+ box-shadow: inset 0 0 0 1px var(--border);
81+}
82+
83+.card.notice {
84+ border-color: var(--border);
85+ box-shadow: none;
86+}
87+
88+// Only floating things (popovers, menus, dialogs, the palette, the profile panel) keep --shadow.
89+
90+// A faint accent wash at the top of the page, fading out by about 300px.
91+body {
92+ background-color: var(--bg);
93+ background-image: radial-gradient(
94+ 120% 300px at 50% 0,
95+ color-mix(in srgb, var(--accent) 6%, transparent),
96+ transparent
97+ );
98+ background-repeat: no-repeat;
99+}
style/_pull.scssmodified+6 -6
@@ -607,7 +607,7 @@
607 color: var(--text);607 color: var(--text);
608 608
609 &:hover {609 &:hover {
610- color: var(--accent-ink);610+ color: var(--text);
611 }611 }
612 }612 }
613 }613 }
@@ -732,7 +732,7 @@ input[type="color"] {
732 cursor: pointer;732 cursor: pointer;
733 }733 }
734 734
735-// Milestone progress bar: a rounded track with an accent fill.735+// Milestone progress bar: a rounded track with a neutral fill.
736 .milestone-progress progress {736 .milestone-progress progress {
737 appearance: none;737 appearance: none;
738 border: 0;738 border: 0;
@@ -746,12 +746,12 @@ input[type="color"] {
746 }746 }
747 747
748 &::-webkit-progress-value {748 &::-webkit-progress-value {
749- background: var(--accent);749+ background: var(--text-2);
750 border-radius: var(--radius-full);750 border-radius: var(--radius-full);
751 }751 }
752 752
753 &::-moz-progress-bar {753 &::-moz-progress-bar {
754- background: var(--accent);754+ background: var(--text-2);
755 border-radius: var(--radius-full);755 border-radius: var(--radius-full);
756 }756 }
757 }757 }
@@ -782,7 +782,7 @@ input[type="color"] {
782 782
783 summary {783 summary {
784 cursor: pointer;784 cursor: pointer;
785- color: var(--accent-ink);785+ color: var(--text);
786 }786 }
787 787
788 .discussion-reply {788 .discussion-reply {
@@ -790,7 +790,7 @@ input[type="color"] {
790 }790 }
791 791
792 .link-button {792 .link-button {
793- color: var(--accent-ink);793+ color: var(--text);
794 }794 }
795 }795 }
796 796
style/_repo.scssmodified+19 -14
@@ -35,6 +35,11 @@
35 font-weight: 600;35 font-weight: 600;
36 line-height: 1.3;36 line-height: 1.3;
37 color: var(--text);37 color: var(--text);
38+
39+ // The owner is a link in the heading: navigation, so it reads as the heading text.
40+ a {
41+ color: var(--text);
42+ }
38 }43 }
39 44
40 // Visually hidden but still read by screen readers (labels for the watch select, icon labels).45 // Visually hidden but still read by screen readers (labels for the watch select, icon labels).
@@ -505,12 +510,12 @@ html.tree-resizing .repo-split::before {
505 }510 }
506 }511 }
507 512
508-// The languages' shades: the biggest takes the accent, the next ones fainter mixes of it, the513+// The languages' shades: the biggest takes the text colour, the next ones fainter mixes of it, the
509 // folded remainder the muted colour. Classes, not inline styles, since the CSP allows none.514 // folded remainder the muted colour. Classes, not inline styles, since the CSP allows none.
510-.lang-0 { --lang: var(--accent); }515+.lang-0 { --lang: var(--text-2); }
511-.lang-1 { --lang: color-mix(in srgb, var(--accent) 65%, var(--surface)); }516+.lang-1 { --lang: color-mix(in srgb, var(--text-2) 65%, var(--surface)); }
512-.lang-2 { --lang: color-mix(in srgb, var(--accent) 40%, var(--surface)); }517+.lang-2 { --lang: color-mix(in srgb, var(--text-2) 40%, var(--surface)); }
513-.lang-3 { --lang: color-mix(in srgb, var(--accent) 22%, var(--surface)); }518+.lang-3 { --lang: color-mix(in srgb, var(--text-2) 22%, var(--surface)); }
514 .lang-4 { --lang: var(--muted); }519 .lang-4 { --lang: var(--muted); }
515 520
516 .lang-bar rect {521 .lang-bar rect {
@@ -600,10 +605,10 @@ html.tree-resizing .repo-split::before {
600 stroke-linecap: round;605 stroke-linecap: round;
601 stroke-linejoin: round;606 stroke-linejoin: round;
602 607
603- // Folders take the accent, with a light fill, so they stand apart from files at a glance.608+ // Folders get a light fill, so they stand apart from files at a glance.
604 &.is-dir {609 &.is-dir {
605- color: var(--accent);610+ color: var(--text-2);
606- fill: color-mix(in srgb, var(--accent) 35%, transparent);611+ fill: color-mix(in srgb, var(--text-2) 35%, transparent);
607 }612 }
608 }613 }
609 614
@@ -633,7 +638,7 @@ html.tree-resizing .repo-split::before {
633 }638 }
634 639
635 .tree-label > a:hover {640 .tree-label > a:hover {
636- color: var(--accent-ink);641+ color: var(--text);
637 text-decoration: none;642 text-decoration: none;
638 }643 }
639 644
@@ -773,13 +778,13 @@ html.tree-resizing .repo-split::before {
773 padding: 2px 8px;778 padding: 2px 8px;
774 font-family: var(--mono);779 font-family: var(--mono);
775 font-size: 13px;780 font-size: 13px;
776- color: var(--accent-ink);781+ color: var(--text);
777 background: var(--surface-2);782 background: var(--surface-2);
778 border: 1px solid var(--border);783 border: 1px solid var(--border);
779 border-radius: var(--radius-full);784 border-radius: var(--radius-full);
780 785
781 &:hover {786 &:hover {
782- border-color: var(--accent);787+ border-color: var(--border-strong);
783 text-decoration: none;788 text-decoration: none;
784 }789 }
785 }790 }
@@ -1384,7 +1389,7 @@ html.tree-resizing .repo-split::before {
1384 }1389 }
1385 1390
1386 a:hover {1391 a:hover {
1387- color: var(--accent-ink);1392+ color: var(--text);
1388 text-decoration: none;1393 text-decoration: none;
1389 }1394 }
1390 }1395 }
@@ -1398,7 +1403,7 @@ html.tree-resizing .repo-split::before {
1398 color: var(--text);1403 color: var(--text);
1399 1404
1400 &:hover {1405 &:hover {
1401- color: var(--accent-ink);1406+ color: var(--text);
1402 text-decoration: none;1407 text-decoration: none;
1403 }1408 }
1404 }1409 }
@@ -1418,7 +1423,7 @@ html.tree-resizing .repo-split::before {
1418 color: var(--muted);1423 color: var(--muted);
1419 1424
1420 &:hover {1425 &:hover {
1421- color: var(--accent-ink);1426+ color: var(--text);
1422 text-decoration: none;1427 text-decoration: none;
1423 }1428 }
1424 }1429 }
style/_shell.scssmodified+7 -3
@@ -50,7 +50,7 @@
50 .wordmark-mark {50 .wordmark-mark {
51 width: 20px;51 width: 20px;
52 height: 20px;52 height: 20px;
53- color: var(--accent);53+ color: var(--text);
54 }54 }
55 55
56 .topbar .crumbs {56 .topbar .crumbs {
@@ -72,6 +72,10 @@
72 ol {72 ol {
73 flex-wrap: nowrap;73 flex-wrap: nowrap;
74 }74 }
75+
76+ a {
77+ color: inherit;
78+ }
75 }79 }
76 80
77 .top-search {81 .top-search {
@@ -236,7 +240,7 @@
236 }240 }
237 241
238 &.owner {242 &.owner {
239- color: var(--accent-ink);243+ color: var(--text);
240 }244 }
241 245
242 &.last {246 &.last {
@@ -519,7 +523,7 @@
519 }523 }
520 524
521 &[open] summary {525 &[open] summary {
522- box-shadow: 0 0 0 2px var(--accent-soft);526+ box-shadow: 0 0 0 2px var(--surface-2);
523 }527 }
524 }528 }
525 529
style/_timeline.scssadded+280 -0
@@ -0,0 +1,280 @@
1+// The repo page's bottom dock (the newest CI run in one line, then the history strip) and the
2+// history strip itself. The dock is always shown under the panes; the panes give it room.
3+
4+:root {
5+ --dock-h: 150px;
6+}
7+
8+// The panes fill the window above the dock: the dock's height comes off the pane height that
9+// _repo.scss sets (nav.js measures the top and the footer). Declared after _repo.scss on purpose.
10+@media (min-width: 900px) {
11+ .repo-home {
12+ --repo-home-h: max(360px, calc(100dvh - var(--pane-top, 288px) - var(--pane-foot, 78px) - var(--dock-h) - 12px));
13+ }
14+}
15+
16+// With no footer on this page, the dock sits close to the window's bottom edge.
17+.shell-body > main:has(.repo-home) {
18+ padding-bottom: 12px;
19+}
20+
21+// The Code tab's head: no title row. The tabs sit at the left, and the visibility, the counts and
22+// the watch and star controls sit at the right end of the same row. Fork and mirror lines wrap
23+// under the row.
24+.repo-head-code {
25+ justify-content: flex-start;
26+
27+ > div:first-child:empty {
28+ display: none;
29+ }
30+
31+ > div:first-child {
32+ order: 2;
33+ flex: 1 0 100%;
34+ }
35+
36+ .repo-tabs {
37+ margin-right: auto;
38+ }
39+
40+ .header-actions {
41+ margin-left: auto;
42+ }
43+}
44+
45+// One rule under the whole row, so the actions read as part of the tab bar. The tab icons go to
46+// make the room. Under 1280px the two no longer fit, and the actions take a row of their own.
47+@media (min-width: 900px) {
48+ .repo-head-code {
49+ align-items: center;
50+ border-bottom: 1px solid var(--border);
51+
52+ .repo-tabs {
53+ margin-bottom: 0;
54+ border-bottom: 0;
55+ }
56+
57+ .repo-tabs .tab-icon {
58+ display: none;
59+ }
60+ }
61+}
62+
63+@media (min-width: 1280px) {
64+ .repo-head-code {
65+ flex-wrap: nowrap;
66+
67+ .repo-tabs {
68+ flex: 0 1 auto;
69+ min-width: 0;
70+ }
71+
72+ .header-actions {
73+ flex: none;
74+ flex-wrap: nowrap;
75+ }
76+ }
77+}
78+
79+// The page is exactly one window: the footer is left off this page, and the panes and the dock
80+// fill the height. (The footer would sit under the floating profile panel.)
81+body:has(.repo-home) .site-footer {
82+ display: none;
83+}
84+
85+// The tree column's narrow toolbar: the branch icon and the Go to file key hint give way so that
86+// Clone stays inside the column. (The t key still works.)
87+.repo-home .browse-bar {
88+ align-items: center;
89+ gap: 8px;
90+
91+ .finder-open kbd,
92+ .ref-icon {
93+ display: none;
94+ }
95+}
96+
97+// The search entry stays on one line beside Go to file.
98+.repo-home .repo-search-link {
99+ flex: none;
100+ white-space: nowrap;
101+}
102+
103+// The README pane's header: the licence, size and top language at the right end.
104+.readme-head {
105+ display: flex;
106+ justify-content: flex-end;
107+ align-items: center;
108+ flex: none;
109+ min-height: 36px;
110+ padding: 0 14px;
111+ border-bottom: 1px solid var(--border);
112+ font-family: var(--mono);
113+ font-size: 12px;
114+ color: var(--muted);
115+ white-space: nowrap;
116+ overflow: hidden;
117+}
118+
119+// The tree pane's latest commit: one line, the subject first, then the short sha and the age.
120+.repo-home .latest-commit {
121+ flex-wrap: nowrap;
122+ align-items: center;
123+ gap: 4px 10px;
124+ min-width: 0;
125+
126+ .latest-subject {
127+ order: 0;
128+ flex: 1 1 auto;
129+ min-width: 0;
130+ overflow: hidden;
131+ white-space: nowrap;
132+ text-overflow: ellipsis;
133+ }
134+
135+ .latest-count {
136+ display: none;
137+ }
138+
139+ .latest-author {
140+ max-width: 9rem;
141+ overflow: hidden;
142+ white-space: nowrap;
143+ }
144+}
145+
146+.repo-dock {
147+ display: flex;
148+ flex-direction: column;
149+ gap: 12px;
150+ height: var(--dock-h);
151+ margin-top: 12px;
152+ padding: 14px 16px;
153+ min-width: 0;
154+ overflow: hidden;
155+ background: var(--surface);
156+ border: 1px solid var(--border);
157+ border-radius: var(--radius-lg);
158+ font-size: 13px;
159+}
160+
161+// The CI line: the run's dot, number, state, sha and subject, with the commit count and All runs
162+// at the right end. The subject takes the free width and truncates.
163+.dock-info {
164+ display: flex;
165+ align-items: center;
166+ gap: 10px;
167+ min-width: 0;
168+ height: 28px;
169+ white-space: nowrap;
170+
171+ > * {
172+ flex: none;
173+ }
174+
175+ .dock-subject {
176+ flex: 1 1 auto;
177+ min-width: 0;
178+ overflow: hidden;
179+ text-overflow: ellipsis;
180+ }
181+
182+ .dock-run {
183+ display: inline-flex;
184+ align-items: center;
185+ gap: 6px;
186+ font-weight: 600;
187+ color: var(--text);
188+ text-decoration: none;
189+ }
190+
191+ .dock-state {
192+ color: var(--text-2);
193+ }
194+
195+ .dock-all {
196+ font-weight: 600;
197+ color: var(--text);
198+ }
199+}
200+
201+// The strip: the label in the left 254px column, which the floating profile panel covers by
202+// default, then the bars.
203+.dock-history {
204+ display: flex;
205+ flex: 1 1 auto;
206+ min-height: 0;
207+}
208+
209+.history-strip {
210+ display: grid;
211+ grid-template-columns: 254px minmax(0, 1fr);
212+ column-gap: 16px;
213+ align-items: start;
214+ min-width: 0;
215+ width: 100%;
216+ min-height: 0;
217+}
218+
219+.history-label {
220+ margin: 0;
221+ padding-top: 2px;
222+}
223+
224+.history-bars {
225+ display: flex;
226+ align-items: flex-end;
227+ gap: 3px;
228+ height: 80px;
229+ min-width: 0;
230+ overflow: hidden;
231+
232+ > a {
233+ display: block;
234+ flex: 1 1 0;
235+ min-width: 2px;
236+ border-radius: 2px;
237+ background: var(--muted);
238+ opacity: 0.42;
239+ }
240+
241+ // A failure and the running commit are the only bars at full strength.
242+ > a.hs-bad {
243+ background: var(--bad);
244+ opacity: 1;
245+ }
246+
247+ > a.hs-live {
248+ background: var(--heat-3);
249+ opacity: 1;
250+ }
251+
252+ > a:hover {
253+ opacity: 0.75;
254+ }
255+
256+ > a:focus-visible {
257+ outline: 2px solid var(--accent);
258+ outline-offset: 2px;
259+ }
260+}
261+
262+// Bar heights: one class per whole percent, from the floor of 6% to the full strip. Each class is
263+// a child selector, so it outranks the bar's own rule.
264+@for $i from 6 through 100 {
265+ .history-bars > .hs-h-#{$i} {
266+ height: $i * 1%;
267+ }
268+}
269+
270+// Below 900px the panes stack and the page scrolls: the dock becomes the one-line CI row, and the
271+// strip, which needs the width, is left out.
272+@media (max-width: 899px) {
273+ .repo-dock {
274+ height: auto;
275+ }
276+
277+ .dock-history {
278+ display: none;
279+ }
280+}
style/_timeline_ci.scssadded+369 -0
@@ -0,0 +1,369 @@
1+// The CI run page (B Timeline) and the commits page's fitting list. The run page's classes are `ci-tl-*`;
2+// the shared CI rules (the log bar, its search, the fail-first block, the artifact list) stay in main.scss.
3+// This partial comes last, so its rules win over the older split view where both apply.
4+
5+// Desktop: the run page fills the window. Its panes scroll inside, the page itself does not.
6+@media (min-width: 900px) {
7+ .ci-run.fit-pane {
8+ display: flex;
9+ flex-direction: column;
10+ gap: 12px;
11+ overflow: hidden;
12+ }
13+}
14+
15+.ci-tl-head {
16+ flex: none;
17+ display: flex;
18+ align-items: flex-start;
19+ justify-content: space-between;
20+ gap: 16px;
21+ min-width: 0;
22+}
23+
24+.ci-tl-headmain {
25+ flex: 1 1 auto;
26+ min-width: 0;
27+ display: flex;
28+ flex-direction: column;
29+ gap: 4px;
30+}
31+
32+// The one-line header: `Run #N`, the commit title, and the full message on demand.
33+.ci-tl-line {
34+ display: flex;
35+ align-items: baseline;
36+ gap: 12px;
37+ min-width: 0;
38+}
39+
40+.ci-tl-no {
41+ flex: none;
42+ font-family: var(--mono);
43+ font-size: 12px;
44+ letter-spacing: 0.06em;
45+ text-transform: uppercase;
46+ color: var(--muted);
47+}
48+
49+.ci-tl-title {
50+ flex: 0 1 auto;
51+ min-width: 0;
52+ margin: 0;
53+ font-size: 18px;
54+ font-weight: 600;
55+ white-space: nowrap;
56+ overflow: hidden;
57+ text-overflow: ellipsis;
58+}
59+
60+// The full message opens as a floating note, so the header keeps its height.
61+.ci-tl-more {
62+ flex: none;
63+ position: relative;
64+
65+ summary {
66+ cursor: pointer;
67+ font-size: 13px;
68+ color: var(--muted);
69+ text-decoration: underline;
70+ }
71+
72+ p {
73+ display: none;
74+ }
75+
76+ &[open] p {
77+ display: block;
78+ position: absolute;
79+ top: calc(100% + 6px);
80+ left: 0;
81+ z-index: 5;
82+ width: min(640px, 80vw);
83+ margin: 0;
84+ padding: 10px 12px;
85+ background: var(--surface);
86+ border: 1px solid var(--border);
87+ border-radius: var(--radius-md);
88+ box-shadow: var(--shadow);
89+ white-space: pre-wrap;
90+ }
91+}
92+
93+.ci-tl-meta {
94+ display: flex;
95+ flex-wrap: wrap;
96+ align-items: center;
97+ gap: 4px 12px;
98+ min-width: 0;
99+ font-size: 13px;
100+}
101+
102+.ci-tl-dur {
103+ font-family: var(--mono);
104+ color: var(--muted);
105+}
106+
107+.ci-tl-actions {
108+ flex: none;
109+ display: flex;
110+ flex-wrap: wrap;
111+ gap: 8px;
112+}
113+
114+.ci-tl-label {
115+ margin: 0 0 8px;
116+ font-size: 12px;
117+ font-weight: 600;
118+ letter-spacing: 0.06em;
119+ text-transform: uppercase;
120+ color: var(--muted);
121+}
122+
123+// The jobs (left) and the log (right) fill what is left of the window.
124+.ci-tl-main {
125+ flex: 1 1 0;
126+ min-height: 0;
127+ display: grid;
128+ grid-template-columns: 300px minmax(0, 1fr);
129+ gap: 12px;
130+}
131+
132+.ci-tl-jobs,
133+.ci-tl-log {
134+ min-width: 0;
135+ min-height: 0;
136+ margin: 0;
137+ display: flex;
138+ flex-direction: column;
139+}
140+
141+.ci-tl-jobs {
142+ padding: 12px 12px 10px;
143+ overflow-y: auto;
144+ overscroll-behavior: contain;
145+}
146+
147+.ci-tl-list {
148+ display: flex;
149+ flex-direction: column;
150+ gap: 2px;
151+ margin: 0;
152+ padding: 0;
153+ list-style: none;
154+}
155+
156+.ci-tl-group {
157+ margin-top: 8px;
158+ font-size: 12px;
159+ color: var(--muted);
160+}
161+
162+.ci-tl-job {
163+ display: flex;
164+ align-items: center;
165+ gap: 8px;
166+ min-width: 0;
167+ padding: 7px 8px;
168+ border-radius: var(--radius-sm);
169+ color: var(--text);
170+ text-decoration: none;
171+
172+ &:hover {
173+ background: var(--surface-2);
174+ }
175+
176+ &[aria-current="true"] {
177+ background: var(--surface-2);
178+ box-shadow: inset 2px 0 0 var(--accent);
179+ }
180+
181+ .ci-tl-dur {
182+ flex: none;
183+ margin-left: auto;
184+ font-size: 12px;
185+ }
186+}
187+
188+.ci-tl-sub .ci-tl-job {
189+ padding-left: 18px;
190+}
191+
192+.ci-tl-name {
193+ flex: 1 1 auto;
194+ min-width: 0;
195+ overflow: hidden;
196+ text-overflow: ellipsis;
197+ white-space: nowrap;
198+}
199+
200+.ci-tl-tag {
201+ flex: none;
202+ padding: 0 6px;
203+ border: 1px solid var(--border);
204+ border-radius: var(--radius-sm);
205+ font-family: var(--mono);
206+ font-size: 11px;
207+ color: var(--muted);
208+}
209+
210+.ci-tl-jobs .ci-art-list {
211+ margin-top: 6px;
212+}
213+
214+// The right pane: a Log and a Timeline tab. Both panels are in the HTML; a radio pair (no script)
215+// shows one. The radios sit before the tabs and panels, so `~` reaches them.
216+.ci-tl-log {
217+ position: relative;
218+ padding: 0;
219+ overflow: hidden;
220+}
221+
222+.ci-tl-radio {
223+ position: absolute;
224+ width: 1px;
225+ height: 1px;
226+ opacity: 0;
227+ pointer-events: none;
228+}
229+
230+.ci-tl-tabs {
231+ flex: none;
232+ display: flex;
233+ gap: 4px;
234+ padding: 6px 12px;
235+ border-bottom: 1px solid var(--border);
236+}
237+
238+.ci-tl-tab {
239+ padding: 4px 10px;
240+ border-radius: var(--radius-sm);
241+ font-size: 13px;
242+ color: var(--muted);
243+ cursor: pointer;
244+}
245+
246+#ci-view-log:checked ~ .ci-tl-tabs .ci-tl-tab-log,
247+#ci-view-timeline:checked ~ .ci-tl-tabs .ci-tl-tab-timeline {
248+ color: var(--text);
249+ background: var(--surface-2);
250+}
251+
252+#ci-view-log:checked ~ .ci-tl-panel-timeline,
253+#ci-view-timeline:checked ~ .ci-tl-panel-log {
254+ display: none;
255+}
256+
257+.ci-tl-log > .ci-tl-panel {
258+ flex: 1 1 auto;
259+ min-height: 0;
260+ display: flex;
261+ flex-direction: column;
262+ overflow: hidden;
263+}
264+
265+.ci-tl-panel-log > * {
266+ flex: none;
267+ margin-left: 0;
268+ margin-right: 0;
269+}
270+
271+.ci-tl-panel-log > .ci-config-error,
272+.ci-tl-panel-log > .ci-warnings {
273+ margin: 10px 12px 0;
274+}
275+
276+.ci-tl-panel-log > .ci-tl-code {
277+ flex: 1 1 auto;
278+}
279+
280+.ci-tl-panel-timeline {
281+ padding: 12px;
282+ overflow: auto;
283+ overscroll-behavior: contain;
284+}
285+
286+.ci-tl-logbar {
287+ margin: 0;
288+ padding: 8px 12px;
289+ border-bottom: 1px solid var(--border);
290+
291+ .ci-tl-label {
292+ flex: 0 1 auto;
293+ min-width: 0;
294+ margin: 0;
295+ overflow: hidden;
296+ text-overflow: ellipsis;
297+ white-space: nowrap;
298+ }
299+}
300+
301+.ci-tl-code {
302+ flex: 1 1 auto;
303+ min-height: 0;
304+ max-height: none;
305+ margin: 0;
306+ overflow: auto;
307+ overscroll-behavior: contain;
308+}
309+
310+// The dock is the repo page's `.repo-dock` pane (_timeline.scss), without its CI line: the run page
311+// already says that, so the dock is only as tall as the strip.
312+.ci-run {
313+ --dock-h: 110px;
314+}
315+
316+@media (min-width: 900px) {
317+ .ci-run .repo-dock {
318+ margin-top: 0;
319+ }
320+}
321+
322+// The run page takes the whole width of the window, as the repo home does.
323+.shell-body > main:has(.ci-run) {
324+ max-width: none;
325+}
326+
327+// Phone and narrow windows: the panes stack and the page grows, as the rest of the site does.
328+@media (max-width: 899px) {
329+ .ci-tl-main {
330+ grid-template-columns: minmax(0, 1fr);
331+ }
332+
333+ .ci-tl-jobs {
334+ overflow: visible;
335+ }
336+
337+ .ci-tl-code {
338+ max-height: 60vh;
339+ }
340+
341+}
342+
343+// The commits page: the list scrolls inside a pane that fills the window under the tabs, and the pager
344+// stays under it. Below 900px the list grows with its rows, as the page stacks.
345+@media (min-width: 900px) {
346+ .commits-fit.fit-pane {
347+ display: flex;
348+ flex-direction: column;
349+ overflow: hidden;
350+ }
351+
352+ .commits-fit .commit-list {
353+ flex: 1 1 auto;
354+ min-height: 0;
355+ overflow-y: auto;
356+ overscroll-behavior: contain;
357+ }
358+
359+ .commits-fit .pager {
360+ flex: none;
361+ }
362+}
363+
364+// The compare page keeps its diff below the commit list, so the list caps its height and scrolls itself.
365+.compare-commits {
366+ max-height: 30vh;
367+ overflow-y: auto;
368+ overscroll-behavior: contain;
369+}
style/_wiki.scssmodified+1 -1
@@ -92,7 +92,7 @@
92 font-size: 3rem;92 font-size: 3rem;
93 font-weight: 700;93 font-weight: 700;
94 line-height: 1;94 line-height: 1;
95- color: var(--accent);95+ color: var(--muted);
96 }96 }
97 97
98 .button {98 .button {
style/fonts/Archivo-OFL.txtadded+93 -0
@@ -0,0 +1,93 @@
1+Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo) Archivo-Italic[wdth,wght].ttf: Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo)
2+
3+This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+This license is copied below, and is also available with a FAQ at:
5+http://scripts.sil.org/OFL
6+
7+
8+-----------------------------------------------------------
9+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10+-----------------------------------------------------------
11+
12+PREAMBLE
13+The goals of the Open Font License (OFL) are to stimulate worldwide
14+development of collaborative font projects, to support the font creation
15+efforts of academic and linguistic communities, and to provide a free and
16+open framework in which fonts may be shared and improved in partnership
17+with others.
18+
19+The OFL allows the licensed fonts to be used, studied, modified and
20+redistributed freely as long as they are not sold by themselves. The
21+fonts, including any derivative works, can be bundled, embedded,
22+redistributed and/or sold with any software provided that any reserved
23+names are not used by derivative works. The fonts and derivatives,
24+however, cannot be released under any other type of license. The
25+requirement for fonts to remain under this license does not apply
26+to any document created using the fonts or their derivatives.
27+
28+DEFINITIONS
29+"Font Software" refers to the set of files released by the Copyright
30+Holder(s) under this license and clearly marked as such. This may
31+include source files, build scripts and documentation.
32+
33+"Reserved Font Name" refers to any names specified as such after the
34+copyright statement(s).
35+
36+"Original Version" refers to the collection of Font Software components as
37+distributed by the Copyright Holder(s).
38+
39+"Modified Version" refers to any derivative made by adding to, deleting,
40+or substituting -- in part or in whole -- any of the components of the
41+Original Version, by changing formats or by porting the Font Software to a
42+new environment.
43+
44+"Author" refers to any designer, engineer, programmer, technical
45+writer or other person who contributed to the Font Software.
46+
47+PERMISSION & CONDITIONS
48+Permission is hereby granted, free of charge, to any person obtaining
49+a copy of the Font Software, to use, study, copy, merge, embed, modify,
50+redistribute, and sell modified and unmodified copies of the Font
51+Software, subject to the following conditions:
52+
53+1) Neither the Font Software nor any of its individual components,
54+in Original or Modified Versions, may be sold by itself.
55+
56+2) Original or Modified Versions of the Font Software may be bundled,
57+redistributed and/or sold with any software, provided that each copy
58+contains the above copyright notice and this license. These can be
59+included either as stand-alone text files, human-readable headers or
60+in the appropriate machine-readable metadata fields within text or
61+binary files as long as those fields can be easily viewed by the user.
62+
63+3) No Modified Version of the Font Software may use the Reserved Font
64+Name(s) unless explicit written permission is granted by the corresponding
65+Copyright Holder. This restriction only applies to the primary font name as
66+presented to the users.
67+
68+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69+Software shall not be used to promote, endorse or advertise any
70+Modified Version, except to acknowledge the contribution(s) of the
71+Copyright Holder(s) and the Author(s) or with their explicit written
72+permission.
73+
74+5) The Font Software, modified or unmodified, in part or in whole,
75+must be distributed entirely under this license, and must not be
76+distributed under any other license. The requirement for fonts to
77+remain under this license does not apply to any document created
78+using the Font Software.
79+
80+TERMINATION
81+This license becomes null and void if any of the above conditions are
82+not met.
83+
84+DISCLAIMER
85+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93+OTHER DEALINGS IN THE FONT SOFTWARE.
style/fonts/README.mdmodified+6 -2
@@ -1,9 +1,12 @@
1 # Bundled fonts1 # Bundled fonts
2 2
3-Both fonts are embedded in the forge binary (`include_bytes!` in `crates/forge-web/src/pages/assets.rs`) and served from `/assets/fonts/`. Both 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/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 |---|---|---|---|---|---|
7+| `archivo-5.3.0-latin-wdth.woff2` | `/assets/fonts/archivo-5.3.0-latin-wdth.woff2` | 90104 | `e3a28eade21a900c7155a247757f4b2834c07bb7ef07ad7efa55cebaac1e8f5e` | Archivo 5.3.0 variable font (wdth axis), latin subset, from `https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/files/archivo-latin-wdth-normal.woff2` | OFL-1.1 |
8+| `archivo-5.3.0-latin-ext-wdth.woff2` | `/assets/fonts/archivo-5.3.0-latin-ext-wdth.woff2` | 86240 | `5717f37059660ca5c899bad6c48ee22c3ac55cb3c484055241689d0f905a1a86` | Archivo 5.3.0 variable font (wdth axis), latin-ext subset, from `https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/files/archivo-latin-ext-wdth-normal.woff2` | OFL-1.1 |
9+| `Archivo-OFL.txt` | `/assets/fonts/Archivo-OFL.txt` | 4503 | `c3c8402eec0e31dc9a76851235b1c02a0bb821488b2db8e35bcc2ab60ca8fc2b` | Archivo license text (Copyright 2020 The Archivo Project Authors) | OFL-1.1 |
7 | `figtree-5.3.0-latin-wght.woff2` | `/assets/fonts/figtree-5.3.0-latin-wght.woff2` | 20156 | `4ba7d3d096695818fe0686be4f1e82c6b05134e18a22260336130335027462dd` | https://cdn.jsdelivr.net/npm/@fontsource-variable/figtree@5.3.0/files/figtree-latin-wght-normal.woff2 | OFL-1.1 |10 | `figtree-5.3.0-latin-wght.woff2` | `/assets/fonts/figtree-5.3.0-latin-wght.woff2` | 20156 | `4ba7d3d096695818fe0686be4f1e82c6b05134e18a22260336130335027462dd` | https://cdn.jsdelivr.net/npm/@fontsource-variable/figtree@5.3.0/files/figtree-latin-wght-normal.woff2 | OFL-1.1 |
8 | `figtree-5.3.0-latin-ext-wght.woff2` | `/assets/fonts/figtree-5.3.0-latin-ext-wght.woff2` | 10280 | `bf7828e2c258cffcfa50a048ee388a36b95bc16b452e8d36fa797635dbe15965` | https://cdn.jsdelivr.net/npm/@fontsource-variable/figtree@5.3.0/files/figtree-latin-ext-wght-normal.woff2 | OFL-1.1 |11 | `figtree-5.3.0-latin-ext-wght.woff2` | `/assets/fonts/figtree-5.3.0-latin-ext-wght.woff2` | 10280 | `bf7828e2c258cffcfa50a048ee388a36b95bc16b452e8d36fa797635dbe15965` | https://cdn.jsdelivr.net/npm/@fontsource-variable/figtree@5.3.0/files/figtree-latin-ext-wght-normal.woff2 | OFL-1.1 |
9 | `ibm-plex-mono-2.5.0-400.woff2` | `/assets/fonts/ibm-plex-mono-2.5.0-400.woff2` | 49248 | `ba204497f16b6d334cee9d1e963a831b73e3a56e1d6300a8489d18df7214b350` | https://cdn.jsdelivr.net/npm/@ibm/plex-mono@2.5.0/fonts/complete/woff2/IBMPlexMono-Regular.woff2 | OFL-1.1 |12 | `ibm-plex-mono-2.5.0-400.woff2` | `/assets/fonts/ibm-plex-mono-2.5.0-400.woff2` | 49248 | `ba204497f16b6d334cee9d1e963a831b73e3a56e1d6300a8489d18df7214b350` | https://cdn.jsdelivr.net/npm/@ibm/plex-mono@2.5.0/fonts/complete/woff2/IBMPlexMono-Regular.woff2 | OFL-1.1 |
@@ -13,10 +16,11 @@ Both fonts are embedded in the forge binary (`include_bytes!` in `crates/forge-w
13 | `Figtree-OFL.txt` | `/assets/fonts/Figtree-OFL.txt` | 4498 | `ee23e6c84000126692e112ff067b456470493349f993ceaa8b4d3766dd6fad5d` | https://cdn.jsdelivr.net/npm/@fontsource-variable/figtree@5.3.0/LICENSE | OFL-1.1 |16 | `Figtree-OFL.txt` | `/assets/fonts/Figtree-OFL.txt` | 4498 | `ee23e6c84000126692e112ff067b456470493349f993ceaa8b4d3766dd6fad5d` | https://cdn.jsdelivr.net/npm/@fontsource-variable/figtree@5.3.0/LICENSE | OFL-1.1 |
14 | `IBMPlexMono-OFL.txt` | `/assets/fonts/IBMPlexMono-OFL.txt` | 4456 | `7e6b2818edbd8f6a01ae80641cc8f16a51080d08fb4e532be3a0b6f74adb07da` | https://cdn.jsdelivr.net/npm/@ibm/plex-mono@2.5.0/LICENSE.txt | OFL-1.1 |17 | `IBMPlexMono-OFL.txt` | `/assets/fonts/IBMPlexMono-OFL.txt` | 4456 | `7e6b2818edbd8f6a01ae80641cc8f16a51080d08fb4e532be3a0b6f74adb07da` | https://cdn.jsdelivr.net/npm/@ibm/plex-mono@2.5.0/LICENSE.txt | OFL-1.1 |
15 18
16-Total of the six `.woff2` files: 234092 bytes (about 229 KiB). The two license texts add 8954 bytes.19+Total of the eight `.woff2` files: 410436 bytes (about 401 KiB). The three license texts add 13457 bytes.
17 20
18 ## Notes21 ## Notes
19 22
23+- **Archivo** (Copyright 2020 The Archivo Project Authors). Used for page titles and major headings only, through `--display` in `style/main.scss`. Its `wdth` axis (62% to 125%) is declared with `font-stretch: 62% 125%`. The `unicode-range` values are the same as Figtree's, so Turkish letters use the latin-ext file. No Reserved Font Name is declared in the license.
20 - **Figtree** (Copyright 2022 The Figtree Project Authors). Obtained from the `@fontsource-variable/figtree` package, which repackages the upstream Figtree variable font (weights 300-900) as woff2 per Unicode subset. The `latin` and `latin-ext` files are used; the `unicode-range` values in `style/main.scss` are copied from the package's `wght.css`. No Reserved Font Name is declared in the license.24 - **Figtree** (Copyright 2022 The Figtree Project Authors). Obtained from the `@fontsource-variable/figtree` package, which repackages the upstream Figtree variable font (weights 300-900) as woff2 per Unicode subset. The `latin` and `latin-ext` files are used; the `unicode-range` values in `style/main.scss` are copied from the package's `wght.css`. No Reserved Font Name is declared in the license.
21 - **IBM Plex Mono** (Copyright 2017 IBM Corp., Reserved Font Name "Plex"). The files are IBM's own unmodified woff2 files from `@ibm/plex-mono`, not re-subset or re-encoded, so the Reserved Font Name is not affected.25 - **IBM Plex Mono** (Copyright 2017 IBM Corp., Reserved Font Name "Plex"). The files are IBM's own unmodified woff2 files from `@ibm/plex-mono`, not re-subset or re-encoded, so the Reserved Font Name is not affected.
22 - Each woff2 was checked to start with the `wOF2` magic bytes.26 - Each woff2 was checked to start with the `wOF2` magic bytes.
style/fonts/archivo-5.3.0-latin-ext-wdth.woff2added+0 -0

Binary file changed

style/fonts/archivo-5.3.0-latin-wdth.woff2added+0 -0

Binary file changed

style/main.scssmodified+65 -23
@@ -26,6 +26,31 @@
26 U+2C60-2C7F, U+A720-A7FF;26 U+2C60-2C7F, U+A720-A7FF;
27 }27 }
28 28
29+// Archivo (SIL OFL 1.1) is the display face for page titles and major headings. Its wdth axis
30+// (62% to 125%) is used by font-stretch; the subsets and unicode-range values match Figtree's.
31+@font-face {
32+ font-family: "Archivo";
33+ font-style: normal;
34+ font-weight: 400 800;
35+ font-stretch: 62% 125%;
36+ font-display: swap;
37+ src: url("/assets/fonts/archivo-5.3.0-latin-wdth.woff2") format("woff2");
38+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
39+ U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
40+}
41+
42+@font-face {
43+ font-family: "Archivo";
44+ font-style: normal;
45+ font-weight: 400 800;
46+ font-stretch: 62% 125%;
47+ font-display: swap;
48+ src: url("/assets/fonts/archivo-5.3.0-latin-ext-wdth.woff2") format("woff2");
49+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
50+ U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
51+ U+2C60-2C7F, U+A720-A7FF;
52+}
53+
29 // IBM Plex Mono (SIL OFL 1.1), unmodified; "Plex" is a Reserved Font Name.54 // IBM Plex Mono (SIL OFL 1.1), unmodified; "Plex" is a Reserved Font Name.
30 @font-face {55 @font-face {
31 font-family: "IBM Plex Mono";56 font-family: "IBM Plex Mono";
@@ -104,6 +129,8 @@
104 --radius-full: 999px;129 --radius-full: 999px;
105 --control-h: 36px;130 --control-h: 36px;
106 --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;131 --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
132+ // Page titles and major headings only (see _look.scss); body text stays on --font.
133+ --display: "Archivo", var(--font);
107 --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;134 --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
108 --topbar-h: 52px;135 --topbar-h: 52px;
109 --sidebar-w: 232px;136 --sidebar-w: 232px;
@@ -285,7 +312,7 @@ pre {
285 }312 }
286 313
287 &[open] summary {314 &[open] summary {
288- border-color: var(--accent);315+ border-color: var(--border-strong);
289 }316 }
290 }317 }
291 318
@@ -384,7 +411,7 @@ main {
384 }411 }
385 412
386 &.notice {413 &.notice {
387- border-color: var(--accent);414+ border-color: var(--border-strong);
388 }415 }
389 }416 }
390 417
@@ -1047,6 +1074,10 @@ code {
1047 .search-file-name {1074 .search-file-name {
1048 font-size: 1rem;1075 font-size: 1rem;
1049 margin: 0 0 4px;1076 margin: 0 0 4px;
1077+
1078+ a {
1079+ color: var(--text);
1080+ }
1050 }1081 }
1051 1082
1052 .search-hits {1083 .search-hits {
@@ -1157,7 +1188,7 @@ code {
1157 }1188 }
1158 1189
1159 &[open] summary {1190 &[open] summary {
1160- border-color: var(--accent);1191+ border-color: var(--border-strong);
1161 }1192 }
1162 1193
1163 code {1194 code {
@@ -1404,7 +1435,7 @@ code {
1404 text-decoration: none;1435 text-decoration: none;
1405 1436
1406 &:hover {1437 &:hover {
1407- color: var(--accent);1438+ color: var(--text);
1408 }1439 }
1409 }1440 }
1410 }1441 }
@@ -1444,6 +1475,7 @@ code {
1444 a,1475 a,
1445 span {1476 span {
1446 word-break: break-all;1477 word-break: break-all;
1478+ color: var(--text);
1447 }1479 }
1448 1480
1449 span[aria-current] {1481 span[aria-current] {
@@ -1566,7 +1598,7 @@ code {
1566 line-height: 1.5;1598 line-height: 1.5;
1567 1599
1568 &:hover {1600 &:hover {
1569- border-color: var(--accent);1601+ border-color: var(--border-strong);
1570 text-decoration: none;1602 text-decoration: none;
1571 }1603 }
1572 }1604 }
@@ -2970,7 +3002,7 @@ code {
2970 align-items: center;3002 align-items: center;
2971 height: 44px;3003 height: 44px;
2972 padding: 0 14px;3004 padding: 0 14px;
2973- color: var(--accent-ink);3005+ color: var(--text);
2974 font-weight: 600;3006 font-weight: 600;
2975 cursor: pointer;3007 cursor: pointer;
2976 list-style: none;3008 list-style: none;
@@ -3160,6 +3192,10 @@ code {
3160 h3 {3192 h3 {
3161 margin: 0 0 4px;3193 margin: 0 0 4px;
3162 font-size: 1rem;3194 font-size: 1rem;
3195+
3196+ a {
3197+ color: var(--text);
3198+ }
3163 }3199 }
3164 3200
3165 p {3201 p {
@@ -3196,7 +3232,7 @@ code {
3196 3232
3197 summary {3233 summary {
3198 cursor: pointer;3234 cursor: pointer;
3199- color: var(--accent);3235+ color: var(--text);
3200 }3236 }
3201 3237
3202 .remove-form {3238 .remove-form {
@@ -3237,7 +3273,7 @@ code {
3237 width: 16rem;3273 width: 16rem;
3238 max-width: 100%;3274 max-width: 100%;
3239 height: 0.75rem;3275 height: 0.75rem;
3240- accent-color: var(--accent);3276+ accent-color: var(--text-2);
3241 }3277 }
3242 }3278 }
3243 3279
@@ -3642,7 +3678,7 @@ code {
3642 cursor: pointer;3678 cursor: pointer;
3643 3679
3644 &:hover {3680 &:hover {
3645- border-color: var(--accent);3681+ border-color: var(--border-strong);
3646 }3682 }
3647 }3683 }
3648 3684
@@ -3902,8 +3938,8 @@ span.reaction {
3902 width: 18px;3938 width: 18px;
3903 line-height: 18px;3939 line-height: 18px;
3904 border-radius: 4px;3940 border-radius: 4px;
3905- background: var(--accent);3941+ background: var(--surface-2);
3906- color: var(--accent-text);3942+ color: var(--text);
3907 font-family: var(--mono);3943 font-family: var(--mono);
3908 text-decoration: none;3944 text-decoration: none;
3909 text-align: center;3945 text-align: center;
@@ -4135,7 +4171,7 @@ span.reaction {
4135 4171
4136 .review-inline-form {4172 .review-inline-form {
4137 padding: 10px 12px;4173 padding: 10px 12px;
4138- border: 1px solid var(--accent);4174+ border: 1px solid var(--border-strong);
4139 border-radius: var(--radius-lg);4175 border-radius: var(--radius-lg);
4140 background: var(--surface);4176 background: var(--surface);
4141 white-space: normal;4177 white-space: normal;
@@ -4203,7 +4239,7 @@ span.reaction {
4203 .recent-push {4239 .recent-push {
4204 background: var(--surface);4240 background: var(--surface);
4205 border: 1px solid var(--border);4241 border: 1px solid var(--border);
4206- border-left: 3px solid var(--accent);4242+ border-left: 3px solid var(--border-strong);
4207 border-radius: var(--radius-lg);4243 border-radius: var(--radius-lg);
4208 margin: 0;4244 margin: 0;
4209 padding: 10px 12px;4245 padding: 10px 12px;
@@ -4477,8 +4513,8 @@ span.reaction {
4477 min-width: 1.4rem;4513 min-width: 1.4rem;
4478 padding: 0 0.4rem;4514 padding: 0 0.4rem;
4479 border-radius: var(--radius-full);4515 border-radius: var(--radius-full);
4480- background: var(--accent);4516+ background: var(--text);
4481- color: var(--accent-text);4517+ color: var(--bg);
4482 font-size: 0.75rem;4518 font-size: 0.75rem;
4483 line-height: 1.4rem;4519 line-height: 1.4rem;
4484 text-align: center;4520 text-align: center;
@@ -4556,7 +4592,7 @@ span.reaction {
4556 text-decoration: none;4592 text-decoration: none;
4557 4593
4558 &:hover {4594 &:hover {
4559- color: var(--accent);4595+ color: var(--text);
4560 text-decoration: underline;4596 text-decoration: underline;
4561 }4597 }
4562 }4598 }
@@ -4657,7 +4693,7 @@ span.reaction {
4657 }4693 }
4658 4694
4659 &[open] summary {4695 &[open] summary {
4660- border-color: var(--accent);4696+ border-color: var(--border-strong);
4661 }4697 }
4662 }4698 }
4663 4699
@@ -5203,7 +5239,7 @@ $ansi-colours: (
5203 1: var(--danger),5239 1: var(--danger),
5204 2: var(--ok),5240 2: var(--ok),
5205 3: var(--warn),5241 3: var(--warn),
5206- 4: var(--accent),5242+ 4: var(--info),
5207 5: var(--important),5243 5: var(--important),
5208 6: var(--tip),5244 6: var(--tip),
5209 7: var(--text-2),5245 7: var(--text-2),
@@ -5541,18 +5577,18 @@ progress.runner-meter {
5541 border-radius: 2px;5577 border-radius: 2px;
5542 overflow: hidden;5578 overflow: hidden;
5543 background: var(--surface-2);5579 background: var(--surface-2);
5544- color: var(--accent);5580+ color: var(--text-2);
5545 5581
5546 &::-webkit-progress-bar {5582 &::-webkit-progress-bar {
5547 background: var(--surface-2);5583 background: var(--surface-2);
5548 }5584 }
5549 5585
5550 &::-webkit-progress-value {5586 &::-webkit-progress-value {
5551- background: var(--accent);5587+ background: var(--text-2);
5552 }5588 }
5553 5589
5554 &::-moz-progress-bar {5590 &::-moz-progress-bar {
5555- background: var(--accent);5591+ background: var(--text-2);
5556 }5592 }
5557 }5593 }
5558 5594
@@ -7231,7 +7267,7 @@ button.ci-job-last {
7231 }7267 }
7232 7268
7233 &[open] > summary {7269 &[open] > summary {
7234- border-color: var(--accent);7270+ border-color: var(--border-strong);
7235 }7271 }
7236 }7272 }
7237 7273
@@ -7915,7 +7951,7 @@ button.ci-job-last {
7915 font-weight: 500;7951 font-weight: 500;
7916 7952
7917 &:hover {7953 &:hover {
7918- border-color: var(--accent);7954+ border-color: var(--border-strong);
7919 background: var(--surface);7955 background: var(--surface);
7920 }7956 }
7921 }7957 }
@@ -8020,8 +8056,14 @@ button.ci-job-last {
8020 }8056 }
8021 @import "repo_side";8057 @import "repo_side";
8022 @import "ci_estimate";8058 @import "ci_estimate";
8059+@import "timeline";
8023 @import "density";8060 @import "density";
8024 @import "keyboard";8061 @import "keyboard";
8025 @import "review_flow";8062 @import "review_flow";
8026 @import "commit_page";8063 @import "commit_page";
8027 @import "commit_line";8064 @import "commit_line";
8065+@import "timeline_ci";
8066+@import "continuity";
8067+// Last on purpose: the look pass (Archivo titles, mono labels, tone depth, page wash) restyles
8068+// shared classes above it.
8069+@import "look";