forge
Explore
Log in

Don't you dare go Hollow

Every page follows one design language: pages run the full window width, repo pages have one head row with the tabs and actions and every other page has a page head at the same height, lists and details sit in panes that fill the window, section headings are labels, and empty states are left aligned

Browse files at this commit

9011044ce16dd1a1c050f1b0118c18e4c0922ad5Ahmet Kaan GümüşParent: 474bafa
All checks have passed
Show checks
  • style
    • every page follows one design language: pages run the full window width, repo pages have one head row with the tabs and actions and every other page has a page head at the same height, lists and details sit in panes that fill the window, section headings are labels, and empty states are left aligned
    • the repo page is calmer, with a thin dock under the panes, a tree column that hides Last commit when narrow and no repeated title or description
    • issue labels wrap as left-aligned chips
  • feat
    • every link, back and forward uses the same page transition, not only list rows
  • fix
    • the sticky file header no longer covers code on a commit's diff
    • the latest commit bar parses the commit message like the lists do
    • the CI timeline's text stays one size on wide windows and a job label is no longer cut off at the edge
  • refactor
    • dead CI job CSS is removed
Show full message
💄 style: every page follows one design language: pages run the full window width, repo pages have one head row with the tabs and actions and every other page has a page head at the same height, lists and details sit in panes that fill the window, section headings are labels, and empty states are left aligned; the repo page is calmer, with a thin dock under the panes, a tree column that hides Last commit when narrow and no repeated title or description; issue labels wrap as left-aligned chips; ✨ feat: every link, back and forward uses the same page transition, not only list rows; 🐛 fix: the sticky file header no longer covers code on a commit's diff; the latest commit bar parses the commit message like the lists do; the CI timeline's text stays one size on wide windows and a job label is no longer cut off at the edge; ♻️ refactor: dead CI job CSS is removed

137 changed files +2588 -917

crates/forge-core/src/store/contributions.rsmodified+5 -1
@@ -430,7 +430,11 @@ mod tests {
430430 let since = "2026-03-01T00:00:00.000000000Z";
431431 let until = "2026-03-02T00:00:00.000000000Z";
432432 assert_eq!(
433- store.contribution_counts(&tahinli.id, since, "UTC").await.unwrap().len(),
433+ store
434+ .contribution_counts(&tahinli.id, since, "UTC")
435+ .await
436+ .unwrap()
437+ .len(),
434438 1
435439 );
436440
crates/forge-core/src/store/migrate.rsmodified+8 -2
@@ -106,10 +106,16 @@ pub const MIGRATIONS: &[(u32, &str)] = &[
106106 (64, include_str!("../../migrations/0064_merge_queue.sql")),
107107 (65, include_str!("../../migrations/0065_hue_colours.sql")),
108108 (66, include_str!("../../migrations/0066_session_ip.sql")),
109- (67, include_str!("../../migrations/0067_coauthored_commits.sql")),
109+ (
110+ 67,
111+ include_str!("../../migrations/0067_coauthored_commits.sql"),
112+ ),
110113 (68, include_str!("../../migrations/0068_ci_jobs_runner.sql")),
111114 (69, include_str!("../../migrations/0069_user_prefs.sql")),
112- (70, include_str!("../../migrations/0070_pull_viewed_files.sql")),
115+ (
116+ 70,
117+ include_str!("../../migrations/0070_pull_viewed_files.sql"),
118+ ),
113119 ];
114120
115121 /// The highest migration version this binary knows about.
crates/forge-core/src/store/needs.rsmodified+12 -3
@@ -272,8 +272,11 @@ impl Store {
272272
273273 /// How many issues `assigned_issues` lists in all.
274274 pub async fn assigned_issues_total(&self, user_id: &str) -> Result<u64> {
275- self.count_rows(&assigned_issues_sql(&readable_repo()), viewer_params(user_id))
276- .await
275+ self.count_rows(
276+ &assigned_issues_sql(&readable_repo()),
277+ viewer_params(user_id),
278+ )
279+ .await
277280 }
278281
279282 /// The user's unread mentions, newest first, one page at a time. Mentions in repos the user
@@ -347,7 +350,13 @@ mod tests {
347350 .set_repo_visibility(&repo.id, Visibility::Private)
348351 .await
349352 .unwrap();
350- assert!(store.assigned_issues(&bob.id, 8, 0).await.unwrap().is_empty());
353+ assert!(
354+ store
355+ .assigned_issues(&bob.id, 8, 0)
356+ .await
357+ .unwrap()
358+ .is_empty()
359+ );
351360 assert_eq!(store.assigned_issues_total(&bob.id).await.unwrap(), 0);
352361 }
353362 }
crates/forge-core/src/store/pull_viewed.rsmodified+1 -5
@@ -64,11 +64,7 @@ impl Store {
6464 let conn = self.inner.conn.lock().await;
6565 conn.execute(
6666 "DELETE FROM pull_viewed_files WHERE user_id = ?1 AND issue_id = ?2 AND path = ?3",
67- (
68- user_id.to_string(),
69- issue_id.to_string(),
70- path.to_string(),
71- ),
67+ (user_id.to_string(), issue_id.to_string(), path.to_string()),
7268 )
7369 .await
7470 .map_err(db_err)?;
crates/forge-core/src/store/user_prefs.rsmodified+12 -3
@@ -72,12 +72,21 @@ mod tests {
7272 async fn density_and_sound_round_trip_and_replace() {
7373 let dir = tempfile::tempdir().unwrap();
7474 let store = Store::open(&dir.path().join("forge.db")).await.unwrap();
75- let user = store.create_user("tahinli", None, "unused", false).await.unwrap();
75+ let user = store
76+ .create_user("tahinli", None, "unused", false)
77+ .await
78+ .unwrap();
7679
7780 assert!(store.user_prefs(&user.id).await.unwrap().is_empty());
78- store.set_user_pref(&user.id, DENSITY, "compact").await.unwrap();
81+ store
82+ .set_user_pref(&user.id, DENSITY, "compact")
83+ .await
84+ .unwrap();
7985 store.set_user_pref(&user.id, SOUND, "on").await.unwrap();
80- store.set_user_pref(&user.id, DENSITY, "comfortable").await.unwrap();
86+ store
87+ .set_user_pref(&user.id, DENSITY, "comfortable")
88+ .await
89+ .unwrap();
8190
8291 let prefs = store.user_prefs(&user.id).await.unwrap();
8392 assert_eq!(prefs.get(DENSITY).map(String::as_str), Some("comfortable"));
crates/forge-git/src/search.rsmodified+3 -9
@@ -343,15 +343,9 @@ mod tests {
343343 assert!(res.truncated, "max matches");
344344
345345 // No match is an empty result, not an error.
346- let res = grep(
347- &env,
348- &repo,
349- &oid,
350- "zzz-not-here",
351- GrepOptions::default(),
352- )
353- .await
354- .unwrap();
346+ let res = grep(&env, &repo, &oid, "zzz-not-here", GrepOptions::default())
347+ .await
348+ .unwrap();
355349 assert!(res.hits.is_empty(), "no match");
356350 assert!(!res.truncated, "no match");
357351 }
crates/forge-git/src/trailers.rsmodified+6 -1
@@ -30,7 +30,12 @@ pub fn strip_co_authors(message: &str) -> String {
3030 let kept: Vec<&str> = lines[..start]
3131 .iter()
3232 .copied()
33- .chain(lines[start..].iter().copied().filter(|line| !is_trailer(line)))
33+ .chain(
34+ lines[start..]
35+ .iter()
36+ .copied()
37+ .filter(|line| !is_trailer(line)),
38+ )
3439 .collect();
3540 kept.join("\n").trim_end().to_owned()
3641 }
crates/forge-runner/src/config.rsmodified+4 -1
@@ -700,7 +700,10 @@ mod tests {
700700 assert_eq!(bad.job_memory_limit(None), None);
701701 assert_eq!(bad.for_job(None).memory, "lots");
702702 // Builtin: no `memory` means the whole budget; a declared one keeps its slack.
703- assert_eq!(limits.for_builtin_job(None, Some(6 * gib)).memory, (6 * gib).to_string());
703+ assert_eq!(
704+ limits.for_builtin_job(None, Some(6 * gib)).memory,
705+ (6 * gib).to_string()
706+ );
704707 assert_eq!(
705708 limits.for_builtin_job(Some(gib), Some(6 * gib)).memory,
706709 limits.for_job(Some(gib)).memory
crates/forge-runner/src/executor.rsmodified+32 -7
@@ -15,9 +15,9 @@ use std::fs;
1515 use std::future::Future;
1616 use std::path::{Path, PathBuf};
1717 use std::pin::Pin;
18+use std::process::{ExitStatus, Stdio};
1819 use std::sync::Arc;
1920 use std::sync::atomic::{AtomicBool, Ordering};
20-use std::process::{ExitStatus, Stdio};
2121 use std::time::Duration;
2222
2323 use forge_ci::proto::{JobAssignment, Outcome};
@@ -135,7 +135,11 @@ pub fn job_env_with_defaults(
135135 let n = job_parallelism(limits);
136136 let mut pairs: Vec<(String, String)> = [
137137 ("FORGE_CPUS", n.to_string()),
138- ("FORGE_MEMORY_BYTES", crate::sandbox::spec::parse_bytes(&limits.memory).map_or_else(|_| "0".to_owned(), |b| b.to_string())),
138+ (
139+ "FORGE_MEMORY_BYTES",
140+ crate::sandbox::spec::parse_bytes(&limits.memory)
141+ .map_or_else(|_| "0".to_owned(), |b| b.to_string()),
142+ ),
139143 ("CARGO_BUILD_JOBS", n.to_string()),
140144 ("MAKEFLAGS", format!("-j{n}")),
141145 ("CMAKE_BUILD_PARALLEL_LEVEL", n.to_string()),
@@ -992,7 +996,13 @@ mod tests {
992996 fn sweep_removes_only_leftover_jobs_and_ulid_workspaces() {
993997 let dir = tempfile::tempdir().unwrap();
994998 let work = dir.path();
995- for d in ["jobs/job_01/overlay", "01JD6Z8Q4XW3N5R7T9V2B4C6E8/src", "oci", "notes", "check-7"] {
999+ for d in [
1000+ "jobs/job_01/overlay",
1001+ "01JD6Z8Q4XW3N5R7T9V2B4C6E8/src",
1002+ "oci",
1003+ "notes",
1004+ "check-7",
1005+ ] {
9961006 fs::create_dir_all(work.join(d)).unwrap();
9971007 }
9981008 fs::create_dir_all(work.join(".cache")).unwrap();
@@ -1053,7 +1063,15 @@ mod tests {
10531063 .collect();
10541064 assert_eq!(
10551065 names,
1056- vec!["FORGE_CPUS", "FORGE_MEMORY_BYTES", "CARGO_BUILD_JOBS", "MAKEFLAGS", "CMAKE_BUILD_PARALLEL_LEVEL", "PLAIN", "MY_TOKEN"]
1066+ vec![
1067+ "FORGE_CPUS",
1068+ "FORGE_MEMORY_BYTES",
1069+ "CARGO_BUILD_JOBS",
1070+ "MAKEFLAGS",
1071+ "CMAKE_BUILD_PARALLEL_LEVEL",
1072+ "PLAIN",
1073+ "MY_TOKEN"
1074+ ]
10571075 );
10581076 }
10591077
@@ -1096,12 +1114,19 @@ mod tests {
10961114 #[test]
10971115 fn parallelism_defaults_follow_the_cpu_limit_and_job_env_wins() {
10981116 let mut job = fixture_job("true");
1099- let limits = Limits { cpus: "0.5".to_owned(), ..Limits::default() };
1117+ let limits = Limits {
1118+ cpus: "0.5".to_owned(),
1119+ ..Limits::default()
1120+ };
11001121 let env = job_env_with_defaults(&job, &limits).expect("env");
11011122 assert!(env.contains(&("CARGO_BUILD_JOBS".to_owned(), "1".to_owned())));
1102- job.env.insert("CARGO_BUILD_JOBS".to_owned(), "7".to_owned());
1123+ job.env
1124+ .insert("CARGO_BUILD_JOBS".to_owned(), "7".to_owned());
11031125 let env = job_env_with_defaults(&job, &limits).expect("env");
1104- let jobs: Vec<_> = env.iter().filter(|(k, _)| k == "CARGO_BUILD_JOBS").collect();
1126+ let jobs: Vec<_> = env
1127+ .iter()
1128+ .filter(|(k, _)| k == "CARGO_BUILD_JOBS")
1129+ .collect();
11051130 assert_eq!(jobs, [&("CARGO_BUILD_JOBS".to_owned(), "7".to_owned())]);
11061131 }
11071132
crates/forge-runner/src/lib.rsmodified+1 -1
@@ -14,8 +14,8 @@ pub mod disk;
1414 pub mod executor;
1515 pub mod limiter;
1616 pub mod logs;
17-pub mod metrics;
1817 pub mod memory;
18+pub mod metrics;
1919 pub mod oci;
2020 pub mod oom;
2121 pub mod pressure;
crates/forge-runner/src/sandbox/helper.rsmodified+3 -2
@@ -248,8 +248,9 @@ fn prepare_dirs(layout: &Layout) -> Result<(), SandboxError> {
248248 fs::set_permissions(dir, fs::Permissions::from_mode(0o700))
249249 .map_err(SandboxError::io(format!("cannot chmod {}", dir.display())))?;
250250 }
251- fs::set_permissions(&layout.tmp, fs::Permissions::from_mode(0o1777))
252- .map_err(SandboxError::io(format!("cannot chmod {}", layout.tmp.display())))?;
251+ fs::set_permissions(&layout.tmp, fs::Permissions::from_mode(0o1777)).map_err(
252+ SandboxError::io(format!("cannot chmod {}", layout.tmp.display())),
253+ )?;
253254 Ok(())
254255 }
255256
crates/forge-runner/src/workspace.rsmodified+10 -2
@@ -211,13 +211,21 @@ mod tests {
211211 fn clone_urls_are_checked_against_the_forge_scheme() {
212212 // (clone url, forge url, accepted)
213213 let cases: &[(&str, &str, bool)] = &[
214- ("https://forge.example/o/r.git", "https://forge.example", true),
214+ (
215+ "https://forge.example/o/r.git",
216+ "https://forge.example",
217+ true,
218+ ),
215219 ("--upload-pack=sh", "https://forge.example", false),
216220 ("ext::sh -c id", "https://forge.example", false),
217221 ("https://a b/x", "https://forge.example", false),
218222 // Plain http is only accepted when the forge itself is http.
219223 ("http://forge.example/o/r.git", "http://forge.example", true),
220- ("http://forge.example/o/r.git", "https://forge.example", false),
224+ (
225+ "http://forge.example/o/r.git",
226+ "https://forge.example",
227+ false,
228+ ),
221229 ];
222230 for (url, forge, ok) in cases {
223231 assert_eq!(validate_clone_url(url, forge).is_ok(), *ok, "case {url}");
crates/forge-runner/tests/integration/builtin.rsmodified+12 -5
@@ -321,7 +321,10 @@ async fn sigkilled_helper_leaves_no_process_behind() {
321321 "job process {pid} survived the helper"
322322 );
323323 }
324- assert!(!dir.path().join("jobs").join(job_id).exists(), "job dir was kept");
324+ assert!(
325+ !dir.path().join("jobs").join(job_id).exists(),
326+ "job dir was kept"
327+ );
325328 }
326329
327330 #[tokio::test]
@@ -344,9 +347,13 @@ async fn network_job_gets_its_own_network_without_private_ranges() {
344347 assert!(logs.contains("meta=blocked"), "{logs}");
345348 assert!(!logs.contains("pasta is not installed"), "{logs}");
346349 let pid_file = dir.path().join("jobs/job_01/pasta.pid");
347- let leftover = fs::read_dir("/proc").expect("read /proc").flatten().any(|entry| {
348- fs::read(entry.path().join("cmdline"))
349- .is_ok_and(|cmd| String::from_utf8_lossy(&cmd).contains(&*pid_file.to_string_lossy()))
350- });
350+ let leftover = fs::read_dir("/proc")
351+ .expect("read /proc")
352+ .flatten()
353+ .any(|entry| {
354+ fs::read(entry.path().join("cmdline")).is_ok_and(|cmd| {
355+ String::from_utf8_lossy(&cmd).contains(&*pid_file.to_string_lossy())
356+ })
357+ });
351358 assert!(!leftover, "pasta outlived the job");
352359 }
crates/forge-web/assets/nav.jsmodified+22 -16
@@ -352,12 +352,14 @@
352352 else { window.scrollTo(0, 0); }
353353 }
354354
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.
355+ // Continuity: every navigation (a link, back or forward) is one calm View Transition. The top bar and
356+ // the repo head stay still, the active tab slides to its new place, and the page body fades in. A link
357+ // from a row also grows into the title of the page it opens: the row takes the name forge-row once the
358+ // response has arrived, the new page's title takes it in the transition's update callback, where the
359+ // swap runs. Names are on only for the transition: `html.is-navigating` in _continuity.scss, and the
360+ // row's and title's own names are removed when it ends, since a duplicate name aborts a transition.
361+ // Without the API or with reduced motion the swap runs as it always has. Live refreshes and form
362+ // posts never animate.
361363 var MORPH_NAME = 'forge-row';
362364
363365 // The title a row grows into, by page: commit, issue and pull, CI run and job, a repo's title row,
@@ -375,8 +377,10 @@
375377 }
376378
377379 function morph(row, run) {
378- if (!row || !document.startViewTransition || motionHeld()) { run(); return undefined; }
379- row.style.viewTransitionName = MORPH_NAME;
380+ if (!document.startViewTransition || motionHeld()) { run(); return undefined; }
381+ var root = document.documentElement;
382+ root.classList.add('is-navigating');
383+ if (row) { row.style.viewTransitionName = MORPH_NAME; }
380384 return new Promise(function (resolve, reject) {
381385 var ran = false;
382386 var title = null;
@@ -384,9 +388,9 @@
384388 if (ran) { return; }
385389 ran = true;
386390 // The old row leaves the page now, so its name goes with it.
387- row.style.viewTransitionName = '';
391+ if (row) { row.style.viewTransitionName = ''; }
388392 try { run(); } catch (err) { reject(err); return; }
389- title = pageTitle();
393+ title = row ? pageTitle() : null;
390394 if (title) { title.style.viewTransitionName = MORPH_NAME; }
391395 resolve();
392396 }
@@ -400,10 +404,12 @@
400404 // A skipped transition may never call its callback: the swap then runs here instead.
401405 transition.ready.catch(function () { });
402406 transition.updateCallbackDone.then(update, update);
403- transition.finished.then(function () {
404- row.style.viewTransitionName = '';
407+ var done = function () {
408+ root.classList.remove('is-navigating');
409+ if (row) { row.style.viewTransitionName = ''; }
405410 if (title) { title.style.viewTransitionName = ''; }
406- }, function () { });
411+ };
412+ transition.finished.then(done, done);
407413 });
408414 }
409415
@@ -560,8 +566,8 @@
560566 // Other parts of this file follow page changes through this event (list memory, say).
561567 document.dispatchEvent(new CustomEvent('forge:swapped', { detail: { how: how, url: dest } }));
562568 };
563- // A link from a row swaps inside its transition, and the load counts as done only after it.
564- if (how === 'nav' && o.morph) { return morph(o.morph, finish); }
569+ // A navigation swaps inside its transition, and the load counts as done only after it.
570+ if (how === 'nav' || how === 'pop') { return morph(o.morph, finish); }
565571 finish();
566572 }).catch(function () {
567573 if (mark !== latest || o.how === 'live') { return; }
@@ -1594,7 +1600,7 @@
15941600 }
15951601 saveScroll();
15961602 // The row the link sits in, if any: the page it opens grows out of that row (see morph).
1597- var row = a.closest('[data-kb-row]');
1603+ var row = a.closest('nav, .repo-tabs, .pathbar, .topbar') ? null : a.closest('[data-kb-row], tbody tr, ul > li');
15981604 load({ target: withoutHash(url), dest: url, init: GET_INIT, how: 'nav', keep: false, post: false, form: null, morph: row });
15991605 }, true);
16001606
crates/forge-web/src/advisories/worker.rsmodified+8 -6
@@ -217,12 +217,14 @@ async fn import(state: &AppState, ecosystem: &str, path: &Path) -> Result<()> {
217217 let owned_path = path.to_owned();
218218 let eco = ecosystem.to_owned();
219219 let parser = tokio::task::spawn_blocking(move || -> usize {
220- let parsed = File::open(&owned_path).map_err(Error::from).and_then(|file| {
221- read_dump(BufReader::new(file), &eco, |batch| {
222- tx.blocking_send(Ok(Some(batch)))
223- .map_err(|_| Error::Invalid("advisory import was stopped".into()))
224- })
225- });
220+ let parsed = File::open(&owned_path)
221+ .map_err(Error::from)
222+ .and_then(|file| {
223+ read_dump(BufReader::new(file), &eco, |batch| {
224+ tx.blocking_send(Ok(Some(batch)))
225+ .map_err(|_| Error::Invalid("advisory import was stopped".into()))
226+ })
227+ });
226228 // The store commits only on `Ok(None)`, so a panic above (sender dropped) rolls back.
227229 match parsed {
228230 Ok(skipped) => {
crates/forge-web/src/api/releases.rsmodified+6 -1
@@ -656,7 +656,12 @@ mod tests {
656656 401,
657657 false,
658658 ),
659- ("token without repo scope", Some(scopeless.as_str()), 403, false),
659+ (
660+ "token without repo scope",
661+ Some(scopeless.as_str()),
662+ 403,
663+ false,
664+ ),
660665 ];
661666 for (name, auth, want, error_body) in cases {
662667 let (status, body) = post_json(&f, auth, r#"{"tag":"v1"}"#).await;
crates/forge-web/src/api/statuses.rsmodified+105 -18
@@ -344,13 +344,12 @@ mod tests {
344344 #[tokio::test]
345345 async fn refused_writes_return_their_status() {
346346 let s = setup(Visibility::Public).await;
347- let owner = s
348- .fx
349- .store
350- .user_by_username(OWNER)
351- .await
352- .unwrap()
353- .expect("owner");
347+ let owner =
348+ s.fx.store
349+ .user_by_username(OWNER)
350+ .await
351+ .unwrap()
352+ .expect("owner");
354353 let session = generate_token();
355354 crate::test_support::create_session(&s.fx.store, &owner.id, &session, "csrf-value").await;
356355 let cookie = format!("__Host-{SESSION_COOKIE}={session}");
@@ -361,18 +360,106 @@ mod tests {
361360 let bad_sha = report_uri("abc123");
362361 let missing = report_uri(&"0".repeat(40));
363362 // (case, uri, auth, cookie, body, expected status, expects a JSON error body)
364- type Case<'a> = (&'a str, &'a str, Option<&'a str>, Option<&'a str>, Option<&'a str>, u16, bool);
363+ type Case<'a> = (
364+ &'a str,
365+ &'a str,
366+ Option<&'a str>,
367+ Option<&'a str>,
368+ Option<&'a str>,
369+ u16,
370+ bool,
371+ );
365372 let cases: [Case<'_>; 10] = [
366- ("read-only token", report.as_str(), Some(reader.as_str()), None, Some(SUCCESS), 403, true),
367- ("anonymous", report.as_str(), None, None, Some(SUCCESS), 401, true),
368- ("bad token", report.as_str(), Some("Bearer forge_not_a_real_token"), None, Some(SUCCESS), 401, false),
369- ("session cookie alone", report.as_str(), None, Some(cookie.as_str()), Some(SUCCESS), 401, false),
370- ("token without repo scope", report.as_str(), Some(unscoped.as_str()), None, Some(SUCCESS), 403, false),
371- ("sha too short", bad_sha.as_str(), Some(writer.as_str()), None, Some(SUCCESS), 422, false),
372- ("unknown state", report.as_str(), Some(writer.as_str()), None, Some(r#"{"state":"maybe"}"#), 422, false),
373- ("malformed json", report.as_str(), Some(writer.as_str()), None, Some("{not json"), 400, false),
374- ("javascript target url", report.as_str(), Some(writer.as_str()), None, Some(r#"{"state":"success","target_url":"javascript:alert(1)"}"#), 422, false),
375- ("unknown commit", missing.as_str(), Some(writer.as_str()), None, Some(SUCCESS), 404, false),
373+ (
374+ "read-only token",
375+ report.as_str(),
376+ Some(reader.as_str()),
377+ None,
378+ Some(SUCCESS),
379+ 403,
380+ true,
381+ ),
382+ (
383+ "anonymous",
384+ report.as_str(),
385+ None,
386+ None,
387+ Some(SUCCESS),
388+ 401,
389+ true,
390+ ),
391+ (
392+ "bad token",
393+ report.as_str(),
394+ Some("Bearer forge_not_a_real_token"),
395+ None,
396+ Some(SUCCESS),
397+ 401,
398+ false,
399+ ),
400+ (
401+ "session cookie alone",
402+ report.as_str(),
403+ None,
404+ Some(cookie.as_str()),
405+ Some(SUCCESS),
406+ 401,
407+ false,
408+ ),
409+ (
410+ "token without repo scope",
411+ report.as_str(),
412+ Some(unscoped.as_str()),
413+ None,
414+ Some(SUCCESS),
415+ 403,
416+ false,
417+ ),
418+ (
419+ "sha too short",
420+ bad_sha.as_str(),
421+ Some(writer.as_str()),
422+ None,
423+ Some(SUCCESS),
424+ 422,
425+ false,
426+ ),
427+ (
428+ "unknown state",
429+ report.as_str(),
430+ Some(writer.as_str()),
431+ None,
432+ Some(r#"{"state":"maybe"}"#),
433+ 422,
434+ false,
435+ ),
436+ (
437+ "malformed json",
438+ report.as_str(),
439+ Some(writer.as_str()),
440+ None,
441+ Some("{not json"),
442+ 400,
443+ false,
444+ ),
445+ (
446+ "javascript target url",
447+ report.as_str(),
448+ Some(writer.as_str()),
449+ None,
450+ Some(r#"{"state":"success","target_url":"javascript:alert(1)"}"#),
451+ 422,
452+ false,
453+ ),
454+ (
455+ "unknown commit",
456+ missing.as_str(),
457+ Some(writer.as_str()),
458+ None,
459+ Some(SUCCESS),
460+ 404,
461+ false,
462+ ),
376463 ];
377464 for (name, uri, auth, cookie, body, want, error_body) in cases {
378465 let (status, json) = send(&s.fx.router, "POST", uri, auth, cookie, body).await;
crates/forge-web/src/auth.rsmodified+1 -1
@@ -11,10 +11,10 @@ use forge_core::session::{new_csrf_token, new_session_token};
1111 use forge_core::time::stamp_after;
1212 use forge_core::token::{constant_time_eq, hash_token};
1313 use forge_core::{Session, Store, User, secret, totp};
14+use tokio::sync::Semaphore;
1415 use topcoat::Result;
1516 use topcoat::context::{Cx, app_context};
1617 use topcoat::cookie::{Cookie, Cookies, SameSite, cookies, time};
17-use tokio::sync::Semaphore;
1818 use topcoat::router::error::{forbidden, see_other};
1919 use topcoat::router::request::{headers, uri};
2020
crates/forge-web/src/backup/tests.rsmodified+4 -1
@@ -417,7 +417,10 @@ async fn failed_backups_leave_no_partial_directory() {
417417 .expect("out")
418418 .map(|e| e.expect("entry").file_name().to_string_lossy().into_owned())
419419 .collect();
420- assert!(left.is_empty(), "case broken repo, nothing may be left behind: {left:?}");
420+ assert!(
421+ left.is_empty(),
422+ "case broken repo, nothing may be left behind: {left:?}"
423+ );
421424 }
422425
423426 #[tokio::test]
crates/forge-web/src/ci/api.rsmodified+8 -2
@@ -254,7 +254,9 @@ fn target_labels(target: Option<&str>) -> Vec<String> {
254254 let plain = |part: &str| {
255255 !part.is_empty()
256256 && part.len() <= 32
257- && part.bytes().all(|b| b.is_ascii_lowercase() || b.is_ascii_digit() || b == b'_')
257+ && part
258+ .bytes()
259+ .all(|b| b.is_ascii_lowercase() || b.is_ascii_digit() || b == b'_')
258260 };
259261 match target.split_once('-') {
260262 Some((arch, os)) if plain(arch) && plain(os) => {
@@ -781,7 +783,11 @@ async fn heartbeat(cx: &Cx) -> topcoat::Result<Response> {
781783 // A busy runner only heartbeats here. Its state is read only when it is not
782784 // recorded online, so a steady heartbeat costs a map lookup.
783785 if !state.ci_live.runner_recorded_online(runner_id) {
784- let disabled = state.store.runner_disabled(runner_id).await.unwrap_or(false);
786+ let disabled = state
787+ .store
788+ .runner_disabled(runner_id)
789+ .await
790+ .unwrap_or(false);
785791 state.ci_live.note_runner_online(runner_id, !disabled);
786792 }
787793 let said = headers(cx)
crates/forge-web/src/ci/mod.rsmodified+1 -1
@@ -12,9 +12,9 @@ use crate::state::AppState;
1212
1313 pub mod api;
1414 pub mod live;
15+pub mod metrics_chart;
1516 pub mod reaper;
1617 pub mod release;
17-pub mod metrics_chart;
1818 pub mod runner_log;
1919 pub mod runner_metrics;
2020 pub mod schedule;
crates/forge-web/src/ci/release.rsmodified+9 -2
@@ -370,7 +370,10 @@ fn grouped_bullets(commits: &[CommitInfo], footer_len: usize) -> String {
370370 .iter()
371371 .flat_map(|group| {
372372 let section = section_of(&group.kind);
373- group.clauses.iter().map(move |clause| (section, clause.clone()))
373+ group
374+ .clauses
375+ .iter()
376+ .map(move |clause| (section, clause.clone()))
374377 })
375378 .collect(),
376379 None => vec![(section_of(""), commit.summary.clone())],
@@ -645,7 +648,11 @@ title = "forge {tag}"
645648 let release = release_named(&fx, "v1.1").await.expect("release made");
646649 let short = &oid[..7];
647650 assert!(release.body.starts_with("### Features\n- one ("));
648- assert!(release.body.contains(&format!("### Fixes\n- two ({short})")));
651+ assert!(
652+ release
653+ .body
654+ .contains(&format!("### Fixes\n- two ({short})"))
655+ );
649656 assert!(release.body.ends_with("Full changelog: v1.0...v1.1"));
650657 assert!(
651658 !release.body.contains("- change ("),
crates/forge-web/src/ci/schedule.rsmodified+7 -2
@@ -1185,7 +1185,8 @@ run = "make"
11851185 (
11861186 "kept",
11871187 on(
1188- &CONFIG_SUPERSEDE.replace("cancel_superseded = true", "cancel_superseded = false"),
1188+ &CONFIG_SUPERSEDE
1189+ .replace("cancel_superseded = true", "cancel_superseded = false"),
11891190 "kept",
11901191 ),
11911192 false,
@@ -1217,7 +1218,11 @@ run = "make"
12171218 assert_eq!(second.state, RunState::Queued, "{case}: the newest run");
12181219 if cancelled {
12191220 let jobs = store.jobs_for_run(&first.id).await.unwrap();
1220- assert_eq!(state_of(&jobs, "build"), Some(JobState::Cancelled), "{case}");
1221+ assert_eq!(
1222+ state_of(&jobs, "build"),
1223+ Some(JobState::Cancelled),
1224+ "{case}"
1225+ );
12211226 }
12221227 }
12231228 }
crates/forge-web/src/exporter.rsmodified+7 -4
@@ -279,9 +279,8 @@ async fn stage_repo(state: &AppState, repo: &Repo, dir: &Path) -> Result<(), Str
279279 write_json(&dir.join("repo.json"), &meta).await?;
280280
281281 // Issues go to the file as they are built, so a repo's issues are never all in memory at once.
282- let mut out = BufWriter::new(
283- std::fs::File::create(dir.join("issues.json")).map_err(|e| e.to_string())?,
284- );
282+ let mut out =
283+ BufWriter::new(std::fs::File::create(dir.join("issues.json")).map_err(|e| e.to_string())?);
285284 let mut written = 0usize;
286285 let mut page = 1;
287286 loop {
@@ -316,7 +315,11 @@ async fn stage_repo(state: &AppState, repo: &Repo, dir: &Path) -> Result<(), Str
316315 .map_err(|e| e.to_string())?;
317316 let names: HashMap<String, String> =
318317 names.into_iter().map(|(k, (name, _))| (k, name)).collect();
319- write_array_item(&mut out, &mut written, &issue_json(&item, &comments, &names))?;
318+ write_array_item(
319+ &mut out,
320+ &mut written,
321+ &issue_json(&item, &comments, &names),
322+ )?;
320323 }
321324 if got == 0 || (u64::from(page) * u64::from(PAGE)) >= total {
322325 break;
crates/forge-web/src/i18n/integrations.rsmodified+7 -13
@@ -339,12 +339,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
339339 (HookArchivedNotice, Tr) => {
340340 "Bu depo arşivlenmiş. Web kancaları salt okunurdur: değiştirilemez, test edilemez ya da yeniden teslim edilemez."
341341 }
342- (HookNoticeConfirm, En) => {
343- "The delete was not confirmed. Nothing was deleted."
344- }
345- (HookNoticeConfirm, Tr) => {
346- "Silme onaylanmadı. Hiçbir şey silinmedi."
347- }
342+ (HookNoticeConfirm, En) => "The delete was not confirmed. Nothing was deleted.",
343+ (HookNoticeConfirm, Tr) => "Silme onaylanmadı. Hiçbir şey silinmedi.",
348344 (HookNoticeCreated, En) => "Webhook created. A ping was queued.",
349345 (HookNoticeCreated, Tr) => "Web kancası oluşturuldu. Bir ping sıraya alındı.",
350346 (HookNoticeDeleted, En) => "Webhook deleted.",
@@ -374,17 +370,15 @@ pub fn t(lang: Lang, key: K) -> &'static str {
374370 (NoMirrors, En) => "No mirrors yet.",
375371 (NoMirrors, Tr) => "Henüz yansı yok.",
376372 (NoWebhooks, En) => "No webhooks yet. Add one to send events to another service.",
377- (NoWebhooks, Tr) => "Henüz web kancası yok. Olayları başka bir servise göndermek için bir tane ekleyin.",
373+ (NoWebhooks, Tr) => {
374+ "Henüz web kancası yok. Olayları başka bir servise göndermek için bir tane ekleyin."
375+ }
378376 (NoneYet, En) => "none yet",
379377 (NoneYet, Tr) => "henüz yok",
380378 (NoResponse, En) => "no response",
381379 (NoResponse, Tr) => "yanıt yok",
382- (NoticeConfirm, En) => {
383- "The delete was not confirmed. Nothing was deleted."
384- }
385- (NoticeConfirm, Tr) => {
386- "Silme onaylanmadı. Hiçbir şey silinmedi."
387- }
380+ (NoticeConfirm, En) => "The delete was not confirmed. Nothing was deleted.",
381+ (NoticeConfirm, Tr) => "Silme onaylanmadı. Hiçbir şey silinmedi.",
388382 (NoticeCreated, En) => {
389383 "Push mirror created. It will be pushed after the next push or on its interval."
390384 }
crates/forge-web/src/i18n/link.rsmodified+10 -1
@@ -51,7 +51,16 @@ mod tests {
5151 #[test]
5252 fn every_string_has_no_em_dash() {
5353 for lang in [Lang::En, Lang::Tr] {
54- for key in [K::Restarting, K::BackSubmit, K::Saved, K::Done, K::DraftRestored, K::DraftDiscard, K::SelectFilter, K::SelectNone] {
54+ for key in [
55+ K::Restarting,
56+ K::BackSubmit,
57+ K::Saved,
58+ K::Done,
59+ K::DraftRestored,
60+ K::DraftDiscard,
61+ K::SelectFilter,
62+ K::SelectNone,
63+ ] {
5564 assert!(!t(lang, key).contains('\u{2014}'));
5665 }
5766 }
crates/forge-web/src/i18n/migrate.rsmodified+7 -2
@@ -286,7 +286,10 @@ fn pair(key: K) -> (&'static str, &'static str) {
286286 K::JobProgress => ("Progress", "İlerleme"),
287287 K::JobNoLog => ("Nothing yet.", "Henüz bir şey yok."),
288288 K::JobStarted => ("Started", "Başladı"),
289- K::RetryFailedTitle => ("Retry failed imports", "Başarısız içe aktarmaları yeniden dene"),
289+ K::RetryFailedTitle => (
290+ "Retry failed imports",
291+ "Başarısız içe aktarmaları yeniden dene",
292+ ),
290293 K::RetrySelected => ("Retry selected", "Seçilenleri yeniden dene"),
291294 K::RetryNone => ("No failed imports", "Başarısız içe aktarma yok"),
292295 K::RetryTokenHelp => (
@@ -369,7 +372,9 @@ pub fn export_ttl_note(lang: Lang, days: u64) -> String {
369372 pub fn bulk_skipped(lang: Lang, list: &str) -> String {
370373 match lang {
371374 Lang::En => format!("Not imported: {list}. Import them one by one to choose another name."),
372- Lang::Tr => format!("İçe aktarılmayanlar: {list}. Başka bir ad seçmek için onları tek tek içe aktarın."),
375+ Lang::Tr => format!(
376+ "İçe aktarılmayanlar: {list}. Başka bir ad seçmek için onları tek tek içe aktarın."
377+ ),
373378 }
374379 }
375380
crates/forge-web/src/i18n/misc.rsmodified+9 -3
@@ -666,7 +666,9 @@ pub fn t(lang: Lang, key: K) -> &'static str {
666666 (InvalidRepoName, Tr) => "geçersiz depo adı",
667667 (ReadmeLabel, En) => "Add a README",
668668 (ReadmeLabel, Tr) => "README ekle",
669- (ReadmeHelp, En) => "A README.md with the name and description, so the repository is not empty.",
669+ (ReadmeHelp, En) => {
670+ "A README.md with the name and description, so the repository is not empty."
671+ }
670672 (ReadmeHelp, Tr) => "Adı ve açıklamasıyla bir README.md; depo boş başlamaz.",
671673 (LicenseLabel, En) => "License",
672674 (LicenseLabel, Tr) => "Lisans",
@@ -676,8 +678,12 @@ pub fn t(lang: Lang, key: K) -> &'static str {
676678 (LicenseHelp, Tr) => "Tam metniyle bir LICENSE dosyası ekler.",
677679 (UnknownLicense, En) => "unknown license",
678680 (UnknownLicense, Tr) => "Bilinmeyen lisans.",
679- (MirrorWithFiles, En) => "A mirror fills the repository from its source; leave README and license off.",
680- (MirrorWithFiles, Tr) => "Yansı, depoyu kaynağından doldurur; README ve lisansı kapalı bırakın.",
681+ (MirrorWithFiles, En) => {
682+ "A mirror fills the repository from its source; leave README and license off."
683+ }
684+ (MirrorWithFiles, Tr) => {
685+ "Yansı, depoyu kaynağından doldurur; README ve lisansı kapalı bırakın."
686+ }
681687 (ContributionsTitle, En) => "Contributions",
682688 (ContributionsTitle, Tr) => "Katkılar",
683689 (ContributionsLastYear, En) => "contributions in the last year",
crates/forge-web/src/i18n/pulls.rsmodified+6 -2
@@ -116,8 +116,12 @@ pub fn t(lang: Lang, key: K) -> &'static str {
116116 (FiltersApplied, Tr) => "Filtreler uygulandı · ",
117117 (ClearFilters, En) => "Clear filters",
118118 (ClearFilters, Tr) => "Filtreleri temizle",
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. Bir dal gönderin, ardından değişikliklerini önermek için bir çekme isteği açın.",
119+ (NoPullRequestsYet, En) => {
120+ "No pull requests yet. Push a branch, then open one to propose its changes."
121+ }
122+ (NoPullRequestsYet, Tr) => {
123+ "Henüz çekme isteği yok. Bir dal gönderin, ardından değişikliklerini önermek için bir çekme isteği açın."
124+ }
121125 (NoPullRequestsMatch, En) => "No pull requests match these filters.",
122126 (NoPullRequestsMatch, Tr) => "Bu filtrelere uyan çekme isteği yok.",
123127 (SortNewest, En) => "Newest",
crates/forge-web/src/i18n/repo_admin.rsmodified+2 -6
@@ -499,12 +499,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
499499 (TypeToConfirmBefore, Tr) => "Onaylamak için ",
500500 (UnarchiveRepo, En) => "Unarchive repository",
501501 (UnarchiveRepo, Tr) => "Depoyu arşivden çıkar",
502- (UnderstandNeeded, En) => {
503- "The change was not confirmed. Nothing was changed."
504- }
505- (UnderstandNeeded, Tr) => {
506- "Değişiklik onaylanmadı. Hiçbir şey değiştirilmedi."
507- }
502+ (UnderstandNeeded, En) => "The change was not confirmed. Nothing was changed.",
503+ (UnderstandNeeded, Tr) => "Değişiklik onaylanmadı. Hiçbir şey değiştirilmedi.",
508504 (UnknownUser, En) => "No user has that username.",
509505 (UnknownUser, Tr) => "Bu kullanıcı adına sahip bir kullanıcı yok.",
510506 (Username, En) => "Username",
crates/forge-web/src/importer/tests.rsmodified+14 -2
@@ -313,7 +313,13 @@ async fn git_url_import_copies_all_branches_and_tags_into_a_normal_repo() {
313313 &Transport::Local("/nonexistent/path.git".into()),
314314 )
315315 .await;
316- let bad_job = fx.state.store.import_job(&bad_job.id).await.unwrap().unwrap();
316+ let bad_job = fx
317+ .state
318+ .store
319+ .import_job(&bad_job.id)
320+ .await
321+ .unwrap()
322+ .unwrap();
317323 assert_eq!(bad_job.state, ImportState::Failed);
318324 assert!(bad_job.error.is_some());
319325 }
@@ -513,7 +519,13 @@ async fn retry_submit_leaves_another_users_failed_job_alone() {
513519 .set_import_state(&job.id, ImportState::Failed, Some("rate limit"))
514520 .await
515521 .unwrap();
516- create_session(&fx.state.store, &other.id, "retry-other-session", "retry-csrf").await;
522+ create_session(
523+ &fx.state.store,
524+ &other.id,
525+ "retry-other-session",
526+ "retry-csrf",
527+ )
528+ .await;
517529
518530 let router = app_router(fx.state.clone());
519531 let cookie = format!("__Host-{SESSION_COOKIE}=retry-other-session");
crates/forge-web/src/internal.rsmodified+4 -1
@@ -253,7 +253,10 @@ async fn admin_live_endpoint(cx: &Cx, body: Body) -> topcoat::Result<Response> {
253253 for id in &req.account_ids {
254254 state.live.bump(&Topic::Account(id.clone()));
255255 }
256- Ok(admin_response(StatusCode::OK, serde_json::json!({ "ok": true })))
256+ Ok(admin_response(
257+ StatusCode::OK,
258+ serde_json::json!({ "ok": true }),
259+ ))
257260 }
258261
259262 /// `POST /internal/admin/lfs-gc`. The body is ignored.
crates/forge-web/src/live.rsmodified+19 -16
@@ -293,25 +293,28 @@ where
293293 topics.iter().map(|topic| hub.subscribe(topic)).collect();
294294 wakes.extend(extra);
295295 let last = read().await?;
296- Ok(stream::unfold(Follow { wakes, read, last }, move |mut follow| async move {
297- loop {
298- if !wait_any(&mut follow.wakes).await {
299- return None;
300- }
301- let now = match (follow.read)().await {
302- Ok(now) => now,
303- Err(e) => {
304- tracing::error!(error = %e, "live: could not read the page state");
296+ Ok(stream::unfold(
297+ Follow { wakes, read, last },
298+ move |mut follow| async move {
299+ loop {
300+ if !wait_any(&mut follow.wakes).await {
305301 return None;
306302 }
307- };
308- if now == follow.last {
309- continue;
303+ let now = match (follow.read)().await {
304+ Ok(now) => now,
305+ Err(e) => {
306+ tracing::error!(error = %e, "live: could not read the page state");
307+ return None;
308+ }
309+ };
310+ if now == follow.last {
311+ continue;
312+ }
313+ follow.last = now;
314+ return Some((named_event(name), follow));
310315 }
311- follow.last = now;
312- return Some((named_event(name), follow));
313- }
314- }))
316+ },
317+ ))
315318 }
316319
317320 #[cfg(test)]
crates/forge-web/src/mail/templates.rsmodified+5 -1
@@ -217,7 +217,11 @@ mod tests {
217217 fn subject_names_the_repo_title_and_number_and_stays_on_one_line() {
218218 // A plain title is named as-is; a newline in the title cannot split the subject.
219219 let cases = [
220- ("plain", "Crash on start", "[bob/widgets] Crash on start (#7)"),
220+ (
221+ "plain",
222+ "Crash on start",
223+ "[bob/widgets] Crash on start (#7)",
224+ ),
221225 ("newline", "two\r\nlines", "[bob/widgets] two lines (#7)"),
222226 ];
223227 for (name, title, want) in cases {
crates/forge-web/src/main.rsmodified+5 -2
@@ -49,8 +49,8 @@ mod pulls_sync;
4949 mod raw;
5050 mod release_ops;
5151 mod render;
52-mod repo_stats;
5352 mod replication;
53+mod repo_stats;
5454 mod self_update;
5555 mod signatures;
5656 mod ssh_backend;
@@ -145,7 +145,10 @@ fn reexec_with_allocator_env(raw: &[std::ffi::OsString]) {
145145 };
146146 use std::os::unix::process::CommandExt;
147147 // exec only returns on failure; the server then runs on without the variable.
148- let e = std::process::Command::new(exe).args(raw).env(VAR, "0").exec();
148+ let e = std::process::Command::new(exe)
149+ .args(raw)
150+ .env(VAR, "0")
151+ .exec();
149152 eprintln!("forge: cannot re-run with {VAR}=0: {e}");
150153 }
151154
crates/forge-web/src/pages/activity.rsmodified+2 -2
@@ -15,10 +15,10 @@ use topcoat::router::{Body, HeaderValue, StatusCode, route};
1515
1616 use crate::auth::current_user;
1717 use crate::pages::ci_runs::{changed_stream, events_response, run_href};
18-use futures_util::Stream;
19-use topcoat::router::content::sse::Event;
2018 use crate::state::AppState;
2119 use crate::views::repo_href;
20+use futures_util::Stream;
21+use topcoat::router::content::sse::Event;
2222
2323 /// How far back a finished run still counts as recent in the activity JSON, in seconds.
2424 const RECENT_SECS: i64 = 120;
crates/forge-web/src/pages/admin_backups.rsmodified+1 -1
@@ -141,8 +141,8 @@ async fn backups_view(
141141 <div data-live="/admin/backups/events">
142142 <section class="page-head">
143143 <h1>(g::t(lang, K::Backups))</h1>
144- <p class="muted">(g::t(lang, K::BackupsIntro))</p>
145144 </section>
145+ <p class="muted page-lede">(g::t(lang, K::BackupsIntro))</p>
146146 if let Some(message) = notice {
147147 <section class="card notice" role="status">
148148 <p>(message.as_str())</p>
crates/forge-web/src/pages/admin_health.rsmodified+9 -11
@@ -446,12 +446,10 @@ async fn alert_rows(state: &AppState, lang: Lang) -> Result<Vec<AlertRow>> {
446446 .active_alerts()
447447 .await?
448448 .into_iter()
449- .map(|alert| {
450- AlertRow {
451- title: alert_text::title(lang, &alert.kind, &alert.subject, false),
452- body: alert_text::body(lang, &alert.kind, &alert.subject, &alert.detail, false),
453- stamp: alert.raised_at.clone(),
454- }
449+ .map(|alert| AlertRow {
450+ title: alert_text::title(lang, &alert.kind, &alert.subject, false),
451+ body: alert_text::body(lang, &alert.kind, &alert.subject, &alert.detail, false),
452+ stamp: alert.raised_at.clone(),
455453 })
456454 .collect())
457455 }
@@ -498,12 +496,12 @@ async fn health_view(
498496 <div data-live="/admin/health/events" class="health-page">
499497 <section class="page-head">
500498 <h1>(at(lang, A::Health))</h1>
501- <p class="health-summary">
502- <span class=(format!("health-dot {}", summary_dot.class()))></span>
503- (summary)
504- </p>
505- <p class="muted small">(at(lang, A::HealthIntro))</p>
506499 </section>
500+ <p class="health-summary page-lede">
501+ <span class=(format!("health-dot {}", summary_dot.class()))></span>
502+ (summary)
503+ </p>
504+ <p class="muted small page-lede">(at(lang, A::HealthIntro))</p>
507505 if count > 0 {
508506 <section class="admin-alerts" role="alert">
509507 <h2>(alert_text::banner_heading(lang, count))</h2>
crates/forge-web/src/pages/admin_live_tests.rsmodified+5 -1
@@ -280,5 +280,9 @@ async fn backups_replication_health_and_server_send_for_their_changes() {
280280
281281 // Any saved or reset setting wakes the server stream.
282282 admin().bump(&Topic::AdminServer);
283- assert_eq!(next_event(&mut settings).await, changed("settings"), "setting");
283+ assert_eq!(
284+ next_event(&mut settings).await,
285+ changed("settings"),
286+ "setting"
287+ );
284288 }
crates/forge-web/src/pages/admin_mail.rsmodified+1 -1
@@ -230,8 +230,8 @@ async fn mail_view(
230230 Ok(view! {
231231 <section class="page-head">
232232 <h1>(g::t(lang, K::Mail))</h1>
233- <p class="muted">(g::t(lang, K::MailIntro))</p>
234233 </section>
234+ <p class="muted page-lede">(g::t(lang, K::MailIntro))</p>
235235 <nav class="subnav" aria-label=(g::t(lang, K::Mail))>
236236 <a class=(settings_class) href="/admin/mail">(g::t(lang, K::MailTabSettings))</a>
237237 <a class=(queue_class) href="/admin/mail?tab=queue">(g::t(lang, K::MailTabQueue))</a>
crates/forge-web/src/pages/admin_replication.rsmodified+1 -1
@@ -191,8 +191,8 @@ async fn replication_view(
191191 <div data-live="/admin/replication/events">
192192 <section class="page-head">
193193 <h1>(g::t(lang, K::Replication))</h1>
194- <p class="muted">(g::t(lang, K::ReplicationIntro))</p>
195194 </section>
195+ <p class="muted page-lede">(g::t(lang, K::ReplicationIntro))</p>
196196 if let Some(message) = notice {
197197 <section class="card notice" role="status">
198198 <p>(message.as_str())</p>
crates/forge-web/src/pages/admin_runners.rsmodified+25 -15
@@ -26,12 +26,12 @@ use topcoat::router::{page, path_param, query_params, route};
2626 use topcoat::view::{View, component, view};
2727
2828 use crate::audit::{self, Actor, Target};
29+use crate::auth::check_csrf;
2930 use crate::ci::metrics_chart::{self, Bucket};
3031 use crate::ci::runner_log::Line;
31-use crate::auth::check_csrf;
3232 use crate::i18n::admin::{self as g, K};
33-use crate::i18n::{self, Key, Lang};
3433 use crate::i18n::releases_ci as rc;
34+use crate::i18n::{self, Key, Lang};
3535 use crate::pages::admin_users::admin_only;
3636 use crate::pages::ci_runs::{age_text, duration_text, events_response, run_href, state_text};
3737 use crate::pages::repo_mirrors::stamp_in_tz;
@@ -555,7 +555,13 @@ async fn concurrency_form(
555555 let meter_max = max.max(1).to_string();
556556 let use_pips = (1..=PIP_MAX).contains(&max);
557557 let pips: Vec<&'static str> = (0..max)
558- .map(|slot| if slot < running { "runner-pip is-on" } else { "runner-pip" })
558+ .map(|slot| {
559+ if slot < running {
560+ "runner-pip is-on"
561+ } else {
562+ "runner-pip"
563+ }
564+ })
559565 .collect();
560566 let pips_label = match lang {
561567 Lang::En => format!("{running} of {max} jobs running"),
@@ -1465,16 +1471,8 @@ fn mx_chart(
14651471 caption,
14661472 legend,
14671473 grids: svg.grids.iter().map(|y| n(*y)).collect(),
1468- ticks: svg
1469- .ticks
1470- .iter()
1471- .map(|(y, v)| (n(*y), tick(*v)))
1472- .collect(),
1473- bands: svg
1474- .bands
1475- .iter()
1476- .map(|(x, w)| (n(*x), n(*w)))
1477- .collect(),
1474+ ticks: svg.ticks.iter().map(|(y, v)| (n(*y), tick(*v))).collect(),
1475+ bands: svg.bands.iter().map(|(x, w)| (n(*x), n(*w))).collect(),
14781476 paths: svg
14791477 .paths
14801478 .into_iter()
@@ -1552,7 +1550,12 @@ fn metrics_view(lang: Lang, samples: &[RunnerSample], now_ms: i64) -> MetricsVie
15521550 &[(rx_of, "mx-line"), (tx_of, "mx-line mx-line-sent")],
15531551 false,
15541552 &rate_text,
1555- &|b| vec![format!("↓ {}", rate_text(b.rx)), format!("↑ {}", rate_text(b.tx))],
1553+ &|b| {
1554+ vec![
1555+ format!("↓ {}", rate_text(b.rx)),
1556+ format!("↑ {}", rate_text(b.tx)),
1557+ ]
1558+ },
15561559 net_caption,
15571560 vec![
15581561 ("mx-key", s(lang, "Received", "Alınan")),
@@ -2520,7 +2523,14 @@ mod tests {
25202523 store.list_runners().await.unwrap()[0].concurrency_override,
25212524 None
25222525 );
2523- let (status, _) = send(&router, "GET", "/admin/runners/events", Some(USER_TOKEN), None).await;
2526+ let (status, _) = send(
2527+ &router,
2528+ "GET",
2529+ "/admin/runners/events",
2530+ Some(USER_TOKEN),
2531+ None,
2532+ )
2533+ .await;
25242534 assert_eq!(status, 404);
25252535 let (status, _) = send(&router, "GET", &detail_uri, Some(USER_TOKEN), None).await;
25262536 assert_eq!(status, 404);
crates/forge-web/src/pages/admin_server.rsmodified+15 -5
@@ -235,9 +235,9 @@ async fn server_view(
235235 <div data-live=(live.as_str()) class="srv-page">
236236 <section class="page-head">
237237 <h1>(g::t(lang, K::ServerSettings))</h1>
238- <p class="muted">(g::t(lang, K::ServerSettingsIntro))</p>
239- <p class="muted small">(match lang { Lang::Tr => "Sürüm", _ => "Version" }) " " (forge_ci::build::display())</p>
240238 </section>
239+ <p class="muted page-lede">(g::t(lang, K::ServerSettingsIntro))</p>
240+ <p class="muted small page-lede">(match lang { Lang::Tr => "Sürüm", _ => "Version" }) " " (forge_ci::build::display())</p>
241241 if restart == Restart::Pending {
242242 <section class="card notice srv-restarting" role="status" aria-live="polite">
243243 <p><strong>(s(lang, "Restarting...", "Yeniden başlatılıyor..."))</strong> " " (s(lang, "This page comes back by itself when the server is up again.", "Sunucu tekrar ayağa kalkınca bu sayfa kendiliğinden geri gelir."))</p>
@@ -682,8 +682,14 @@ mod tests {
682682 send(&fx.router, "POST", "/admin/server/reset", token, Some(form)).await;
683683 assert_eq!(post, 404);
684684 let form = format!("csrf={CSRF}&tab=general");
685- let (post, _, _) =
686- send(&fx.router, "POST", "/admin/server/restart", token, Some(form)).await;
685+ let (post, _, _) = send(
686+ &fx.router,
687+ "POST",
688+ "/admin/server/restart",
689+ token,
690+ Some(form),
691+ )
692+ .await;
687693 assert_eq!(post, 404, "restart");
688694 let (events, _, _) = send(&fx.router, "GET", "/admin/server/events", token, None).await;
689695 assert_eq!(events, 404, "events");
@@ -861,7 +867,11 @@ mod tests {
861867 .filter(|e| e.action == AuditAction::ServerSettingsUpdated)
862868 .collect();
863869 assert!(updates.iter().any(|e| e.data.contains("ci.max_log_mb")));
864- assert!(updates.iter().any(|e| e.data.contains("backup.healthcheck_url")));
870+ assert!(
871+ updates
872+ .iter()
873+ .any(|e| e.data.contains("backup.healthcheck_url"))
874+ );
865875 for entry in &updates {
866876 assert!(!entry.data.contains("77"), "{}", entry.data);
867877 assert!(!entry.data.contains("TOPSECRET"), "{}", entry.data);
crates/forge-web/src/pages/admin_user_detail.rsmodified+8 -2
@@ -24,7 +24,9 @@ use crate::live::{Topic, stream_changes};
2424 use crate::pages::admin_users::admin_only;
2525 use crate::pages::passkeys::s;
2626 use crate::state::AppState;
27-use crate::views::{alert, avatar_url, enc, rel_time, rel_time_or_never, shell, user_facing_message};
27+use crate::views::{
28+ alert, avatar_url, enc, rel_time, rel_time_or_never, shell, user_facing_message,
29+};
2830
2931 #[query_params(error = bad_request)]
3032 pub(crate) struct DoneQuery {
@@ -138,7 +140,11 @@ async fn detail_body(
138140 "user-dot is-active"
139141 };
140142 let tfa_on = facts.two_factor;
141- let tfa = if tfa_on { at(lang, A::On) } else { at(lang, A::Off) };
143+ let tfa = if tfa_on {
144+ at(lang, A::On)
145+ } else {
146+ at(lang, A::Off)
147+ };
142148 let is_admin = target.is_admin;
143149 let suspended_note = match suspension.as_ref().map(|s| s.reason.clone()) {
144150 Some(reason) if !reason.is_empty() => reason,
crates/forge-web/src/pages/admin_users.rsmodified+1 -1
@@ -65,7 +65,7 @@ async fn users_view(
6565 <section class="page-head">
6666 <h1>(g::t(lang, K::Users))</h1>
6767 </section>
68- <section class="card">
68+ <section class="card fit-pane">
6969 <div class="table-wrap">
7070 <table class="table queue-table">
7171 <thead>
crates/forge-web/src/pages/audit_log.rsmodified+4 -10
@@ -148,8 +148,8 @@ async fn admin_audit_view(
148148 <div data-live=(live.as_str())>
149149 <section class="page-head">
150150 <h1>(g::t(lang, K::AuditLog))</h1>
151- <p class="muted">(g::t(lang, K::AuditIntro))</p>
152151 </section>
152+ <p class="muted page-lede">(g::t(lang, K::AuditIntro))</p>
153153 <section class="card">
154154 <form method="get" action="/admin/audit" class="filter-bar">
155155 <label class="filter-action">
@@ -194,8 +194,8 @@ async fn own_log_view(
194194 Ok(view! {
195195 <section class="page-head">
196196 <h1>(g::t(lang, K::SecurityLogTitle))</h1>
197- <p class="muted">(g::t(lang, K::OwnLogIntro))</p>
198197 </section>
198+ <p class="muted page-lede">(g::t(lang, K::OwnLogIntro))</p>
199199 <section class="card fit-pane fit-list">
200200 audit_table(lang: lang, rows: rows, show_actor: false)
201201 if let Some(href) = older_href {
@@ -237,10 +237,7 @@ async fn admin_audit_page(cx: &Cx) -> Result<impl View> {
237237 fetch_page(store, &filter, query.before.as_deref(), ADMIN_PAGE_SIZE).await?
238238 };
239239
240- let rows: Vec<RowView> = entries
241- .iter()
242- .map(|entry| row_view(entry, lang))
243- .collect();
240+ let rows: Vec<RowView> = entries.iter().map(|entry| row_view(entry, lang)).collect();
244241 let older_href = next.map(|cursor| {
245242 list_href(
246243 "/admin/audit",
@@ -315,10 +312,7 @@ async fn own_log_page(cx: &Cx) -> Result<impl View> {
315312 let (entries, next) =
316313 fetch_page(store, &filter, query.before.as_deref(), OWN_PAGE_SIZE).await?;
317314
318- let rows: Vec<RowView> = entries
319- .iter()
320- .map(|entry| row_view(entry, lang))
321- .collect();
315+ let rows: Vec<RowView> = entries.iter().map(|entry| row_view(entry, lang)).collect();
322316 let older_href =
323317 next.map(|cursor| list_href("/settings/security/log", &[("before", cursor.as_str())]));
324318 let title = g::t(lang, K::SecurityLogTitle);
crates/forge-web/src/pages/blame.rsmodified+1 -1
@@ -228,7 +228,7 @@ async fn blame_page(cx: &Cx) -> Result<impl View> {
228228 <div class="browse-bar">
229229 breadcrumb(lang: lang, crumbs: crumbs)
230230 </div>
231- <section class="file" data-lines="">
231+ <section class="file fit-pane" data-lines="">
232232 <header class="file-head">
233233 <span class="muted small">(b::t(lang, b::K::BlameTitle)) " \u{b7} " (size)</span>
234234 <nav class="file-actions" aria-label=(g::t(lang, K::FileNav))>
crates/forge-web/src/pages/branches.rsmodified+16 -10
@@ -155,7 +155,7 @@ async fn branch_table(
155155 </thead>
156156 <tbody>
157157 for row in rows.into_iter() {
158- <tr>
158+ <tr data-kb-row="">
159159 <td class="tree-name">
160160 <span class="tree-label">
161161 <a href=(row.href.as_str())>(row.name.as_str())</a>
@@ -313,15 +313,21 @@ async fn branches_page(cx: &Cx) -> Result<impl View> {
313313 <p class="notice" role="status">(b::t(lang, key))</p>
314314 }
315315 }
316- if can_write {
317- new_branch_form(lang: lang, action: action.clone(), csrf: csrf.clone(),
318- default_branch: default_branch, options: options)
319- }
320- if empty {
321- empty_state(title: g::t(lang, K::NothingHere))
322- } else {
323- branch_table(rows: rows, lang: lang, csrf: csrf.clone(), delete_action: delete_action, can_delete: can_write)
324- }
316+ <div class="lang-list fit-pane">
317+ <div class="list-bar">
318+ if can_write {
319+ new_branch_form(lang: lang, action: action.clone(), csrf: csrf.clone(),
320+ default_branch: default_branch, options: options)
321+ }
322+ </div>
323+ <div class="list-scroll">
324+ if empty {
325+ empty_state(title: g::t(lang, K::NothingHere))
326+ } else {
327+ branch_table(rows: rows, lang: lang, csrf: csrf.clone(), delete_action: delete_action, can_delete: can_write)
328+ }
329+ </div>
330+ </div>
325331 )
326332 })
327333 }
crates/forge-web/src/pages/ci_fail.rsmodified+1 -3
@@ -115,9 +115,7 @@ pub(crate) async fn read(
115115 /// The failure block. The job's name links to its page; the first error links to its line there.
116116 #[component]
117117 pub(crate) async fn fail_first_block(lang: Lang, fail: FailFirst) -> Result<impl View> {
118- let line_href = fail
119- .line_no
120- .map(|no| format!("{}#L{no}", fail.job_href));
118+ let line_href = fail.line_no.map(|no| format!("{}#L{no}", fail.job_href));
121119 Ok(view! {
122120 <section class="fail-first" data-fail-first="true">
123121 <p class="fail-first-head">
crates/forge-web/src/pages/ci_job.rsmodified+78 -68
@@ -351,7 +351,10 @@ async fn job_fingerprint_now(store: &Store, job_id: &str) -> Result<Option<Strin
351351 return Ok(None);
352352 };
353353 let artifacts = store.list_artifacts(job_id).await?;
354- let ids: Vec<&str> = artifacts.iter().map(|artifact| artifact.id.as_str()).collect();
354+ let ids: Vec<&str> = artifacts
355+ .iter()
356+ .map(|artifact| artifact.id.as_str())
357+ .collect();
355358 Ok(Some(job_fingerprint(
356359 job_status(&job),
357360 &ids,
@@ -375,74 +378,78 @@ async fn job_body(
375378 ) -> Result<impl View> {
376379 Ok(view! {
377380 repo_head(head: RepoHead { live: String::new(), ..head })
378- <div data-live=(live.as_str()) data-live-state=(job.fingerprint.as_str())>
379- <p class="muted small"><a href=(job.run_href.as_str())>(g::t(lang, K::RunNumber)) (job.run_number)</a></p>
380- <div class="ci-job-grid fit-pane">
381- <section class="card">
382- <h2 class="ci-job-title">(job.name.as_str())</h2>
383- <p class="muted small">
384- <span class=(job.state_class.as_str())>(job.state.as_str())</span>
385- if !job.runner.is_empty() {
386- " \u{b7} " (g::t(lang, K::Runner)) " " (job.runner.as_str())
387- }
388- if !job.exit_code.is_empty() {
389- " \u{b7} " (g::t(lang, K::Exit)) " " (job.exit_code.as_str())
390- }
391- </p>
392- if !job.started.is_empty() {
393- <p class="muted small">(g::t(lang, K::Started)) " " <time datetime=(job.started_full.as_str()) data-rel="true" title=(full_date(job.started_full.as_str()))>(job.started.as_str())</time></p>
394- }
395- if !job.finished.is_empty() {
396- <p class="muted small">(g::t(lang, K::Finished)) " " <time datetime=(job.finished_full.as_str()) data-rel="true" title=(full_date(job.finished_full.as_str()))>(job.finished.as_str())</time></p>
397- }
398- if !job.duration.is_empty() {
399- <p class="muted small">(g::t(lang, K::Duration)) " " (job.duration.as_str())</p>
400- }
401- if !job.message.is_empty() {
402- <p>(job.message.as_str())</p>
403- }
404- if let Some(kills) = job.oom_kills {
405- <p class="alert" title=(format!("oom_kill {kills}"))>(if matches!(lang, Lang::Tr) { "sonlandırıldı: bellek yetersiz" } else { "killed: out of memory" })</p>
406- }
407- if let Some((action, csrf)) = job.rerun.as_ref() {
408- <div class="ci-actions">
409- <form method="post" action=(action.as_str()) class="inline-form">
410- <input type="hidden" name="csrf" value=(csrf.as_str())>
411- <button type="submit" data-palette-action="post">(g::t(lang, K::RerunJob))</button>
412- </form>
381+ <div data-live=(live.as_str()) data-live-state=(job.fingerprint.as_str()) class="ci-job fit-pane">
382+ <header class="ci-tl-head">
383+ <div class="ci-tl-headmain">
384+ <div class="ci-tl-line">
385+ <span class="ci-tl-no"><a href=(job.run_href.as_str())>(g::t(lang, K::RunNumber)) (job.run_number)</a></span>
386+ <h2 class="ci-tl-title ci-job-title">(job.name.as_str())</h2>
387+ </div>
388+ <div class="ci-tl-meta">
389+ <span class=(job.state_class.as_str())>(job.state.as_str())</span>
390+ if !job.runner.is_empty() {
391+ <span class="muted">(g::t(lang, K::Runner)) " " (job.runner.as_str())</span>
392+ }
393+ if !job.exit_code.is_empty() {
394+ <span class="muted">(g::t(lang, K::Exit)) " " (job.exit_code.as_str())</span>
395+ }
396+ if !job.duration.is_empty() {
397+ <span class="ci-tl-dur">(g::t(lang, K::Duration)) " " (job.duration.as_str())</span>
398+ }
399+ </div>
413400 </div>
414- }
415- </section>
416- <section class="card ci-logcard">
417- <h2>(g::t(lang, K::Log))</h2>
418- <p class="muted small"><a href=(job.log_href.as_str())>(g::t(lang, K::FullLog))</a></p>
419- if truncated {
420- <p class="muted small">(g::t(lang, K::LogTruncated))</p>
421- }
422- <div class="ci-logbar">
423- <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">
424- <span class="ci-logcount" data-log-count="true" data-none=(g::t(lang, K::LogNoMatches)) aria-live="polite"></span>
425- <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>
426- <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>
427- <button type="button" class="ci-mini" data-copy-log=(job.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>
428- <span class="ci-logfold" data-log-fold-box="true" hidden="hidden">
429- <button type="button" class="ci-mini" data-log-fold="close">(g::t(lang, K::LogCollapseAll))</button>
430- <button type="button" class="ci-mini" data-log-fold="open">(g::t(lang, K::LogExpandAll))</button>
431- </span>
432- </div>
433- <pre class="ci-log" data-live-log="true" data-offset=(log_offset.as_str()) data-first=(first_line.as_str())>(log.as_str())</pre>
434- </section>
435- if !artifacts.is_empty() {
436- <section class="card">
437- <h2>(g::t(lang, K::Artifacts))</h2>
438- <ul class="ci-artifacts">
439- for artifact in artifacts.iter() {
440- <li><a href=(artifact.href.as_str())>(artifact.name.as_str())</a> " (" (artifact.size.as_str()) ")"</li>
401+ if let Some((action, csrf)) = job.rerun.as_ref() {
402+ <div class="ci-actions ci-tl-actions">
403+ <form method="post" action=(action.as_str()) class="inline-form">
404+ <input type="hidden" name="csrf" value=(csrf.as_str())>
405+ <button type="submit" data-palette-action="post">(g::t(lang, K::RerunJob))</button>
406+ </form>
407+ </div>
408+ }
409+ </header>
410+ <div class="ci-tl-main">
411+ <section class="card ci-tl-jobs">
412+ if !job.started.is_empty() {
413+ <p class="muted small">(g::t(lang, K::Started)) " " <time datetime=(job.started_full.as_str()) data-rel="true" title=(full_date(job.started_full.as_str()))>(job.started.as_str())</time></p>
441414 }
442- </ul>
443- </section>
444- }
445- </div>
415+ if !job.finished.is_empty() {
416+ <p class="muted small">(g::t(lang, K::Finished)) " " <time datetime=(job.finished_full.as_str()) data-rel="true" title=(full_date(job.finished_full.as_str()))>(job.finished.as_str())</time></p>
417+ }
418+ if !job.message.is_empty() {
419+ <p>(job.message.as_str())</p>
420+ }
421+ if let Some(kills) = job.oom_kills {
422+ <p class="alert" title=(format!("oom_kill {kills}"))>(if matches!(lang, Lang::Tr) { "sonlandırıldı: bellek yetersiz" } else { "killed: out of memory" })</p>
423+ }
424+ if !artifacts.is_empty() {
425+ <p class="ci-tl-label">(g::t(lang, K::Artifacts))</p>
426+ <ul class="ci-artifacts">
427+ for artifact in artifacts.iter() {
428+ <li><a href=(artifact.href.as_str())>(artifact.name.as_str())</a> " (" (artifact.size.as_str()) ")"</li>
429+ }
430+ </ul>
431+ }
432+ </section>
433+ <section class="card ci-tl-log">
434+ <div class="ci-logbar ci-tl-logbar">
435+ <span class="ci-tl-label">(g::t(lang, K::Log))</span>
436+ <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">
437+ <span class="ci-logcount" data-log-count="true" data-none=(g::t(lang, K::LogNoMatches)) aria-live="polite"></span>
438+ <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>
439+ <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>
440+ <button type="button" class="ci-mini" data-copy-log=(job.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>
441+ <a class="ci-mini" href=(job.log_href.as_str())>(g::t(lang, K::FullLog))</a>
442+ <span class="ci-logfold" data-log-fold-box="true" hidden="hidden">
443+ <button type="button" class="ci-mini" data-log-fold="close">(g::t(lang, K::LogCollapseAll))</button>
444+ <button type="button" class="ci-mini" data-log-fold="open">(g::t(lang, K::LogExpandAll))</button>
445+ </span>
446+ </div>
447+ if truncated {
448+ <p class="muted small">(g::t(lang, K::LogTruncated))</p>
449+ }
450+ <pre class="ci-log ci-tl-code" data-live-log="true" data-offset=(log_offset.as_str()) data-first=(first_line.as_str())>(log.as_str())</pre>
451+ </section>
452+ </div>
446453 </div>
447454 })
448455 }
@@ -632,7 +639,10 @@ fn job_stream(follow: JobFollow) -> impl Stream<Item = Result<Event>> + Send + '
632639 }
633640 if let Some((text, end)) = f.pending_log.take() {
634641 let text = if f.plain {
635- text.split('\n').map(strip_ansi).collect::<Vec<_>>().join("\n")
642+ text.split('\n')
643+ .map(strip_ansi)
644+ .collect::<Vec<_>>()
645+ .join("\n")
636646 } else {
637647 text
638648 };
crates/forge-web/src/pages/ci_runs.rsmodified+72 -47
@@ -34,22 +34,24 @@ use topcoat::view::{View, component, view};
3434
3535 use crate::auth::{current_user, require_csrf};
3636 use crate::ci::log_path;
37+use crate::i18n::timeline::{self as tl, K as TK};
3738 use crate::i18n::{
3839 self, Lang,
3940 releases_ci::{self as g, K},
4041 };
4142 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};
4643 use crate::pages::ci_fail::{self, FailFirst, fail_first_block};
44+use crate::pages::ci_job::{Tail, log_tail};
4745 use crate::pages::refs::load_refs;
4846 use crate::pages::repo::repo_head;
4947 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo, still_readable};
48+use crate::pages::repo_side::{commit_strip, run_states, strip_bars};
5049 use crate::state::AppState;
5150 use crate::views::commit_line::{commit_line, headline};
52-use crate::views::{alert, empty_state, enc, human_size, now_unix, rel_time, relative_time, shell, short_oid};
51+use crate::views::timeline::{StripBar, history_strip};
52+use crate::views::{
53+ alert, empty_state, enc, human_size, now_unix, rel_time, relative_time, shell, short_oid,
54+};
5355
5456 path_param!(owner);
5557 path_param!(repo);
@@ -294,7 +296,9 @@ pub(crate) async fn after_change(state: &AppState, run_id: &str, before: &[CiJob
294296 let changed = before
295297 .iter()
296298 .find(|old| old.id == job.id)
297- .is_none_or(|old| old.state != job.state || old.cancel_requested != job.cancel_requested);
299+ .is_none_or(|old| {
300+ old.state != job.state || old.cancel_requested != job.cancel_requested
301+ });
298302 if changed {
299303 if job.state.is_terminal() {
300304 state.ci_live.close_job(&job.id);
@@ -1130,7 +1134,13 @@ fn gantt(jobs: &[Timing], origin: i64, run_end: Option<i64>, now: i64, lang: Lan
11301134
11311135 /// The estimate of a running run: the time its jobs are expected to take, judged from the repo's
11321136 /// samples. None when a job still to run has no estimate yet.
1133-fn live_est(lang: Lang, run: &CiRun, jobs: &[Timing], samples: &[JobSample], now: i64) -> Option<Est> {
1137+fn live_est(
1138+ lang: Lang,
1139+ run: &CiRun,
1140+ jobs: &[Timing],
1141+ samples: &[JobSample],
1142+ now: i64,
1143+) -> Option<Est> {
11341144 let steps: Vec<Step> = jobs
11351145 .iter()
11361146 .map(|job| Step {
@@ -1403,7 +1413,10 @@ async fn runs_split(cx: &Cx, number: Option<&str>, job: Option<&str>) -> Result<
14031413 let samples = if live_refs.is_empty() {
14041414 Vec::new()
14051415 } else {
1406- state.store.recent_job_samples(&ctx.repo.id, &live_refs).await?
1416+ state
1417+ .store
1418+ .recent_job_samples(&ctx.repo.id, &live_refs)
1419+ .await?
14071420 };
14081421 let spans: Vec<i64> = runs.iter().map(|run| run_span(run, now)).collect();
14091422 let scale = bar_scale(&spans);
@@ -1475,7 +1488,12 @@ async fn runs_split(cx: &Cx, number: Option<&str>, job: Option<&str>) -> Result<
14751488 rerun: csrf
14761489 .as_ref()
14771490 .filter(|_| run_finished(&run.state))
1478- .map(|token| (format!("{}/rerun", run_href(&title, run.number)), token.clone())),
1491+ .map(|token| {
1492+ (
1493+ format!("{}/rerun", run_href(&title, run.number)),
1494+ token.clone(),
1495+ )
1496+ }),
14791497 meta: row_meta(run, jobs, &actor, lang),
14801498 }
14811499 })
@@ -1694,9 +1712,9 @@ async fn run_detail(
16941712 .iter()
16951713 .find(|job| matches!(job.state, JobState::Failure | JobState::Error))
16961714 {
1697- Some(job) if matches!(run.state, RunState::Failure | RunState::Error) => Some(
1698- ci_fail::read(state, title, &job.id, &job.name, &job.message).await?,
1699- ),
1715+ Some(job) if matches!(run.state, RunState::Failure | RunState::Error) => {
1716+ Some(ci_fail::read(state, title, &job.id, &job.name, &job.message).await?)
1717+ }
17001718 _ => None,
17011719 };
17021720 Ok(RunDetail {
@@ -1801,7 +1819,7 @@ async fn runs_body(
18011819 <section class="card notice" role="status">(text)</section>
18021820 }
18031821 }
1804- <div data-live=(live.as_deref()) class="ci-split" data-now=(now_unix().to_string()) data-fm=(fm.as_str()) data-fs=(fs.as_str())>
1822+ <div data-live=(live.as_deref()) class="ci-split fit-pane" data-now=(now_unix().to_string()) data-fm=(fm.as_str()) data-fs=(fs.as_str())>
18051823 <svg class="ci-defs" width="0" height="0" focusable="false" aria-hidden="true">
18061824 <defs>
18071825 <pattern id="ci-hatch" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
@@ -1897,10 +1915,35 @@ async fn runs_body(
18971915 </section>
18981916 <section class="card ci-main">
18991917 if let Some(run) = detail {
1900- <div class="ci-main-head" data-run=(run.number)>
1901- <h2 class="ci-eyebrow">(g::t(lang, K::RunNumber)) (run.number)</h2>
1918+ <header class="ci-tl-head" data-run=(run.number)>
1919+ <div class="ci-tl-headmain">
1920+ <div class="ci-tl-line">
1921+ <span class="ci-tl-no">(g::t(lang, K::RunNumber)) (run.number)</span>
1922+ <h2 class="ci-tl-title">(headline(run.title.as_str()))</h2>
1923+ <details class="ci-tl-more">
1924+ <summary>(crate::i18n::code::t(lang, crate::i18n::code::K::ShowFullMessage))</summary>
1925+ <p class="small">(run.title.as_str())</p>
1926+ </details>
1927+ </div>
1928+ <div class="ci-tl-meta">
1929+ <span class=(run.state_class.as_str())>(run.state.as_str())</span>
1930+ <span class="muted">(run.trigger.as_str()) " \u{b7} " (run.branch.as_str())</span>
1931+ <a href=(run.commit_href.as_str())><code>(run.commit.as_str())</code></a>
1932+ if !run.actor.is_empty() {
1933+ <span class="muted">(run.actor.as_str())</span>
1934+ }
1935+ if !run.duration.is_empty() {
1936+ if let Some(est) = run.est.as_ref() {
1937+ <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>
1938+ } else {
1939+ <span class="ci-tl-dur" data-since=(run.since.as_deref())>(run.duration.as_str())</span>
1940+ }
1941+ }
1942+ <time class="muted" datetime=(run.when_at.as_str()) data-rel="true">(run.when.as_str())</time>
1943+ </div>
1944+ </div>
19021945 if let Some(csrf) = run.writer_csrf.as_ref() {
1903- <div class="ci-actions">
1946+ <div class="ci-actions ci-tl-actions">
19041947 if run.can_approve {
19051948 action_button(action: format!("{}/approve", run.action_base), csrf: csrf.clone(), label: g::t(lang, K::ApproveAndRun))
19061949 }
@@ -1915,30 +1958,7 @@ async fn runs_body(
19151958 action_button(action: format!("{}/rerun", run.action_base), csrf: csrf.clone(), label: g::t(lang, K::Rerun))
19161959 </div>
19171960 }
1918- </div>
1919- <h3 class="ci-run-title">(headline(run.title.as_str()))</h3>
1920- <details class="ci-run-message">
1921- <summary class="small muted">(crate::i18n::code::t(lang, crate::i18n::code::K::ShowFullMessage))</summary>
1922- <p class="small">(run.title.as_str())</p>
1923- </details>
1924- <p class="ci-run-top">
1925- <span class=(run.state_class.as_str())>(run.state.as_str())</span>
1926- <span class="muted small">
1927- (run.trigger.as_str()) " \u{b7} " (run.branch.as_str()) " \u{b7} " <a href=(run.commit_href.as_str())><code>(run.commit.as_str())</code></a>
1928- if !run.actor.is_empty() {
1929- " \u{b7} " (run.actor.as_str())
1930- }
1931- " \u{b7} " <time datetime=(run.when_at.as_str()) data-rel="true">(run.when.as_str())</time>
1932- if !run.duration.is_empty() {
1933- " \u{b7} "
1934- if let Some(est) = run.est.as_ref() {
1935- <span 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>
1936- } else {
1937- <span data-since=(run.since.as_deref())>(run.duration.as_str())</span>
1938- }
1939- }
1940- </span>
1941- </p>
1961+ </header>
19421962 if let Some(est) = run.est.as_ref() {
19431963 <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>
19441964 }
@@ -1961,10 +1981,7 @@ async fn runs_body(
19611981 }
19621982 run_timeline(lang: lang, run: &run)
19631983 } else {
1964- <div class="ci-empty">
1965- <p>(g::t(lang, K::NoRunsYet))</p>
1966- <p class="muted small">(g::t(lang, K::NoRunsHint))</p>
1967- </div>
1984+ empty_state(title: g::t(lang, K::NoRunsYet), hint: Some(g::t(lang, K::NoRunsHint)))
19681985 }
19691986 </section>
19701987 </div>
@@ -2105,7 +2122,7 @@ async fn run_body(
21052122 ) -> Result<impl View> {
21062123 let (fm, fs) = duration_templates(lang);
21072124 Ok(view! {
2108- repo_head(head: RepoHead { live: String::new(), compact_tabs: true, ..head })
2125+ repo_head(head: RepoHead { live: String::new(), ..head })
21092126 if let Some((text, is_error)) = notice {
21102127 if is_error {
21112128 alert(message: text)
@@ -2959,8 +2976,16 @@ mod tests {
29592976 fn refs_and_images_shorten_to_their_last_part() {
29602977 assert_eq!(short_ref("refs/heads/main"), "main", "branch ref");
29612978 assert_eq!(short_ref("refs/tags/v1.2"), "v1.2", "tag ref");
2962- assert_eq!(short_ref("refs/pull/7/head"), "refs/pull/7/head", "pull ref");
2963- assert_eq!(image_short("docker.io/library/rust:1"), "rust:1", "registry image");
2979+ assert_eq!(
2980+ short_ref("refs/pull/7/head"),
2981+ "refs/pull/7/head",
2982+ "pull ref"
2983+ );
2984+ assert_eq!(
2985+ image_short("docker.io/library/rust:1"),
2986+ "rust:1",
2987+ "registry image"
2988+ );
29642989 assert_eq!(image_short("alpine"), "alpine", "bare image");
29652990 }
29662991
crates/forge-web/src/pages/ci_tests.rsmodified+18 -5
@@ -301,7 +301,9 @@ async fn run_list_pages_and_its_live_marker() {
301301 let first = get(&fx.app, RUN_BASE, Some(&cookie_for("tahinli-token"))).await;
302302 let text = first.text();
303303 // The topbar's live strip links the viewer's own running runs too; only the list counts.
304- let list = text.split_once("</header>").map_or(text.as_str(), |(_, rest)| rest);
304+ let list = text
305+ .split_once("</header>")
306+ .map_or(text.as_str(), |(_, rest)| rest);
305307 assert_eq!(list.matches("href=\"/tahinli/proj/ci/runs/").count(), 25);
306308 assert!(text.contains("?page=2"), "older link");
307309 assert!(!text.contains(">Newer<"));
@@ -312,7 +314,9 @@ async fn run_list_pages_and_its_live_marker() {
312314 )
313315 .await;
314316 let text = second.text();
315- let list = text.split_once("</header>").map_or(text.as_str(), |(_, rest)| rest);
317+ let list = text
318+ .split_once("</header>")
319+ .map_or(text.as_str(), |(_, rest)| rest);
316320 assert_eq!(list.matches("href=\"/tahinli/proj/ci/runs/").count(), 5);
317321 assert!(text.contains(">Newer<"), "newer link");
318322 assert!(!text.contains("?page=3"), "no older link on the last page");
@@ -324,7 +328,9 @@ async fn run_list_pages_and_its_live_marker() {
324328 .await;
325329 assert_eq!(bogus.status, 200);
326330 let text = bogus.text();
327- let list = text.split_once("</header>").map_or(text.as_str(), |(_, rest)| rest);
331+ let list = text
332+ .split_once("</header>")
333+ .map_or(text.as_str(), |(_, rest)| rest);
328334 assert_eq!(list.matches("href=\"/tahinli/proj/ci/runs/").count(), 25);
329335 }
330336
@@ -500,7 +506,11 @@ async fn live_pages_and_streams_follow_a_job_to_its_end() {
500506 let last = next_event(&mut job_frames).await.expect("the final status");
501507 assert_eq!(
502508 last,
503- format!("event: changed\ndata: {}||nolog\n\n", JobState::Success.as_str()).into_bytes()
509+ format!(
510+ "event: changed\ndata: {}||nolog\n\n",
511+ JobState::Success.as_str()
512+ )
513+ .into_bytes()
504514 );
505515 assert!(next_event(&mut job_frames).await.is_none(), "stream ends");
506516 }
@@ -540,7 +550,10 @@ async fn split_view_draws_the_newest_run_or_the_one_named() {
540550 assert!(named.contains(&format!("data-run=\"{}\"", first.number)));
541551 // The run page is the focused view now: it links back to the list, and its one aria-current is the
542552 // selected job, not a run row.
543- assert!(named.contains(&format!("href=\"{RUN_BASE}\"")), "All runs link");
553+ assert!(
554+ named.contains(&format!("href=\"{RUN_BASE}\"")),
555+ "All runs link"
556+ );
544557 assert_eq!(named.matches("aria-current=\"true\"").count(), 1);
545558
546559 // Thirty runs make two pages. Run 1 is on page 2, so page 1 marks no row and draws run 1.
crates/forge-web/src/pages/code_live.rsmodified+10 -4
@@ -110,9 +110,11 @@ async fn header_fingerprint(
110110 ),
111111 None => String::new(),
112112 };
113- Ok(header_text(&repo, [stars, watchers, forks, open_issues, open_pulls], &format!(
114- "{discussions} {wiki} {watch}\n{mirror}"
115- )))
113+ Ok(header_text(
114+ &repo,
115+ [stars, watchers, forks, open_issues, open_pulls],
116+ &format!("{discussions} {wiki} {watch}\n{mirror}"),
117+ ))
116118 }
117119
118120 /// Joins the header's fields into the fingerprint text.
@@ -126,7 +128,11 @@ fn header_text(repo: &RepoRecord, counts: [u64; 5], rest: &str) -> String {
126128 }
127129
128130 /// The state the home page's latest release and linked-package card show.
129-async fn home_fingerprint(state: &AppState, repo_id: &str, viewer: Option<&User>) -> Result<String> {
131+async fn home_fingerprint(
132+ state: &AppState,
133+ repo_id: &str,
134+ viewer: Option<&User>,
135+) -> Result<String> {
130136 let mut release_text = String::new();
131137 if let Some(release) = state.store.latest_release(repo_id).await? {
132138 let assets = state.store.list_release_assets(&release.id).await?;
crates/forge-web/src/pages/code_search.rsmodified+2 -0
@@ -209,6 +209,7 @@ async fn search_page(cx: &Cx) -> Result<impl View> {
209209 Ok(view! {
210210 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
211211 repo_head(head: header)
212+ <div class="search-page fit-pane">
212213 <form method="get" action=(action.as_str()) class="search-form" role="search">
213214 <div class="search-row">
214215 <input type="search" name="q" value=(q.as_str()) placeholder=(g::t(lang, K::SearchCodePlaceholder)) aria-label=(g::t(lang, K::SearchCodePlaceholder))>
@@ -263,6 +264,7 @@ async fn search_page(cx: &Cx) -> Result<impl View> {
263264 empty_state(title: g::t(lang, K::NoMatches))
264265 }
265266 }
267+ </div>
266268 )
267269 })
268270 }
crates/forge-web/src/pages/commit.rsmodified+1 -3
@@ -22,8 +22,8 @@ use crate::signatures;
2222 use crate::state::AppState;
2323 use crate::views::commit_status::{StatusLang, StatusSummary, checks_summary};
2424 use crate::views::diff::{DiffLang, DiffOpts, LIMITS, diff_section};
25-use crate::views::{avatar_url, display_name, relative_time, user_href};
2625 use crate::views::shell;
26+use crate::views::{avatar_url, display_name, relative_time, user_href};
2727
2828 path_param!(owner);
2929 path_param!(repo);
@@ -212,7 +212,6 @@ async fn commit_page(cx: &Cx) -> Result<impl View> {
212212 let others = g::co_author_others(lang, rest.len());
213213 let coauthors_label = g::t(lang, K::CoAuthorsLabel);
214214 let title = format!("{owner_name}/{repo_name}");
215- let repo_href = format!("/{owner_name}/{repo_name}");
216215 let tree_href = format!("/{owner_name}/{repo_name}/tree/{}", info.oid);
217216 let summary = emojify(&info.summary).into_owned();
218217 // A typed subject shows its first clause as the title and its groups as a list below.
@@ -244,7 +243,6 @@ async fn commit_page(cx: &Cx) -> Result<impl View> {
244243 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
245244 repo_head(head: header)
246245 <h2 class="commit-summary-title">(heading.as_str())</h2>
247- <p class="muted small"><a href=(repo_href.as_str())>(title.as_str())</a></p>
248246 <section class="card commit-info">
249247 <p class="commit-full-oid">
250248 <span class="copy-box">
crates/forge-web/src/pages/commits.rsmodified+9 -5
@@ -284,11 +284,14 @@ async fn commits_page(cx: &Cx) -> Result<impl View> {
284284 Ok(view! {
285285 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
286286 repo_head(head: header)
287- <p class="muted">(g::t(lang, K::CommitsOn)) <code>(ref_name.as_str())</code></p>
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>
290- }
291- <div class="commits-fit fit-pane">
287+ <div class="commits-fit fit-pane lang-list">
288+ <div class="list-bar">
289+ <p class="muted">(g::t(lang, K::CommitsOn)) <code>(ref_name.as_str())</code></p>
290+ if has_filter {
291+ <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>
292+ }
293+ </div>
294+ <div class="list-scroll">
292295 if empty {
293296 empty_state(title: g::t(lang, K::NoCommits),
294297 if has_filter {
@@ -327,6 +330,7 @@ async fn commits_page(cx: &Cx) -> Result<impl View> {
327330 }
328331 </ul>
329332 }
333+ </div>
330334 if has_newer || has_older {
331335 <nav class="pager">
332336 if has_newer {
crates/forge-web/src/pages/compare.rsmodified+77 -44
@@ -242,7 +242,6 @@ async fn compare_view(
242242 let tz = ctx.viewer_tz().to_owned();
243243 let now = now_secs();
244244 let title = format!("{owner}/{name}");
245- let repo_href_root = repo_href(&owner, &name, "", "");
246245 let base = cmp.base.clone();
247246 let head = head_value(&ctx, &cmp.head);
248247 let head_for_form = head.clone();
@@ -333,46 +332,53 @@ async fn compare_view(
333332 Ok(view! {
334333 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
335334 repo_head(head: header)
335+ <div class="lang-split is-list">
336+ if has_commits {
337+ <div class="lang-list fit-pane">
338+ <div class="list-bar">
339+ <h2>(commits_label.as_str())</h2>
340+ </div>
341+ <div class="list-scroll">
342+ <ul class="commit-list compare-commits">
343+ for row in rows.iter() {
344+ <li class="commit-row" data-kb-row="">
345+ <div class="commit-main">
346+ <a class="commit-summary" href=(row.commit_href.as_str())>commit_line(subject: row.summary.clone())</a>
347+ <div class="commit-meta muted small">
348+ <span class="commit-author">(row.author.as_str())</span>
349+ if !row.email.is_empty() {
350+ <span class="commit-email">(row.email.as_str())</span>
351+ }
352+ if lang == i18n::Lang::Tr {
353+ <time data-rel="true" datetime=(row.iso.as_str()) title=(row.absolute.as_str())>(row.relative.as_str())</time>
354+ <span>(g::t(lang, K::Committed))</span>
355+ } else {
356+ <span>(g::t(lang, K::Committed))</span>
357+ <time data-rel="true" datetime=(row.iso.as_str()) title=(row.absolute.as_str())>(row.relative.as_str())</time>
358+ }
359+ </div>
360+ </div>
361+ <div class="commit-actions">
362+ <a class="mono commit-oid" href=(row.commit_href.as_str())>(row.short.as_str())</a>
363+ <a class="small muted" href=(row.tree_href.as_str())>(g::t(lang, K::BrowseFiles))</a>
364+ </div>
365+ </li>
366+ }
367+ </ul>
368+ </div>
369+ </div>
370+ }
371+ <div class="lang-pane fit-pane compare-detail">
336372 <h2>(g::t(lang, K::ComparingPrefix)) <code>(heading_base.as_str())</code> "..." <code>(heading_head.as_str())</code></h2>
337- <p class="muted small"><a href=(repo_href_root.as_str())>(title.as_str())</a></p>
338373 if unrelated {
339374 <p class="muted">(g::t(lang, K::Unrelated))</p>
340375 }
341376 if nothing {
342377 empty_state(title: g::t(lang, K::NothingToCompare))
343378 }
344- if has_commits {
345- <h3>(commits_label.as_str())</h3>
346- <ul class="commit-list compare-commits">
347- for row in rows.iter() {
348- <li class="commit-row">
349- <div class="commit-main">
350- <a class="commit-summary" href=(row.commit_href.as_str())>commit_line(subject: row.summary.clone())</a>
351- <div class="commit-meta muted small">
352- <span class="commit-author">(row.author.as_str())</span>
353- if !row.email.is_empty() {
354- <span class="commit-email">(row.email.as_str())</span>
355- }
356- if lang == i18n::Lang::Tr {
357- <time data-rel="true" datetime=(row.iso.as_str()) title=(row.absolute.as_str())>(row.relative.as_str())</time>
358- <span>(g::t(lang, K::Committed))</span>
359- } else {
360- <span>(g::t(lang, K::Committed))</span>
361- <time data-rel="true" datetime=(row.iso.as_str()) title=(row.absolute.as_str())>(row.relative.as_str())</time>
362- }
363- </div>
364- </div>
365- <div class="commit-actions">
366- <a class="mono commit-oid" href=(row.commit_href.as_str())>(row.short.as_str())</a>
367- <a class="small muted" href=(row.tree_href.as_str())>(g::t(lang, K::BrowseFiles))</a>
368- </div>
369- </li>
370- }
371- </ul>
372- }
373379 if show_form {
374- <section class="card">
375- <h3>(g::t(lang, K::OpenPullRequest))</h3>
380+ <section class="compare-open">
381+ <h2>(g::t(lang, K::OpenPullRequest))</h2>
376382 if has_error {
377383 alert(message: error_text.as_str())
378384 }
@@ -400,6 +406,8 @@ async fn compare_view(
400406 diff_section(diff: d, owner: owner.as_str(), repo: name.as_str(), oid: cmp.head_oid.as_str(), parent: parent.as_deref(), subject: g::t(lang, K::ThisComparison), lang: DiffLang(lang), opts: opts.clone())
401407 }
402408 }
409+ </div>
410+ </div>
403411 )
404412 })
405413 }
@@ -423,6 +431,7 @@ async fn picker_view(cx: &Cx, ctx: RepoCtx, base: String, head: String) -> Resul
423431 Ok(view! {
424432 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
425433 repo_head(head: header)
434+ <section class="lang-form">
426435 <h2>(g::t(lang, K::CompareBranches))</h2>
427436 <form method="get" action=(action.as_str())>
428437 <p><label>(g::t(lang, K::BasePrefix)) <input type="text" name="base" list="compare-branches" value=(base.as_str())></label></p>
@@ -434,6 +443,7 @@ async fn picker_view(cx: &Cx, ctx: RepoCtx, base: String, head: String) -> Resul
434443 </datalist>
435444 <p><button type="submit">(g::t(lang, K::Compare))</button></p>
436445 </form>
446+ </section>
437447 )
438448 })
439449 }
@@ -621,9 +631,7 @@ async fn pull_create(cx: &Cx, Form(form): Form<PullForm>) -> Result<impl View> {
621631 };
622632 emit_pull(state, &ctx.repo, &Sender::of(&user), "opened", &pr).await;
623633 // The author's contribution calendar counts the pull request.
624- state
625- .live
626- .bump(&crate::live::Topic::User(user.id.clone()));
634+ state.live.bump(&crate::live::Topic::User(user.id.clone()));
627635 if !as_draft {
628636 // A draft tells nobody until it is marked ready for review.
629637 notify::dispatch(
@@ -893,8 +901,14 @@ mod tests {
893901 )
894902 .await;
895903 assert_eq!(status, 200, "anonymous");
896- assert!(!body.contains("action=\"/tahinli/demo/pulls\""), "anonymous has no form");
897- assert!(!body.contains("Open a pull request"), "anonymous has no form");
904+ assert!(
905+ !body.contains("action=\"/tahinli/demo/pulls\""),
906+ "anonymous has no form"
907+ );
908+ assert!(
909+ !body.contains("Open a pull request"),
910+ "anonymous has no form"
911+ );
898912
899913 // Signed-in viewers get the form, prefilled with the head commit's title.
900914 let (_, _, body) = send(
@@ -905,8 +919,14 @@ mod tests {
905919 None,
906920 )
907921 .await;
908- assert!(body.contains("action=\"/tahinli/demo/pulls\""), "signed in form");
909- assert!(body.contains("value=\"Add feature file\""), "signed in form");
922+ assert!(
923+ body.contains("action=\"/tahinli/demo/pulls\""),
924+ "signed in form"
925+ );
926+ assert!(
927+ body.contains("value=\"Add feature file\""),
928+ "signed in form"
929+ );
910930
911931 // A head from an unrelated owner, or a missing branch, is 404.
912932 let (status, _, _) = send(
@@ -955,7 +975,10 @@ mod tests {
955975 )
956976 .await;
957977 assert_eq!(status, 403, "wrong csrf");
958- assert!(rev(&fx.bare, "refs/pull/1/head").is_none(), "rejected posts make no pull");
978+ assert!(
979+ rev(&fx.bare, "refs/pull/1/head").is_none(),
980+ "rejected posts make no pull"
981+ );
959982
960983 let form = create_form("main", "feature", "Add+feature+file");
961984 let (status, location, _) = send(
@@ -983,7 +1006,11 @@ mod tests {
9831006 )
9841007 .await;
9851008 assert_eq!(status, 303, "duplicate");
986- assert_eq!(location.as_deref(), Some("/tahinli/demo/pulls/1"), "duplicate");
1009+ assert_eq!(
1010+ location.as_deref(),
1011+ Some("/tahinli/demo/pulls/1"),
1012+ "duplicate"
1013+ );
9871014 let repo = fx
9881015 .store
9891016 .repo_by_owner_and_name(OWNER, REPO)
@@ -1008,8 +1035,14 @@ mod tests {
10081035 None,
10091036 )
10101037 .await;
1011- assert!(!body.contains("action=\"/tahinli/demo/pulls\""), "open pull hides the form");
1012- assert!(body.contains("/tahinli/demo/pulls/1"), "open pull is linked");
1038+ assert!(
1039+ !body.contains("action=\"/tahinli/demo/pulls\""),
1040+ "open pull hides the form"
1041+ );
1042+ assert!(
1043+ body.contains("/tahinli/demo/pulls/1"),
1044+ "open pull is linked"
1045+ );
10131046 }
10141047
10151048 #[tokio::test]
crates/forge-web/src/pages/discussion_view.rsmodified+1 -1
@@ -477,7 +477,7 @@ async fn discussion_page(
477477 <p class="muted">(g::t(lang, K::ArchivedDiscussions))</p>
478478 }
479479 </div>
480- <aside class="issue-sidebar">
480+ <aside class="issue-sidebar fit-pane">
481481 if triage && !archived {
482482 <section class="card">
483483 <h2>(g::t(lang, K::Conversation))</h2>
crates/forge-web/src/pages/discussions.rsmodified+2 -0
@@ -303,6 +303,7 @@ async fn discussions_list_page(cx: &Cx) -> Result<impl View> {
303303 Ok(view! {
304304 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
305305 repo_head(head: header)
306+ <section class="issue-pane fit-pane">
306307 <div class="issue-toolbar" data-live=(live_href.as_str()) data-live-now="">
307308 <nav class="issue-tabs" aria-label=(nav_label)>
308309 <a class=(all_class) href=(all_href.as_str())>(all_label)</a>
@@ -359,6 +360,7 @@ async fn discussions_list_page(cx: &Cx) -> Result<impl View> {
359360 }
360361 </nav>
361362 }
363+ </section>
362364 )
363365 })
364366 }
crates/forge-web/src/pages/edit_history.rsmodified+1 -1
@@ -245,7 +245,7 @@ async fn history_page(
245245 (count_label.as_str())
246246 </p>
247247 </section>
248- <div class="issue-timeline">
248+ <div class="issue-timeline fit-pane">
249249 if entries.is_empty() {
250250 <p class="muted">(g::t(lang, K::NoEarlierVersions))</p>
251251 }
crates/forge-web/src/pages/explore.rsmodified+4 -2
@@ -199,9 +199,11 @@ async fn explore_body(
199199 let (links, prev, next) = nav;
200200 let clear_href = explore_href("", sort, 1);
201201 Ok(view! {
202- <section class="explore" data-live=(live.as_str())>
202+ <section class="page-head">
203203 <h1>(g::t(lang, K::Explore))</h1>
204- <p class="muted">(g::t(lang, K::PublicReposIntro))</p>
204+ <p class="muted small page-note">(g::t(lang, K::PublicReposIntro))</p>
205+ </section>
206+ <section class="explore list-pane fit-pane" data-live=(live.as_str())>
205207 if has_orgs {
206208 <section class="explore-orgs">
207209 <h2>(g::t(lang, K::Organizations))</h2>
crates/forge-web/src/pages/home.rsmodified+2 -2
@@ -33,9 +33,9 @@ async fn home(cx: &Cx) -> Result<impl View> {
3333 #[component]
3434 async fn landing(has_users: bool, lang: Lang) -> Result<impl View> {
3535 Ok(view! {
36- <section class="hero">
36+ <section class="page-head home-head">
3737 <h1>"forge"</h1>
38- <p class="muted">(g::t(lang, K::LandingTagline))</p>
38+ <p class="muted small page-note">(g::t(lang, K::LandingTagline))</p>
3939 <div class="actions">
4040 <a class="button primary" href="/login">(g::t(lang, K::LogIn))</a>
4141 if !has_users {
crates/forge-web/src/pages/import.rsmodified+31 -16
@@ -22,11 +22,11 @@ use crate::auth::{require_csrf, require_user};
2222 use crate::i18n::migrate::{self as g, K};
2323 use crate::i18n::{self, Key, Lang};
2424 use crate::importer::api::{ApiError, RemoteApi};
25-use crate::live::{Topic, stream_changes};
2625 use crate::importer::{
2726 self, ImportOptions, JobSpec, Source, default_name, make_forgejo, make_github, make_gitlab,
2827 parse_remote, source_ref,
2928 };
29+use crate::live::{Topic, stream_changes};
3030 use crate::pages::ci_runs::{changed_event, events_response};
3131 use crate::pages::new_repo::{owner_choices, repo_owner};
3232 use crate::pages::repo_ctx::still_readable;
@@ -325,7 +325,7 @@ async fn import_form(
325325 <form method="post" action="/new/import" class="newrepo-form fit-pane">
326326 csrf_field(token: csrf)
327327 <input type="hidden" name="source" value=(source_value)>
328- <header class="newrepo-head">
328+ <header class="newrepo-head page-head">
329329 <h1>(g::t(lang, K::ImportTitle))</h1>
330330 <div class="newrepo-head-actions">
331331 visibility_pick(lang: lang, private: private)
@@ -638,7 +638,7 @@ async fn bulk_form(
638638 csrf_field(token: csrf)
639639 <input type="hidden" name="source" value=(source_value)>
640640 <input type="hidden" name="stage" value="list">
641- <header class="newrepo-head">
641+ <header class="newrepo-head page-head">
642642 <h1>(g::t(lang, K::BulkTitle))</h1>
643643 <div class="newrepo-head-actions">
644644 <button type="submit" class="primary">(g::t(lang, K::BulkListButton))</button>
@@ -703,7 +703,7 @@ async fn bulk_select(
703703 <input type="hidden" name="instance" value=(form.instance.as_str())>
704704 <input type="hidden" name="token" value=(form.token.as_str())>
705705 <input type="hidden" name="from" value=(form.from.as_str())>
706- <header class="newrepo-head">
706+ <header class="newrepo-head page-head">
707707 <h1>(g::t(lang, K::BulkSelectHeading))</h1>
708708 <div class="newrepo-head-actions">
709709 visibility_pick(lang: lang, private: private)
@@ -1160,10 +1160,15 @@ async fn jobs_fingerprint(state: &AppState, user_id: &str) -> Result<String> {
11601160 Ok(rows
11611161 .iter()
11621162 .map(|(job, repo)| {
1163- let repo = repo
1164- .as_ref()
1165- .map_or(String::new(), |repo| format!("{}/{}", repo.owner_name, repo.name));
1166- format!("{} {} {} {repo}", job.id, job.state.as_str(), job.source_ref)
1163+ let repo = repo.as_ref().map_or(String::new(), |repo| {
1164+ format!("{}/{}", repo.owner_name, repo.name)
1165+ });
1166+ format!(
1167+ "{} {} {} {repo}",
1168+ job.id,
1169+ job.state.as_str(),
1170+ job.source_ref
1171+ )
11671172 })
11681173 .collect::<Vec<_>>()
11691174 .join("\n"))
@@ -1176,11 +1181,16 @@ async fn jobs_events(cx: &Cx) -> Result<Response> {
11761181 let viewer = require_user(cx).await?;
11771182 let state = app_context::<AppState>(cx).clone();
11781183 let user_id = viewer.0.id.clone();
1179- stream_changes(cx, &state.live.clone(), &[Topic::Imports(user_id.clone())], move || {
1180- let state = state.clone();
1181- let user_id = user_id.clone();
1182- async move { jobs_fingerprint(&state, &user_id).await }
1183- })
1184+ stream_changes(
1185+ cx,
1186+ &state.live.clone(),
1187+ &[Topic::Imports(user_id.clone())],
1188+ move || {
1189+ let state = state.clone();
1190+ let user_id = user_id.clone();
1191+ async move { jobs_fingerprint(&state, &user_id).await }
1192+ },
1193+ )
11841194 .await
11851195 }
11861196
@@ -1231,7 +1241,7 @@ async fn job_view(
12311241 Ok(view! {
12321242 newrepo_tabs(lang: lang, active: "import")
12331243 <section class="import-job" data-live=(live.as_deref()) data-live-state=(state_word)>
1234- <header class="newrepo-head">
1244+ <header class="newrepo-head page-head">
12351245 <h1 class="import-job-title">(job.source_ref.as_str())</h1>
12361246 <span class=(badge_class)>(badge_text)</span>
12371247 <div class="newrepo-head-actions">
@@ -1428,7 +1438,12 @@ async fn retry_candidates(state: &AppState, viewer: &User) -> Result<Vec<(Import
14281438 let Some(repo) = job_repo(state, Some(viewer), &job).await? else {
14291439 continue;
14301440 };
1431- if state.store.active_import_for_repo(&repo.id).await?.is_some() {
1441+ if state
1442+ .store
1443+ .active_import_for_repo(&repo.id)
1444+ .await?
1445+ .is_some()
1446+ {
14321447 continue;
14331448 }
14341449 rows.push((job, repo));
@@ -1449,7 +1464,7 @@ async fn retry_list(lang: Lang, csrf: &str, rows: Vec<(ImportJob, Repo)>) -> Res
14491464 newrepo_tabs(lang: lang, active: "import")
14501465 <form method="post" action="/import/retry" class="newrepo-form">
14511466 csrf_field(token: csrf)
1452- <header class="newrepo-head">
1467+ <header class="newrepo-head page-head">
14531468 <h1>(g::t(lang, K::RetryFailedTitle))</h1>
14541469 <div class="newrepo-head-actions">
14551470 if !empty {
crates/forge-web/src/pages/issue_meta_tests.rsmodified+18 -3
@@ -199,7 +199,13 @@ async fn label_writes_follow_csrf_roles_and_archive_rules() {
199199 )
200200 .await;
201201 assert_eq!(res.status, 403, "read-only collaborator");
202- assert!(store.list_labels(&s.repo_id).await.expect("labels").is_empty());
202+ assert!(
203+ store
204+ .list_labels(&s.repo_id)
205+ .await
206+ .expect("labels")
207+ .is_empty()
208+ );
203209
204210 // [create] the owner creates a label; a case-insensitive duplicate is refused.
205211 let created = call(
@@ -268,7 +274,13 @@ async fn label_writes_follow_csrf_roles_and_archive_rules() {
268274 )
269275 .await;
270276 assert_eq!(deleted.status, 303, "delete");
271- assert!(store.list_labels(&s.repo_id).await.expect("labels").is_empty());
277+ assert!(
278+ store
279+ .list_labels(&s.repo_id)
280+ .await
281+ .expect("labels")
282+ .is_empty()
283+ );
272284
273285 // [archive] an archived repo refuses label writes (last, it changes the repo).
274286 store
@@ -536,7 +548,10 @@ async fn issue_metadata_and_milestone_progress() {
536548 .await
537549 .expect("issue")
538550 .expect("issues keep existing");
539- assert!(survivor.milestone_id.is_none(), "issue kept, milestone gone");
551+ assert!(
552+ survivor.milestone_id.is_none(),
553+ "issue kept, milestone gone"
554+ );
540555 }
541556
542557 /// Locking on forge: only triage holders may lock, CSRF is required, and a locked issue refuses
crates/forge-web/src/pages/issue_view.rsmodified+2 -9
@@ -899,15 +899,8 @@ mod tests {
899899 .create_issue(&id, &owner.id, "G", "body")
900900 .await
901901 .unwrap();
902- let first = fx
903- .store
904- .add_comment(&g.id, &owner.id, "one")
905- .await
906- .unwrap();
907- fx.store
908- .add_comment(&g.id, &owner.id, "two")
909- .await
910- .unwrap();
902+ let first = fx.store.add_comment(&g.id, &owner.id, "one").await.unwrap();
903+ fx.store.add_comment(&g.id, &owner.id, "two").await.unwrap();
911904 assert_eq!(
912905 fx.store
913906 .issue_by_number(&id, g.number)
crates/forge-web/src/pages/issues_list.rsmodified+21 -15
@@ -496,12 +496,27 @@ async fn issues_list_page(cx: &Cx) -> Result<impl View> {
496496 Ok(view! {
497497 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(), extra_stylesheet: Some(labels_href.as_str()),
498498 repo_head(head: header)
499+ <section class="issue-pane fit-pane">
499500 <div class="issue-toolbar" data-live=(live_href.as_str()) data-live-now="">
500501 <nav class="issue-tabs" aria-label=(g::t(lang, K::IssuesByState))>
501502 <a class=(state_tab_class(state_word == "open")) href=(open_href.as_str())>(open_text.as_str())</a>
502503 <a class=(state_tab_class(state_word == "closed")) href=(closed_href.as_str())>(closed_text.as_str())</a>
503504 <a class=(state_tab_class(state_word == "all")) href=(all_href.as_str())>(all_text.as_str())</a>
504505 </nav>
506+ <form method="get" action=(base.as_str()) class="issue-search">
507+ <input type="hidden" name="state" value=(sel.state)>
508+ <input type="hidden" name="label" value=(sel.label.as_str())>
509+ <input type="hidden" name="milestone" value=(sel.milestone.as_str())>
510+ <input type="hidden" name="author" value=(sel.author.as_str())>
511+ <input type="hidden" name="assignee" value=(sel.assignee.as_str())>
512+ <input type="search" name="q" value=(search_value.as_str()) placeholder=(g::t(lang, K::SearchTitles)) aria-label=(g::t(lang, K::SearchTitles)) maxlength="256">
513+ <select name="sort" aria-label=(g::t(lang, K::Sort))>
514+ for option in sort_options.iter() {
515+ <option value=(option.value) selected=(option.selected)>(option.label)</option>
516+ }
517+ </select>
518+ <button type="submit">(g::t(lang, K::Search))</button>
519+ </form>
505520 <div class="issue-tools">
506521 <nav aria-label=(g::t(lang, K::LabelsAndMilestones))>
507522 <a class="button" href=(labels_page_href.as_str())>(g::t(lang, K::Labels))</a>
@@ -512,20 +527,6 @@ async fn issues_list_page(cx: &Cx) -> Result<impl View> {
512527 }
513528 </div>
514529 </div>
515- <form method="get" action=(base.as_str()) class="issue-search">
516- <input type="hidden" name="state" value=(sel.state)>
517- <input type="hidden" name="label" value=(sel.label.as_str())>
518- <input type="hidden" name="milestone" value=(sel.milestone.as_str())>
519- <input type="hidden" name="author" value=(sel.author.as_str())>
520- <input type="hidden" name="assignee" value=(sel.assignee.as_str())>
521- <input type="search" name="q" value=(search_value.as_str()) placeholder=(g::t(lang, K::SearchTitles)) aria-label=(g::t(lang, K::SearchTitles)) maxlength="256">
522- <select name="sort" aria-label=(g::t(lang, K::Sort))>
523- for option in sort_options.iter() {
524- <option value=(option.value) selected=(option.selected)>(option.label)</option>
525- }
526- </select>
527- <button type="submit">(g::t(lang, K::Search))</button>
528- </form>
529530 if has_filters {
530531 <p class="muted small">(g::t(lang, K::FiltersApplied)) <a href=(clear_href.as_str())>(g::t(lang, K::ClearFilters))</a></p>
531532 }
@@ -614,6 +615,7 @@ async fn issues_list_page(cx: &Cx) -> Result<impl View> {
614615 }
615616 </nav>
616617 }
618+ </section>
617619 )
618620 })
619621 }
@@ -1036,7 +1038,11 @@ mod tests {
10361038 }
10371039 let empty = send(&fx.router, "GET", &base(), true, None, &[]).await;
10381040 assert_eq!(empty.status, 200, "empty list");
1039- assert!(empty.text().contains("No issues yet. Open one to start a conversation."));
1041+ assert!(
1042+ empty
1043+ .text()
1044+ .contains("No issues yet. Open one to start a conversation.")
1045+ );
10401046 assert_eq!(rows(&empty.text()), 0);
10411047 let tr = send(
10421048 &fx.router,
crates/forge-web/src/pages/labels_page.rsmodified+7 -5
@@ -95,13 +95,15 @@ async fn labels_body(
9595 let header = frame.head.clone();
9696 Ok(view! {
9797 repo_head(head: header)
98- issue_subnav(lang: lang, title: frame.title.clone(), active: "labels".to_owned())
9998 if archived {
10099 <section class="card notice" role="status">(g::t(lang, K::LabelsArchived))</section>
101100 }
102101 <div class="fit-split">
103- <section class="card fit-pane fit-card fit-main" data-live=(live.as_str()) data-live-now="">
104- <h2>(g::t(lang, K::Labels))</h2>
102+ <section class="card fit-pane fit-card fit-main lang-list" data-live=(live.as_str()) data-live-now="">
103+ <h2 class="sr-only">(g::t(lang, K::Labels))</h2>
104+ <div class="list-bar">
105+ issue_subnav(lang: lang, title: frame.title.clone(), active: "labels".to_owned())
106+ </div>
105107 if empty {
106108 empty_state(title: g::t(lang, K::NoLabelsYet),
107109 if can_triage && !archived {
@@ -117,7 +119,7 @@ async fn labels_body(
117119 <div class="fit-scroll">
118120 <ul class="label-list">
119121 for row in rows.iter() {
120- <li class="label-row">
122+ <li class="label-row" data-kb-row="">
121123 <div class="label-head">
122124 <a class=(row.chip_class.as_str()) href=(row.issues_href.as_str())>(row.name.as_str())</a>
123125 <a class="small" href=(row.issues_href.as_str())>(row.open_text.as_str())</a>
@@ -161,7 +163,7 @@ async fn labels_body(
161163 pager(page: page, pages: pages, links: links, prev: prev, next: next, lang: lang)
162164 </section>
163165 if can_triage {
164- <section class="card fit-side">
166+ <section class="card fit-side lang-side">
165167 <h2>(g::t(lang, K::NewLabel))</h2>
166168 <form method="post" action=(labels_action.as_str()) class="stack">
167169 <input type="hidden" name="csrf" value=(csrf.as_str())>
crates/forge-web/src/pages/media.rsmodified+6 -3
@@ -424,13 +424,16 @@ mod tests {
424424 // Scenario: a token signed for the public repo does not open the private one.
425425 let other = sign_raw(&fx.state.key, &fx.public.id, now + 60);
426426 let res = get(&fx.router, "GET", &format!("{path}?token={other}")).await;
427- assert_eq!(res.status(), StatusCode::NOT_FOUND, "token for another repo");
427+ assert_eq!(
428+ res.status(),
429+ StatusCode::NOT_FOUND,
430+ "token for another repo"
431+ );
428432
429433 // Scenario: a public URL is encoded and unsigned.
430434 let public = media_url(&fx.state, &fx.public, "main", "a b/big.bin");
431435 assert_eq!(
432- public,
433- "http://127.0.0.1:7661/tahinli/pub/-/media/main/a%20b/big.bin",
436+ public, "http://127.0.0.1:7661/tahinli/pub/-/media/main/a%20b/big.bin",
434437 "public url"
435438 );
436439
crates/forge-web/src/pages/merge_queue.rsmodified+14 -10
@@ -361,14 +361,17 @@ async fn queue_body(
361361 let hint = g::t(lang, K::MergeQueueHint);
362362 Ok(view! {
363363 repo_head(head: head)
364- <div data-live=(live.as_str())>
365- <nav class="issue-tabs" aria-label=(g::t(lang, K::MergeQueueNav))>
366- <a class=(tab_class(!history)) href=(waiting_href.as_str())>(g::t(lang, K::QueueWaiting))</a>
367- <a class=(tab_class(history)) href=(history_href.as_str())>(g::t(lang, K::QueueHistory))</a>
368- </nav>
369- if !protected {
370- <section class="card notice" role="status">(g::t(lang, K::QueueNoBranch))</section>
371- }
364+ if !protected {
365+ <section class="card notice" role="status">(g::t(lang, K::QueueNoBranch))</section>
366+ }
367+ <div class="lang-list fit-pane" data-live=(live.as_str())>
368+ <div class="list-bar">
369+ <nav class="issue-tabs" aria-label=(g::t(lang, K::MergeQueueNav))>
370+ <a class=(tab_class(!history)) href=(waiting_href.as_str())>(g::t(lang, K::QueueWaiting))</a>
371+ <a class=(tab_class(history)) href=(history_href.as_str())>(g::t(lang, K::QueueHistory))</a>
372+ </nav>
373+ </div>
374+ <div class="list-scroll">
372375 if empty {
373376 <p class="muted">(g::t(lang, K::QueueEmpty))</p>
374377 } else {
@@ -389,7 +392,7 @@ async fn queue_body(
389392 </thead>
390393 <tbody>
391394 for row in rows.iter() {
392- <tr>
395+ <tr data-kb-row="">
393396 <td class="mono" data-label=(g::t(lang, K::QueueColPosition))>(row.position.as_str())</td>
394397 <td data-label=(g::t(lang, K::QueueColPull))><a href=(row.pull_href.as_str())>"#"(row.pull_number)" "(row.pull_title.as_str())</a></td>
395398 <td data-label=(g::t(lang, K::QueueColBranch))><code>(row.branch.as_str())</code></td>
@@ -418,7 +421,8 @@ async fn queue_body(
418421 </table>
419422 </div>
420423 }
421- <p class="muted small">(hint)</p>
424+ </div>
425+ <p class="list-foot muted small">(hint)</p>
422426 </div>
423427 })
424428 }
crates/forge-web/src/pages/milestones_page.rsmodified+7 -5
@@ -133,7 +133,7 @@ async fn milestone_row(
133133 let open_text = g::open_milestone_count(lang, row.open);
134134 let closed_text = g::closed_milestone_count(lang, row.closed);
135135 Ok(view! {
136- <li class="milestone-row">
136+ <li class="milestone-row" data-kb-row="">
137137 <h3><a href=(row.edit_href.as_str())>(row.title.as_str())</a></h3>
138138 <p class="muted small">
139139 if let Some(due) = row.due.as_deref() {
@@ -170,7 +170,7 @@ async fn milestone_row(
170170 #[component]
171171 async fn milestone_create_form(lang: Lang, csrf: String, action: String) -> Result<impl View> {
172172 Ok(view! {
173- <section class="card">
173+ <section class="card lang-side">
174174 <h2>(g::t(lang, K::NewMilestone))</h2>
175175 <form method="post" action=(action.as_str()) class="stack">
176176 <input type="hidden" name="csrf" value=(csrf.as_str())>
@@ -292,13 +292,15 @@ async fn milestones_body(
292292 };
293293 Ok(view! {
294294 repo_head(head: header)
295- issue_subnav(lang: lang, title: title.clone(), active: "milestones".to_owned())
296295 if frame.archived {
297296 <section class="card notice" role="status">(g::t(lang, K::MilestonesArchived))</section>
298297 }
299- state_tabs(lang: lang, title: title.clone(), closed: closed)
300298 <div class="fit-split">
301- <section class="card fit-pane fit-card fit-main" data-live=(live.as_str()) data-live-now="">
299+ <section class="card fit-pane fit-card fit-main lang-list" data-live=(live.as_str()) data-live-now="">
300+ <div class="list-bar">
301+ issue_subnav(lang: lang, title: title.clone(), active: "milestones".to_owned())
302+ state_tabs(lang: lang, title: title.clone(), closed: closed)
303+ </div>
302304 if empty {
303305 empty_state(title: empty_text)
304306 }
crates/forge-web/src/pages/mod.rsmodified+1 -1
@@ -117,10 +117,10 @@ pub mod repo_rename;
117117 pub mod repo_secrets;
118118 pub mod repo_security;
119119 pub mod repo_settings;
120-pub mod repo_side;
121120 pub mod repo_settings_live;
122121 #[cfg(test)]
123122 mod repo_settings_live_tests;
123+pub mod repo_side;
124124 pub mod repo_transfer;
125125 pub mod repo_webhooks;
126126 pub mod review_requests;
crates/forge-web/src/pages/needs_you.rsmodified+9 -8
@@ -5,9 +5,9 @@
55 //! `?section=<slug>` shows one section as a full list, 15 rows a page. `/needs-you/events` wakes the
66 //! page on the viewer's review-request and inbox topics.
77
8+use forge_core::User;
89 use forge_core::authz::{Action, authorize};
910 use forge_core::store::needs::Verdict;
10-use forge_core::User;
1111 use topcoat::Result;
1212 use topcoat::context::{Cx, app_context};
1313 use topcoat::router::response::Response;
@@ -348,13 +348,14 @@ pub(crate) async fn need_section(lang: Lang, section: NeedSection) -> Result<imp
348348 heading,
349349 more,
350350 rows,
351- pager: NeedPager {
352- page,
353- pages,
354- links,
355- prev,
356- next,
357- },
351+ pager:
352+ NeedPager {
353+ page,
354+ pages,
355+ links,
356+ prev,
357+ next,
358+ },
358359 } = section;
359360 Ok(view! {
360361 <section class="card needs-section">
crates/forge-web/src/pages/new_repo.rsmodified+79 -17
@@ -31,18 +31,66 @@ const DEFAULT_BRANCH: &str = "main";
3131
3232 /// The licenses the form offers, in menu order: SPDX id, menu label and the full SPDX text.
3333 const LICENSES: &[(&str, &str, &str)] = &[
34- ("MIT", "MIT License", include_str!("../../assets/licenses/MIT.txt")),
35- ("Apache-2.0", "Apache License 2.0", include_str!("../../assets/licenses/Apache-2.0.txt")),
36- ("GPL-3.0-only", "GNU GPL v3", include_str!("../../assets/licenses/GPL-3.0-only.txt")),
37- ("AGPL-3.0-only", "GNU AGPL v3", include_str!("../../assets/licenses/AGPL-3.0-only.txt")),
38- ("LGPL-3.0-only", "GNU LGPL v3", include_str!("../../assets/licenses/LGPL-3.0-only.txt")),
39- ("GPL-2.0-only", "GNU GPL v2", include_str!("../../assets/licenses/GPL-2.0-only.txt")),
40- ("MPL-2.0", "Mozilla Public License 2.0", include_str!("../../assets/licenses/MPL-2.0.txt")),
41- ("BSD-3-Clause", "BSD 3-Clause", include_str!("../../assets/licenses/BSD-3-Clause.txt")),
42- ("BSD-2-Clause", "BSD 2-Clause", include_str!("../../assets/licenses/BSD-2-Clause.txt")),
43- ("ISC", "ISC License", include_str!("../../assets/licenses/ISC.txt")),
44- ("BSL-1.0", "Boost Software License 1.0", include_str!("../../assets/licenses/BSL-1.0.txt")),
45- ("Unlicense", "The Unlicense", include_str!("../../assets/licenses/Unlicense.txt")),
34+ (
35+ "MIT",
36+ "MIT License",
37+ include_str!("../../assets/licenses/MIT.txt"),
38+ ),
39+ (
40+ "Apache-2.0",
41+ "Apache License 2.0",
42+ include_str!("../../assets/licenses/Apache-2.0.txt"),
43+ ),
44+ (
45+ "GPL-3.0-only",
46+ "GNU GPL v3",
47+ include_str!("../../assets/licenses/GPL-3.0-only.txt"),
48+ ),
49+ (
50+ "AGPL-3.0-only",
51+ "GNU AGPL v3",
52+ include_str!("../../assets/licenses/AGPL-3.0-only.txt"),
53+ ),
54+ (
55+ "LGPL-3.0-only",
56+ "GNU LGPL v3",
57+ include_str!("../../assets/licenses/LGPL-3.0-only.txt"),
58+ ),
59+ (
60+ "GPL-2.0-only",
61+ "GNU GPL v2",
62+ include_str!("../../assets/licenses/GPL-2.0-only.txt"),
63+ ),
64+ (
65+ "MPL-2.0",
66+ "Mozilla Public License 2.0",
67+ include_str!("../../assets/licenses/MPL-2.0.txt"),
68+ ),
69+ (
70+ "BSD-3-Clause",
71+ "BSD 3-Clause",
72+ include_str!("../../assets/licenses/BSD-3-Clause.txt"),
73+ ),
74+ (
75+ "BSD-2-Clause",
76+ "BSD 2-Clause",
77+ include_str!("../../assets/licenses/BSD-2-Clause.txt"),
78+ ),
79+ (
80+ "ISC",
81+ "ISC License",
82+ include_str!("../../assets/licenses/ISC.txt"),
83+ ),
84+ (
85+ "BSL-1.0",
86+ "Boost Software License 1.0",
87+ include_str!("../../assets/licenses/BSL-1.0.txt"),
88+ ),
89+ (
90+ "Unlicense",
91+ "The Unlicense",
92+ include_str!("../../assets/licenses/Unlicense.txt"),
93+ ),
4694 ];
4795
4896 /// The LICENSE file for `spdx` with the copyright line filled in. `None` for an id that is not in
@@ -192,7 +240,7 @@ async fn new_repo_form(
192240 }
193241 <form method="post" action="/new" class="newrepo-form">
194242 csrf_field(token: csrf)
195- <header class="newrepo-head">
243+ <header class="newrepo-head page-head">
196244 <h1>(i18n::t(lang, Key::NewRepository))</h1>
197245 <div class="newrepo-head-actions">
198246 <fieldset class="newrepo-visibility">
@@ -609,7 +657,11 @@ mod tests {
609657
610658 /// POSTs `/new` as tahinli for a repo called `name` with the extra fields. Returns the status
611659 /// and the repo created, if any. The form's token is the shared CSRF value.
612- async fn post_new(site: &Site, name: &str, fields: &[(&str, &str)]) -> (u16, Option<forge_core::Repo>) {
660+ async fn post_new(
661+ site: &Site,
662+ name: &str,
663+ fields: &[(&str, &str)],
664+ ) -> (u16, Option<forge_core::Repo>) {
613665 let mut pairs = vec![("csrf", CSRF), ("name", name)];
614666 pairs.extend_from_slice(fields);
615667 let body = form_urlencoded::Serializer::new(String::new())
@@ -687,7 +739,11 @@ mod tests {
687739 .await
688740 .expect("query")
689741 .expect("valid mirror: a pull mirror");
690- assert_eq!(mirror.direction, MirrorDirection::Pull, "valid mirror: direction");
742+ assert_eq!(
743+ mirror.direction,
744+ MirrorDirection::Pull,
745+ "valid mirror: direction"
746+ );
691747 assert_eq!(
692748 mirror.url, "https://example.com/upstream/proj.git",
693749 "valid mirror: url"
@@ -707,8 +763,14 @@ mod tests {
707763 &[("mirror_url", "https://127.0.0.1/upstream/proj.git")],
708764 )
709765 .await;
710- assert_eq!(status, 200, "loopback: the form is shown again with the error");
711- assert!(repo.is_none(), "loopback: no repo is created for a refused mirror");
766+ assert_eq!(
767+ status, 200,
768+ "loopback: the form is shown again with the error"
769+ );
770+ assert!(
771+ repo.is_none(),
772+ "loopback: no repo is created for a refused mirror"
773+ );
712774
713775 // Case: a blank URL creates the repo without a mirror.
714776 let (status, repo) = post_new(&site, "mirror-blank", &[("mirror_url", " ")]).await;
crates/forge-web/src/pages/notifications.rsmodified+17 -10
@@ -35,7 +35,9 @@ use crate::pages::repo_ctx::{RepoCtx, load_repo};
3535 use crate::pages::repo_transfer::transfer_list_for;
3636 use crate::pages::star::return_path;
3737 use crate::state::AppState;
38-use crate::views::{csrf_field, display_name, empty_state, iso_time, now_unix, relative_time, repo_href, shell};
38+use crate::views::{
39+ csrf_field, display_name, empty_state, iso_time, now_unix, relative_time, repo_href, shell,
40+};
3941
4042 /// Rows per inbox page: a group head and its rows, with the older link, fit the window's height
4143 /// (about 44px a row and 62px a group head at 1440×900). The list scrolls inside its pane when a page
@@ -1132,14 +1134,14 @@ async fn inbox_list(
11321134 }
11331135 </section>
11341136 transfer_list_for(lang: lang, transfers: transfers, csrf: csrf.clone())
1135- <nav class="notif-tabs" aria-label=(g::t(lang, K::NotificationFilter))>
1136- <a href="/notifications" class=(unread_class)>(unread_text.as_str())</a>
1137- <a href="/notifications?all=1" class=(all_class)>(g::t(lang, K::AllTab))</a>
1138- <a href="/review-requests">(crate::i18n::authoring::t(lang, crate::i18n::authoring::K::ReviewRequestsTab))</a>
1139- </nav>
1140- // The groups and the older link share one pane that fits the window, so the page itself does
1141- // not scroll; the older link ends the pane.
1142- <div class="notif-pane fit-pane">
1137+ // The filter tabs, the groups and the older link share one pane that fits the window, so the
1138+ // page itself does not scroll; the older link ends the pane.
1139+ <div class="notif-pane fit-pane list-pane">
1140+ <nav class="notif-tabs" aria-label=(g::t(lang, K::NotificationFilter))>
1141+ <a href="/notifications" class=(unread_class)>(unread_text.as_str())</a>
1142+ <a href="/notifications?all=1" class=(all_class)>(g::t(lang, K::AllTab))</a>
1143+ <a href="/review-requests">(crate::i18n::authoring::t(lang, crate::i18n::authoring::K::ReviewRequestsTab))</a>
1144+ </nav>
11431145 if empty {
11441146 empty_state(title: empty_text,
11451147 if !all {
@@ -1497,7 +1499,12 @@ mod tests {
14971499 assert_eq!(site.store.unread_count(&w.bob.id).await.expect("count"), 1);
14981500
14991501 // Bob opens his own row: it redirects to the issue and marks the row read.
1500- let res = get(&site, &format!("/notifications/{id}/open"), Some(&bob_cookie)).await;
1502+ let res = get(
1503+ &site,
1504+ &format!("/notifications/{id}/open"),
1505+ Some(&bob_cookie),
1506+ )
1507+ .await;
15011508 assert_eq!(res.status, 303);
15021509 assert_eq!(res.location.as_deref(), Some("/tahinli/demo/issues/1"));
15031510 assert_eq!(site.store.unread_count(&w.bob.id).await.expect("count"), 0);
crates/forge-web/src/pages/org_ctx.rsmodified+3 -1
@@ -208,7 +208,9 @@ pub async fn org_tab_counts(state: &AppState, org: &User, viewer: &User) -> Resu
208208 .store
209209 .count_visible_repos(RepoScope::OwnedBy(&org.id), Some(viewer))
210210 .await?;
211- let packages = packages::package_rows(state, Some(viewer), org).await?.len();
211+ let packages = packages::package_rows(state, Some(viewer), org)
212+ .await?
213+ .len();
212214 Ok((repos, packages))
213215 }
214216
crates/forge-web/src/pages/org_new.rsmodified+3 -1
@@ -49,8 +49,10 @@ async fn new_org_form(
4949 lang: Lang,
5050 ) -> Result<impl View> {
5151 Ok(view! {
52- <section class="card narrow">
52+ <section class="page-head">
5353 <h1>(g::t(lang, K::NewOrganization))</h1>
54+ </section>
55+ <section class="card org-new">
5456 <p class="muted small">(g::t(lang, K::NewOrgIntro))</p>
5557 if let Some(message) = error {
5658 alert(message: message.as_str())
crates/forge-web/src/pages/palette.rsmodified+27 -5
@@ -19,8 +19,8 @@ use topcoat::router::response::Response;
1919 use topcoat::router::{Body, HeaderValue, StatusCode, route};
2020
2121 use crate::auth::current_user;
22-use crate::i18n::orgs::{self as g, K};
2322 use crate::i18n;
23+use crate::i18n::orgs::{self as g, K};
2424 use crate::pages::org_new::may_create_org;
2525 use crate::state::AppState;
2626 use crate::views::{
@@ -66,12 +66,30 @@ async fn palette(cx: &Cx) -> Result<Response> {
6666 let base = format!("/org/{}", enc(name));
6767 push(&mut items, &mut seen, name, &user_href(name), "org");
6868 let members = format!("{name} \u{b7} {}", g::t(lang, K::Members));
69- push(&mut items, &mut seen, &members, &format!("{base}/members"), "page");
69+ push(
70+ &mut items,
71+ &mut seen,
72+ &members,
73+ &format!("{base}/members"),
74+ "page",
75+ );
7076 let teams = format!("{name} \u{b7} {}", g::t(lang, K::Teams));
71- push(&mut items, &mut seen, &teams, &format!("{base}/teams"), "page");
77+ push(
78+ &mut items,
79+ &mut seen,
80+ &teams,
81+ &format!("{base}/teams"),
82+ "page",
83+ );
7284 if role == OrgMemberRole::Owner {
7385 let settings = format!("{name} \u{b7} {}", g::t(lang, K::Settings));
74- push(&mut items, &mut seen, &settings, &format!("{base}/settings"), "page");
86+ push(
87+ &mut items,
88+ &mut seen,
89+ &settings,
90+ &format!("{base}/settings"),
91+ "page",
92+ );
7593 }
7694 }
7795
@@ -142,7 +160,11 @@ mod tests {
142160 let tabs = profile_items(Lang::En, "tahinli", false, true, false);
143161 assert!(!tabs.is_empty());
144162 for tab in tabs {
145- assert!(hrefs.contains(&tab.href.as_str()), "palette lacks {}", tab.href);
163+ assert!(
164+ hrefs.contains(&tab.href.as_str()),
165+ "palette lacks {}",
166+ tab.href
167+ );
146168 }
147169 }
148170 }
crates/forge-web/src/pages/passkeys.rsmodified+1 -4
@@ -637,10 +637,7 @@ pub struct PasskeyPanel {
637637 pub problem: Option<Unavailable>,
638638 }
639639
640-pub async fn build_panel(
641- state: &AppState,
642- user_id: &str,
643-) -> forge_core::Result<PasskeyPanel> {
640+pub async fn build_panel(state: &AppState, user_id: &str) -> forge_core::Result<PasskeyPanel> {
644641 let rows = state.store.list_passkeys(user_id).await?;
645642 let items = rows
646643 .into_iter()
crates/forge-web/src/pages/profile.rsmodified+9 -6
@@ -29,8 +29,8 @@ use crate::i18n::{self, Lang};
2929 use crate::live::{Topic, stream_changes};
3030 use crate::pages::org_new::may_create_org;
3131 use crate::pages::packages::{self as packages, PackageRow};
32-use crate::pages::repo_settings::{notice_banner_for, take_notice};
3332 use crate::pages::profile_calendar::{calendar_since, load_calendar};
33+use crate::pages::repo_settings::{notice_banner_for, take_notice};
3434 use crate::pages::snippets::{ListRow, list_row, snippet_rows};
3535 use crate::render::markdown::render_markdown;
3636 use crate::state::AppState;
@@ -102,7 +102,7 @@ async fn profile_page(cx: &Cx) -> Result<impl View> {
102102 let actor = viewer.as_ref().map(|(u, _)| u);
103103 let lang = i18n::lang(cx, actor);
104104 // Whether the viewer is this person. Only the person sees their Organizations tab and edit links.
105- let own =!user.is_org() && actor.is_some_and(|u| u.id == user.id);
105+ let own = !user.is_org() && actor.is_some_and(|u| u.id == user.id);
106106 let tab = tab_key(query.tab.as_deref());
107107 // An organization cannot be starred or keep snippets, so those tabs show the overview instead.
108108 // The Organizations tab is the viewer's own, so anyone else gets the overview.
@@ -663,10 +663,10 @@ async fn profile_card(
663663 </div>
664664 }
665665 </div>
666+ if has_about {
667+ <section class="profile-about markdown-body">(Unescaped::new_unchecked(about_html))</section>
668+ }
666669 </header>
667- if has_about {
668- <section class="profile-about markdown-body">(Unescaped::new_unchecked(about_html))</section>
669- }
670670 profile_tabs(username: user.username.clone(), items: tab_items, current: tab.clone(), counts: tab_counts)
671671 if overview_on {
672672 if let Some((calendar, selected)) = heat {
@@ -1303,7 +1303,10 @@ mod tests {
13031303 assert!(overview.contains("class=\"heat\""), "overview: calendar");
13041304 let (_, old) = get(&site.router, "/tahinli?tab=contributions", None).await;
13051305 assert!(old.contains("class=\"heat\""), "old tab link: calendar");
1306- assert!(!overview.contains("tab=contributions"), "nav: no contributions tab");
1306+ assert!(
1307+ !overview.contains("tab=contributions"),
1308+ "nav: no contributions tab"
1309+ );
13071310 let (_, day) = get(&site.router, "/tahinli?day=2020-01-01", None).await;
13081311 assert!(day.contains("class=\"heat\""), "day link: calendar");
13091312 }
crates/forge-web/src/pages/profile_calendar.rsmodified+1 -1
@@ -3,8 +3,8 @@
33
44 use std::time::Duration;
55
6-use forge_core::time::stamp_from_unix;
76 use forge_core::User;
7+use forge_core::time::stamp_from_unix;
88 use jiff::{Timestamp, civil};
99 use topcoat::Result;
1010
crates/forge-web/src/pages/profile_pins.rsmodified+24 -11
@@ -152,7 +152,10 @@ async fn pins_fingerprint(store: &Store, owner_id: &str) -> Result<String> {
152152 lines.push(format!("pin {}", repo.id));
153153 }
154154 for repo in store.list_repos_by_owner(owner_id).await? {
155- lines.push(format!("repo {} {}/{}", repo.id, repo.owner_name, repo.name));
155+ lines.push(format!(
156+ "repo {} {}/{}",
157+ repo.id, repo.owner_name, repo.name
158+ ));
156159 }
157160 Ok(lines.join("\n"))
158161 }
@@ -164,11 +167,16 @@ async fn pins_events(cx: &Cx) -> Result<Response> {
164167 let state = app_context::<AppState>(cx);
165168 let owner_id = viewer.0.id.clone();
166169 let store = state.store.clone();
167- stream_changes(cx, &state.live, &[Topic::User(owner_id.clone())], move || {
168- let store = store.clone();
169- let owner_id = owner_id.clone();
170- async move { pins_fingerprint(&store, &owner_id).await }
171- })
170+ stream_changes(
171+ cx,
172+ &state.live,
173+ &[Topic::User(owner_id.clone())],
174+ move || {
175+ let store = store.clone();
176+ let owner_id = owner_id.clone();
177+ async move { pins_fingerprint(&store, &owner_id).await }
178+ },
179+ )
172180 .await
173181 }
174182
@@ -201,11 +209,16 @@ async fn org_pins_events(cx: &Cx) -> Result<Response> {
201209 let state = app_context::<AppState>(cx);
202210 let owner_id = ctx.org.id.clone();
203211 let store = state.store.clone();
204- stream_changes(cx, &state.live, &[Topic::User(owner_id.clone())], move || {
205- let store = store.clone();
206- let owner_id = owner_id.clone();
207- async move { pins_fingerprint(&store, &owner_id).await }
208- })
212+ stream_changes(
213+ cx,
214+ &state.live,
215+ &[Topic::User(owner_id.clone())],
216+ move || {
217+ let store = store.clone();
218+ let owner_id = owner_id.clone();
219+ async move { pins_fingerprint(&store, &owner_id).await }
220+ },
221+ )
209222 .await
210223 }
211224
crates/forge-web/src/pages/pull_files.rsmodified+1 -3
@@ -24,9 +24,7 @@ use crate::auth::require_user;
2424 use crate::i18n::pulls::{self as g, K};
2525 use crate::i18n::{self, Lang};
2626 use crate::pages::edit_history::thread_edit_counts;
27-use crate::pages::issue_parts::{
28- check_write, csrf_of, may_converse, parse_number, triage, viewer,
29-};
27+use crate::pages::issue_parts::{check_write, csrf_of, may_converse, parse_number, triage, viewer};
3028 use crate::pages::pull_reviews::{error_text_in, pull_diff, suggest_states};
3129 use crate::pages::pull_view::{commits_of, frame_in, is_merged, pull_header, pull_subnav_in};
3230 use crate::pages::repo::repo_head;
crates/forge-web/src/pages/pull_view.rsmodified+3 -1
@@ -1033,7 +1033,9 @@ async fn pull_commits(cx: &Cx) -> Result<impl View> {
10331033 pull_header(frame: frame.clone())
10341034 pull_subnav_in(lang: lang, href: href, active: "commits".to_owned(),
10351035 commits: frame.commit_count, files: frame.file_count)
1036- commit_list(rows: rows, lang: lang)
1036+ <div class="issue-pane fit-pane">
1037+ commit_list(rows: rows, lang: lang)
1038+ </div>
10371039 )
10381040 })
10391041 }
crates/forge-web/src/pages/pulls_list.rsmodified+24 -20
@@ -266,12 +266,32 @@ async fn pulls_list_page(cx: &Cx) -> Result<impl View> {
266266 Ok(view! {
267267 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(), extra_stylesheet: Some(labels_href.as_str()),
268268 repo_head(head: header)
269+ <section class="issue-pane fit-pane">
269270 <div class="issue-toolbar" data-live=(live_url.as_str())>
270271 <nav class="issue-tabs" aria-label=(g::t(lang, K::ListStateNavLabel))>
271272 <a class=(state_tab_class(state_word == "open")) href=(open_href.as_str())>(open_text.as_str())</a>
272273 <a class=(state_tab_class(state_word == "closed")) href=(closed_href.as_str())>(closed_text.as_str())</a>
273274 <a class=(state_tab_class(state_word == "all")) href=(all_href.as_str())>(all_text.as_str())</a>
274275 </nav>
276+ <form method="get" action=(base.as_str()) class="issue-search">
277+ <input type="hidden" name="state" value=(sel.state)>
278+ <input type="hidden" name="label" value=(sel.label.as_str())>
279+ <input type="hidden" name="milestone" value=(sel.milestone.as_str())>
280+ <input type="hidden" name="author" value=(sel.author.as_str())>
281+ <input type="hidden" name="assignee" value=(sel.assignee.as_str())>
282+ <input type="search" name="q" value=(search_value.as_str()) placeholder=(g::t(lang, K::SearchTitles)) aria-label=(g::t(lang, K::SearchTitles)) maxlength="256">
283+ <select name="draft" aria-label=(g::t(lang, K::DraftFilterLabel)) data-autosubmit=(true)>
284+ <option value="" selected=(draft_sel.is_empty())>(g::t(lang, K::DraftAny))</option>
285+ <option value="true" selected=(draft_sel == "true")>(g::t(lang, K::DraftOnly))</option>
286+ <option value="false" selected=(draft_sel == "false")>(g::t(lang, K::DraftReadyOnly))</option>
287+ </select>
288+ <select name="sort" aria-label=(g::t(lang, K::SortLabel))>
289+ for option in sort_options.iter() {
290+ <option value=(option.value) selected=(option.selected)>(option.label)</option>
291+ }
292+ </select>
293+ <button type="submit">(g::t(lang, K::Search))</button>
294+ </form>
275295 <div class="issue-tools">
276296 <a class="issue-tab-link" href=(queue_href.as_str())>(mq::t(lang, mq::K::MergeQueueTitle))</a>
277297 if can_create {
@@ -279,25 +299,6 @@ async fn pulls_list_page(cx: &Cx) -> Result<impl View> {
279299 }
280300 </div>
281301 </div>
282- <form method="get" action=(base.as_str()) class="issue-search">
283- <input type="hidden" name="state" value=(sel.state)>
284- <input type="hidden" name="label" value=(sel.label.as_str())>
285- <input type="hidden" name="milestone" value=(sel.milestone.as_str())>
286- <input type="hidden" name="author" value=(sel.author.as_str())>
287- <input type="hidden" name="assignee" value=(sel.assignee.as_str())>
288- <input type="search" name="q" value=(search_value.as_str()) placeholder=(g::t(lang, K::SearchTitles)) aria-label=(g::t(lang, K::SearchTitles)) maxlength="256">
289- <select name="draft" aria-label=(g::t(lang, K::DraftFilterLabel)) data-autosubmit=(true)>
290- <option value="" selected=(draft_sel.is_empty())>(g::t(lang, K::DraftAny))</option>
291- <option value="true" selected=(draft_sel == "true")>(g::t(lang, K::DraftOnly))</option>
292- <option value="false" selected=(draft_sel == "false")>(g::t(lang, K::DraftReadyOnly))</option>
293- </select>
294- <select name="sort" aria-label=(g::t(lang, K::SortLabel))>
295- for option in sort_options.iter() {
296- <option value=(option.value) selected=(option.selected)>(option.label)</option>
297- }
298- </select>
299- <button type="submit">(g::t(lang, K::Search))</button>
300- </form>
301302 if has_filters {
302303 <p class="muted small">(g::t(lang, K::FiltersApplied)) <a href=(clear_href.as_str())>(g::t(lang, K::ClearFilters))</a></p>
303304 }
@@ -378,6 +379,7 @@ async fn pulls_list_page(cx: &Cx) -> Result<impl View> {
378379 }
379380 </nav>
380381 }
382+ </section>
381383 )
382384 })
383385 }
@@ -404,7 +406,9 @@ mod tests {
404406 let fx = fixture(Visibility::Public).await;
405407 let reply = send(&fx.router, "GET", &base(), true, None, &[]).await;
406408 assert_eq!(reply.status, 200);
407- assert!(reply.text().contains("No pull requests yet. Push a branch, then open one to propose its changes."));
409+ assert!(reply.text().contains(
410+ "No pull requests yet. Push a branch, then open one to propose its changes."
411+ ));
408412 assert_eq!(rows(&reply.text()), 0);
409413 }
410414
crates/forge-web/src/pages/push.rsmodified+3 -7
@@ -94,10 +94,7 @@ fn check_endpoint(endpoint: &str, policy: &WebhookPolicy) -> forge_core::Result<
9494 /// The browser's P-256 public key must be an uncompressed point, and its auth secret 16 bytes.
9595 fn check_keys(p256dh: &str, auth: &str) -> forge_core::Result<()> {
9696 let point = crypto::decode_b64(p256dh)?;
97- if point.len() != 65
98- || point[0] != 0x04
99- || p256::PublicKey::from_sec1_bytes(&point).is_err()
100- {
97+ if point.len() != 65 || point[0] != 0x04 || p256::PublicKey::from_sec1_bytes(&point).is_err() {
10198 return Err(forge_core::Error::Invalid(
10299 "the browser key is not a P-256 public key".into(),
103100 ));
@@ -298,9 +295,9 @@ async fn apple_touch_icon() -> Result<(StatusCode, HeaderMap, &'static [u8])> {
298295 #[cfg(test)]
299296 mod tests {
300297 use forge_core::Store;
298+ use p256::elliptic_curve::sec1::ToSec1Point;
301299 use topcoat::router::request::Request;
302300 use topcoat::router::{Body, Router, to_bytes};
303- use p256::elliptic_curve::sec1::ToSec1Point;
304301
305302 use crate::auth::SESSION_COOKIE;
306303 use crate::test_support::{app_router, create_session, test_state};
@@ -339,8 +336,7 @@ mod tests {
339336
340337 /// A browser key and auth secret as a browser would send them: base64url, uncompressed point.
341338 fn browser_keys() -> (String, String) {
342- let secret = p256::SecretKey::from_slice(&crypto::new_vapid_private())
343- .expect("scalar");
339+ let secret = p256::SecretKey::from_slice(&crypto::new_vapid_private()).expect("scalar");
344340 let point = secret.public_key().to_sec1_point(false);
345341 (
346342 crypto::encode_b64(point.as_bytes()),
crates/forge-web/src/pages/reactions_tests.rsmodified+4 -1
@@ -295,7 +295,10 @@ async fn refused_reactions_are_rejected_and_change_nothing() {
295295 )
296296 .await;
297297 assert_eq!(wrong_comment.status, 404, "comment of another issue");
298- assert!(on_issue(&s).await.is_empty(), "wrong target: nothing changes");
298+ assert!(
299+ on_issue(&s).await.is_empty(),
300+ "wrong target: nothing changes"
301+ );
299302
300303 // Case: an unknown reaction and an unknown target kind are 400.
301304 let bad_reaction = post(
crates/forge-web/src/pages/refs.rsmodified+6 -2
@@ -122,7 +122,7 @@ async fn refs_table(rows: Vec<RefRow>, kind_label: &str, lang: Lang) -> Result<i
122122 </thead>
123123 <tbody>
124124 for row in rows.into_iter() {
125- <tr>
125+ <tr data-kb-row="">
126126 <td class="tree-name">
127127 <span class="tree-label">
128128 <a href=(row.href)>(row.name)</a>
@@ -193,7 +193,11 @@ async fn tags_page(cx: &Cx) -> Result<impl View> {
193193 Ok(view! {
194194 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
195195 repo_head(head: header)
196- refs_table(rows: rows, kind_label: g::t(lang, K::TagKindLabel), lang: lang)
196+ <div class="lang-list fit-pane">
197+ <div class="list-scroll">
198+ refs_table(rows: rows, kind_label: g::t(lang, K::TagKindLabel), lang: lang)
199+ </div>
200+ </div>
197201 )
198202 })
199203 }
crates/forge-web/src/pages/register.rsmodified+4 -1
@@ -564,7 +564,10 @@ mod tests {
564564 let (status, _, html) =
565565 send(&router, "GET", "/register?invite=forge_nope", None, None).await;
566566 assert_eq!(status, 200, "bad invite: status");
567- assert!(html.contains("This invite is invalid"), "bad invite: notice");
567+ assert!(
568+ html.contains("This invite is invalid"),
569+ "bad invite: notice"
570+ );
568571
569572 // Case: a valid invite creates one verified account with the invited address.
570573 let admin = state
crates/forge-web/src/pages/releases.rsmodified+15 -17
@@ -25,7 +25,9 @@ use topcoat::router::content::Form;
2525 use topcoat::router::error::{SeeOther, forbidden, not_found, see_other};
2626 use topcoat::router::request::headers;
2727 use topcoat::router::response::Response;
28-use topcoat::router::{Body, HeaderName, HeaderValue, StatusCode, page, path_param, query_params, route};
28+use topcoat::router::{
29+ Body, HeaderName, HeaderValue, StatusCode, page, path_param, query_params, route,
30+};
2931 use topcoat::view::{Unescaped, View, component, view};
3032
3133 use crate::auth::require_csrf;
@@ -34,11 +36,11 @@ use crate::i18n::{
3436 self, Key, Lang,
3537 releases_ci::{self as g, K},
3638 };
39+use crate::pages::issue_parts::When;
3740 use crate::pages::refs::load_refs;
3841 use crate::pages::releases_live;
3942 use crate::pages::repo::repo_head;
4043 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
41-use crate::pages::issue_parts::When;
4244 use crate::release_ops::{self, CreateRelease, EditRelease, ReleaseError};
4345 use crate::render::markdown::render_markdown;
4446 use crate::state::AppState;
@@ -502,23 +504,19 @@ async fn list_body(
502504 <section class="card notice" role="status">(text)</section>
503505 }
504506 }
505- <section class="card fit-pane fit-card" data-live=(live.as_str())>
506- <div class="release-list-head">
507+ <section class="lang-list fit-pane" data-live=(live.as_str())>
508+ <div class="release-list-head list-bar">
507509 <h2>(g::t(lang, K::Releases))</h2>
508510 if let Some(href) = &new_href {
509- <a class="button" href=(href.as_str())>(g::t(lang, K::NewRelease))</a>
511+ <a class="button primary" href=(href.as_str())>(g::t(lang, K::NewRelease))</a>
510512 }
511513 </div>
512514 if cards.is_empty() {
513- empty_state(title: g::t(lang, K::NoReleasesYet),
514- if let Some(href) = &new_href {
515- <a class="button primary" href=(href.as_str())>(g::t(lang, K::NewRelease))</a>
516- }
517- )
515+ empty_state(title: g::t(lang, K::NoReleasesYet))
518516 }
519- <div class="fit-scroll">
517+ <div class="list-scroll">
520518 for card in cards.iter() {
521- <article class="release-card">
519+ <article class="release-card" data-kb-row="">
522520 <h3>
523521 <a href=(card.href.as_str())>(card.title.as_str())</a>
524522 if card.latest {
@@ -637,7 +635,7 @@ async fn new_form_body(
637635 ) -> Result<impl View> {
638636 Ok(view! {
639637 repo_head(head: head)
640- <section class="card fit-pane">
638+ <section class="lang-form">
641639 <h2>(g::t(lang, K::NewRelease))</h2>
642640 release_form(action: action, csrf: csrf, lang: lang, is_new: true, move_target: true, draft: draft, branches: branches, submit: g::t(lang, K::SaveRelease))
643641 </section>
@@ -908,12 +906,13 @@ async fn edit_body(
908906 <section class="card notice" role="status">(text)</section>
909907 }
910908 }
911- <section class="card">
909+ <div class="lang-split">
910+ <section class="lang-pane fit-pane">
912911 <p class="muted small"><a href=(view_tag.as_str())>(g::t(lang, K::BackToRelease))</a></p>
913912 <h2>(g::t(lang, K::EditRelease))</h2>
914913 release_form(action: action, csrf: csrf.clone(), lang: lang, is_new: false, move_target: move_target, draft: draft, branches: branches, submit: g::t(lang, K::SaveRelease))
915914 </section>
916- <section class="card">
915+ <section class="lang-pane fit-pane">
917916 <h2>(g::t(lang, K::Assets))</h2>
918917 <p class="muted small">(upload_hint.as_str())</p>
919918 asset_rows(assets: assets, delete_actions: delete_actions, upload_action: upload_action.clone(), csrf: csrf.clone(), lang: lang)
@@ -927,8 +926,6 @@ async fn edit_body(
927926 <button type="submit">(g::t(lang, K::UploadAsset))</button>
928927 </div>
929928 </form>
930- </section>
931- <section class="card">
932929 <h2>(g::t(lang, K::DeleteRelease))</h2>
933930 <p class="muted small">(g::t(lang, K::DeleteReleaseHelp))</p>
934931 <div>
@@ -946,6 +943,7 @@ async fn edit_body(
946943 </details>
947944 </div>
948945 </section>
946+ </div>
949947 })
950948 }
951949
crates/forge-web/src/pages/repo.rsmodified+21 -39
@@ -20,24 +20,24 @@ use topcoat::view::{View, component, view};
2020
2121 use crate::i18n::code::{self as g, K};
2222 use crate::i18n::{self, Lang};
23-use crate::pages::passkeys::s;
2423 use crate::pages::code_live::{follows_branch, home_live_url};
2524 use crate::pages::finder::file_finder;
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-};
3025 use crate::pages::issue_parts::stamp_unix;
3126 use crate::pages::notifications::watch_form;
3227 use crate::pages::packages;
28+use crate::pages::passkeys::s;
3329 use crate::pages::refs::{load_refs, ref_links};
3430 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
31+use crate::pages::repo_side::{
32+ StripFacts, commit_strip, readme_meta, repo_dock, repo_strip, run_rows, run_states, strip_bars,
33+ tree_facts,
34+};
3535 use crate::pages::tree::{
3636 entry_rows, last_commits, latest_bar, load_readme, read_dir, readme_card, tree_table,
3737 };
3838 use crate::state::AppState;
3939 use crate::views::repo_list::badge_class;
40-use crate::views::{now_unix, ref_selector, rel_time, relative_time, repo_href, repo_tabs, shell, user_link};
40+use crate::views::{now_unix, ref_selector, rel_time, relative_time, repo_href, repo_tabs, shell};
4141
4242 path_param!(owner);
4343 path_param!(repo);
@@ -93,12 +93,8 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
9393 wiki,
9494 security,
9595 lang,
96- compact_tabs,
9796 ..
9897 } = head;
99- // The title gets its own copies: the view below moves `owner` and `name` into `repo_tabs`.
100- let title_owner = owner.clone();
101- let title_name = name.clone();
10298 let badge = badge_class(visibility);
10399 let vis = i18n::visibility_label(lang, visibility);
104100 let active = active.to_owned();
@@ -154,22 +150,14 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
154150 None => ("", "", None, String::new()),
155151 };
156152 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
153+ // Every repo page has one head row: the path bar names the repo, and the tabs share a row with
158154 // 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;
162155 let has_origin = fork_line.is_some() || mirror_line.is_some();
163156 Ok(view! {
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 {
157+ <section class="page-head repo-head-code" data-live=(live_attr.as_deref())>
158+ <h1 class="sr-only">(owner.as_str()) "/" (name.as_str())</h1>
159+ if has_origin {
166160 <div>
167- if !tabs_head {
168- <div class="repo-title-row">
169- <h1 class="repo-title">user_link(shown: title_owner.as_str(), login: title_owner.as_str()) "/" (title_name.as_str())</h1>
170- <span class=(badge)>(vis)</span>
171- </div>
172- }
173161 if let Some((href, label)) = fork_line {
174162 <p class="muted small">(g::t(lang, K::ForkedFrom)) <a href=(href.as_str())>(label.as_str())</a></p>
175163 }
@@ -184,13 +172,9 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
184172 }
185173 </div>
186174 }
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- }
175+ 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)
190176 <div class="header-actions">
191- if tabs_head {
192- <span class=(badge)>(vis)</span>
193- }
177+ <span class=(badge)>(vis)</span>
194178 if let Some((action, csrf)) = fork_control {
195179 <form method="post" action=(action.as_str()) class="fork-form">
196180 <input type="hidden" name="csrf" value=(csrf.as_str())>
@@ -221,12 +205,9 @@ pub async fn repo_head(head: RepoHead) -> Result<impl View> {
221205 </section>
222206 }
223207 // The description belongs to the Code tab only; sub-pages keep the compact head.
224- if code && !description.is_empty() {
208+ if active == "code" && !description.is_empty() {
225209 <p class="lead">(description.as_str())</p>
226210 }
227- if !tabs_head {
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)
229- }
230211 })
231212 }
232213
@@ -507,7 +488,12 @@ async fn repo_page(cx: &Cx) -> Result<impl View> {
507488 let now = now_unix();
508489 let downloads = (
509490 repo_href(&owner_name, &repo_name, "archive", &format!("{branch}.zip")),
510- repo_href(&owner_name, &repo_name, "archive", &format!("{branch}.tar.gz")),
491+ repo_href(
492+ &owner_name,
493+ &repo_name,
494+ "archive",
495+ &format!("{branch}.tar.gz"),
496+ ),
511497 );
512498 // The dock: the history strip of the newest commits (cached per head) and the latest run's
513499 // commit subject. Empty repos have no tree, so they have no dock.
@@ -518,10 +504,6 @@ async fn repo_page(cx: &Cx) -> Result<impl View> {
518504 let ci_states = run_states(state, &repo.id).await?;
519505 let bars = strip_bars(&strip.commits, &ci_states);
520506 let total = strip.total;
521- let subject = match runs.first() {
522- Some(run) => commit_subject(state, &ctx.path, &run.commit).await,
523- None => None,
524- };
525507 let search_href = repo_href(&owner_name, &repo_name, "search", "");
526508 let show_search = !header.hide_search;
527509 let has_chips = latest.is_some() || !packages.is_empty();
@@ -543,7 +525,7 @@ async fn repo_page(cx: &Cx) -> Result<impl View> {
543525 file_finder(lang: lang, owner: owner_name.clone(), repo: repo_name.clone(),
544526 ref_name: branch.clone())
545527 if show_search {
546- <a class="small repo-search-link" href=(search_href.as_str())>(g::t(lang, K::SearchCodePlaceholder))</a>
528+ <a class="small repo-search-link" href=(search_href.as_str()) data-palette-action="go">(g::t(lang, K::SearchCodePlaceholder))</a>
547529 }
548530 clone_popover(https: https, ssh: ssh, downloads: Some(downloads), lang: lang)
549531 </div>
@@ -559,7 +541,7 @@ async fn repo_page(cx: &Cx) -> Result<impl View> {
559541 }
560542 </div>
561543 </div>
562- repo_dock(lang: lang, runs: runs, subject: subject, total: total, ci_href: ci_href,
544+ repo_dock(lang: lang, runs: runs, total: total, ci_href: ci_href,
563545 owner: owner_name.clone(), repo: repo_name.clone(), bars: bars)
564546 } else {
565547 <div class="browse-bar">
crates/forge-web/src/pages/repo_collaborators.rsmodified+3 -2
@@ -28,7 +28,7 @@ use crate::i18n::{self, Lang};
2828 use crate::pages::passkeys;
2929 use crate::pages::repo::repo_head;
3030 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
31-use crate::pages::repo_settings::settings_nav_for;
31+use crate::pages::repo_settings::settings_frame;
3232 use crate::pages::repo_settings_live::settings_head;
3333 use crate::state::AppState;
3434 use crate::views::{alert, avatar_url, display_name, empty_state, shell};
@@ -306,7 +306,7 @@ async fn collaborators_body(
306306 let notice = notice.map(|(key, is_error)| (g::t(lang, key), is_error));
307307 Ok(view! {
308308 repo_head(head: header)
309- settings_nav_for(lang: lang, title: nav_title, current: "collaborators")
309+ settings_frame(lang: lang, title: nav_title, current: "collaborators",
310310 if let Some((text, is_error)) = notice {
311311 if is_error {
312312 alert(message: text)
@@ -326,6 +326,7 @@ async fn collaborators_body(
326326 </section>
327327 role_legend(lang: lang)
328328 </div>
329+ )
329330 })
330331 }
331332
crates/forge-web/src/pages/repo_ctx.rsmodified+0 -4
@@ -60,9 +60,6 @@ pub struct RepoHead {
6060 pub active: &'static str,
6161 /// Hide the header's code-search box (the code search page draws its own).
6262 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,
6663 /// Whether the viewer may open the Settings tab.
6764 pub can_admin: bool,
6865 /// Open issues, for the Issues tab count.
@@ -239,7 +236,6 @@ impl RepoCtx {
239236 last_ok: mirror.last_ok,
240237 });
241238 Ok(RepoHead {
242- compact_tabs: false,
243239 lang: self.lang,
244240 owner: self.repo.owner_name.clone(),
245241 name: self.repo.name.clone(),
crates/forge-web/src/pages/repo_mirrors.rsmodified+19 -16
@@ -21,7 +21,7 @@ use topcoat::router::content::Form;
2121 use topcoat::router::error::{SeeOther, forbidden, not_found, see_other};
2222 use topcoat::router::request::uri;
2323 use topcoat::router::{page, path_param, route};
24-use topcoat::view::{View, component, view};
24+use topcoat::view::{Child, View, component, view};
2525
2626 use crate::audit::{self, Actor, Target};
2727 use crate::auth::{require_csrf, require_user};
@@ -33,10 +33,12 @@ use crate::i18n::{
3333 use crate::pages::refs::load_refs;
3434 use crate::pages::repo::repo_head;
3535 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
36-use crate::pages::repo_settings::settings_nav_for;
36+use crate::pages::repo_settings::settings_frame;
3737 use crate::pages::repo_settings_live::settings_head;
3838 use crate::state::AppState;
39-use crate::views::{alert, empty_state, enc, now_unix, rel_time_or_never, relative_time, shell, user_facing_message};
39+use crate::views::{
40+ alert, empty_state, enc, now_unix, rel_time_or_never, relative_time, shell, user_facing_message,
41+};
4042 use crate::webhooks::client::{WebhookPolicy, validate_url};
4143
4244 path_param!(owner);
@@ -392,10 +394,11 @@ async fn frame_top(
392394 notice: Option<(&'static str, bool)>,
393395 archived: bool,
394396 lang: Lang,
397+ #[default] child: Child<'_>,
395398 ) -> Result<impl View> {
396399 Ok(view! {
397400 repo_head(head: head)
398- settings_nav_for(lang: lang, title: title, current: "mirrors")
401+ settings_frame(lang: lang, title: title, current: "mirrors",
399402 if let Some((text, is_error)) = notice {
400403 if is_error {
401404 alert(message: text)
@@ -406,6 +409,8 @@ async fn frame_top(
406409 if archived {
407410 <section class="card notice" role="status">(g::t(lang, K::ArchivedNotice))</section>
408411 }
412+ (child)
413+ )
409414 })
410415 }
411416
@@ -506,7 +511,7 @@ async fn mirrors_list_body(
506511 let add_action = mirrors_href(&title);
507512 let can_pull = pull_form.is_some();
508513 Ok(view! {
509- frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang)
514+ frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang,
510515 <div class="fit-pane settings-split">
511516 <section class="card">
512517 <h2>(g::t(lang, K::Mirrors))</h2>
@@ -577,6 +582,7 @@ async fn mirrors_list_body(
577582 </section>
578583 }
579584 </div>
585+ )
580586 })
581587 }
582588
@@ -797,7 +803,7 @@ async fn mirror_body(
797803 };
798804 let current_url = redacted_url(&mirror.url);
799805 Ok(view! {
800- frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang)
806+ frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang,
801807 <section class="card">
802808 <h2>(mirror_kind(lang, mirror.direction))</h2>
803809 if archived {
@@ -841,6 +847,7 @@ async fn mirror_body(
841847 </div>
842848 </section>
843849 }
850+ )
844851 })
845852 }
846853
@@ -1257,16 +1264,13 @@ mod tests {
12571264 .set_ui_prefs(&tahinli.id, "auto", "tr")
12581265 .await
12591266 .expect("set language");
1260- let (status, _, body) = send(
1261- &app,
1262- "GET",
1263- "/tahinli/proj/settings/mirrors",
1264- &cookie,
1265- &[],
1266- )
1267- .await;
1267+ let (status, _, body) =
1268+ send(&app, "GET", "/tahinli/proj/settings/mirrors", &cookie, &[]).await;
12681269 assert_eq!(status, 200, "{body}");
1269- assert!(body.contains("<h2>Yansılar</h2>"), "Turkish heading missing");
1270+ assert!(
1271+ body.contains("<h2>Yansılar</h2>"),
1272+ "Turkish heading missing"
1273+ );
12701274 }
12711275
12721276 /// The push form refuses a loopback destination and stores nothing, then adds a good mirror
@@ -1495,5 +1499,4 @@ mod tests {
14951499 assert!(store.pull_mirror(&repo.id).await.expect("query").is_none());
14961500 assert!(store.list_mirrors(&repo.id).await.expect("list").is_empty());
14971501 }
1498-
14991502 }
crates/forge-web/src/pages/repo_rename.rsmodified+3 -2
@@ -22,7 +22,7 @@ use crate::i18n::repo_admin::{self as g, K};
2222 use crate::i18n::{self, Lang};
2323 use crate::pages::repo::repo_head;
2424 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
25-use crate::pages::repo_settings::settings_nav_for;
25+use crate::pages::repo_settings::settings_frame;
2626 use crate::pages::repo_settings_live::settings_head;
2727 use crate::state::AppState;
2828 use crate::views::{alert, shell};
@@ -120,7 +120,7 @@ async fn rename_body(
120120 } = forms;
121121 Ok(view! {
122122 repo_head(head: head)
123- settings_nav_for(lang: lang, title: nav_title, current: "rename")
123+ settings_frame(lang: lang, title: nav_title, current: "rename",
124124 if let Some(key) = notice {
125125 <section class="card notice" role="status">(g::t(lang, key))</section>
126126 }
@@ -164,6 +164,7 @@ async fn rename_body(
164164 </form>
165165 </section>
166166 }
167+ )
167168 })
168169 }
169170
crates/forge-web/src/pages/repo_secrets.rsmodified+8 -4
@@ -12,7 +12,7 @@ use topcoat::router::content::Form;
1212 use topcoat::router::error::{SeeOther, forbidden, not_found, see_other};
1313 use topcoat::router::request::uri;
1414 use topcoat::router::{page, path_param, route};
15-use topcoat::view::{View, component, view};
15+use topcoat::view::{Child, View, component, view};
1616
1717 use crate::audit::{self, Actor, Target};
1818 use crate::auth::{require_csrf, require_user};
@@ -20,7 +20,7 @@ use crate::i18n::repo_admin::{self as g, K};
2020 use crate::i18n::{self, Lang};
2121 use crate::pages::repo::repo_head;
2222 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
23-use crate::pages::repo_settings::settings_nav_for;
23+use crate::pages::repo_settings::settings_frame;
2424 use crate::pages::repo_settings_live::settings_head;
2525 use crate::state::AppState;
2626 use crate::views::{alert, empty_state, enc, rel_time, shell};
@@ -155,11 +155,12 @@ async fn frame_top(
155155 title: String,
156156 notice: Option<(K, bool)>,
157157 archived: bool,
158+ #[default] child: Child<'_>,
158159 ) -> Result<impl View> {
159160 let notice = notice.map(|(key, is_error)| (g::t(lang, key), is_error));
160161 Ok(view! {
161162 repo_head(head: head)
162- settings_nav_for(lang: lang, title: title, current: "secrets")
163+ settings_frame(lang: lang, title: title, current: "secrets",
163164 if let Some((text, is_error)) = notice {
164165 if is_error {
165166 alert(message: text)
@@ -170,6 +171,8 @@ async fn frame_top(
170171 if archived {
171172 <section class="card notice" role="status">(g::t(lang, K::ArchivedSecrets))</section>
172173 }
174+ (child)
175+ )
173176 })
174177 }
175178
@@ -190,7 +193,7 @@ async fn secrets_body(
190193 let set_action = secrets_href(&title);
191194 let delete_action = format!("{set_action}/delete");
192195 Ok(view! {
193- frame_top(lang: lang, head: head, title: title.clone(), notice: notice, archived: archived)
196+ frame_top(lang: lang, head: head, title: title.clone(), notice: notice, archived: archived,
194197 <div class="fit-pane settings-split">
195198 <section class="card">
196199 <h2>(g::t(lang, K::Secrets))</h2>
@@ -257,6 +260,7 @@ async fn secrets_body(
257260 </section>
258261 }
259262 </div>
263+ )
260264 })
261265 }
262266
crates/forge-web/src/pages/repo_security.rsmodified+13 -11
@@ -121,16 +121,17 @@ async fn security_body(
121121 let open_count = rows.iter().filter(|r| r.open).count();
122122 Ok(view! {
123123 repo_head(head: head)
124- <section class="card">
125- <h2>(i18n::t(lang, Key::Security))</h2>
126- if !enabled {
127- <p class="muted small">(g::t(lang, K::SecurityOff))</p>
128- } else {
129- <p class="muted small">(g::dependencies_summary(lang, dependencies, open_count))</p>
130- <p class="muted small">(g::t(lang, K::LockfilesRead))</p>
131- }
132- </section>
133- <section class="card">
124+ <section class="card lang-list fit-pane">
125+ <div class="list-bar">
126+ <h2>(i18n::t(lang, Key::Security))</h2>
127+ if !enabled {
128+ <p class="muted small">(g::t(lang, K::SecurityOff))</p>
129+ } else {
130+ <p class="muted small">(g::dependencies_summary(lang, dependencies, open_count))</p>
131+ <p class="muted small">(g::t(lang, K::LockfilesRead))</p>
132+ }
133+ </div>
134+ <div class="list-scroll">
134135 if rows.is_empty() {
135136 empty_state(title: g::t(lang, K::NoAlerts))
136137 } else {
@@ -150,7 +151,7 @@ async fn security_body(
150151 </thead>
151152 <tbody>
152153 for row in rows.iter() {
153- <tr>
154+ <tr data-kb-row="">
154155 <td><a href=(row.osv_href.as_str()) rel="noopener noreferrer"><code>(row.advisory.as_str())</code></a></td>
155156 <td><code>(row.package.as_str())</code></td>
156157 <td><code>(row.version.as_str())</code></td>
@@ -186,6 +187,7 @@ async fn security_body(
186187 </table>
187188 </div>
188189 }
190+ </div>
189191 </section>
190192 })
191193 }
crates/forge-web/src/pages/repo_settings.rsmodified+40 -21
@@ -26,7 +26,7 @@ use topcoat::cookie::{Cookie, Cookies, SameSite, cookies};
2626 use topcoat::router::content::Form;
2727 use topcoat::router::error::{SeeOther, forbidden, see_other};
2828 use topcoat::router::{page, path_param, route};
29-use topcoat::view::{View, component, view};
29+use topcoat::view::{Child, View, component, view};
3030
3131 use crate::audit::{self, Actor, Target};
3232 use crate::auth::{require_csrf, require_user};
@@ -268,13 +268,15 @@ async fn danger_zone(
268268 })
269269 }
270270
271-/// Sub-navigation for the settings pages. `current` names the page shown (`general` or `webhooks`)
272-/// and gets `aria-current`.
271+/// The settings frame: the sections in a left pane and the page's own content (its children) in a
272+/// right pane. Both fill the window below the repo head (see `.settings-layout` in `_lang_browse.scss`).
273+/// `current` names the section shown (`general`, `webhooks`, ...) and gets `aria-current`.
273274 #[component]
274-pub async fn settings_nav_for(
275+pub async fn settings_frame(
275276 lang: Lang,
276277 title: String,
277278 current: &'static str,
279+ #[default] child: Child<'_>,
278280 ) -> Result<impl View> {
279281 let general = format!("/{title}/settings");
280282 let collaborators = format!("/{title}/settings/collaborators");
@@ -288,7 +290,10 @@ pub async fn settings_nav_for(
288290 let hooks_on = current == "webhooks";
289291 let mirrors_on = current == "mirrors";
290292 let secrets_on = current == "secrets";
293+ let wiki = format!("/{title}/settings/wiki");
294+ let wiki_on = current == "wiki";
291295 Ok(view! {
296+ <div class="settings-layout">
292297 <nav class="settings-nav" aria-label=(g::t(lang, K::SettingsNavLabel))>
293298 if general_on {
294299 <a href=(general) aria-current="page">(g::t(lang, K::General))</a>
@@ -320,7 +325,16 @@ pub async fn settings_nav_for(
320325 } else {
321326 <a href=(secrets)>(g::t(lang, K::Secrets))</a>
322327 }
328+ if wiki_on {
329+ <a href=(wiki) aria-current="page">(crate::i18n::code::t(lang, crate::i18n::code::K::TabWiki))</a>
330+ } else {
331+ <a href=(wiki)>(crate::i18n::code::t(lang, crate::i18n::code::K::TabWiki))</a>
332+ }
323333 </nav>
334+ <div class="settings-main">
335+ (child)
336+ </div>
337+ </div>
324338 })
325339 }
326340
@@ -341,21 +355,22 @@ async fn general_section(
341355 let visibility_action = format!("/{title}/settings/visibility");
342356 let archive_action = format!("/{title}/settings/archive");
343357 // The visibility row shows where the repo is now and offers the other side behind a confirm.
344- let (current_visibility, flip_label, flip_confirm, flip_to) = if visibility == Visibility::Public {
345- (
346- g::t(lang, K::PublicOption),
347- g::t(lang, K::MakePrivate),
348- g::t(lang, K::MakePrivateConfirm),
349- "private",
350- )
351- } else {
352- (
353- g::t(lang, K::PrivateOption),
354- g::t(lang, K::MakePublic),
355- g::t(lang, K::MakePublicConfirm),
356- "public",
357- )
358- };
358+ let (current_visibility, flip_label, flip_confirm, flip_to) =
359+ if visibility == Visibility::Public {
360+ (
361+ g::t(lang, K::PublicOption),
362+ g::t(lang, K::MakePrivate),
363+ g::t(lang, K::MakePrivateConfirm),
364+ "private",
365+ )
366+ } else {
367+ (
368+ g::t(lang, K::PrivateOption),
369+ g::t(lang, K::MakePublic),
370+ g::t(lang, K::MakePublicConfirm),
371+ "public",
372+ )
373+ };
359374 let options: Vec<(String, bool)> = branches
360375 .into_iter()
361376 .map(|b| {
@@ -496,7 +511,10 @@ fn rule_pills(lang: Lang, rule: &BranchRule) -> Vec<RulePill> {
496511 pills.push(pill(g::t(lang, K::DeletionAllowed), warn));
497512 }
498513 if rule.required_approvals > 0 {
499- pills.push(pill(&g::approvals_count(lang, rule.required_approvals), plain));
514+ pills.push(pill(
515+ &g::approvals_count(lang, rule.required_approvals),
516+ plain,
517+ ));
500518 }
501519 if rule.restrict_push {
502520 pills.push(pill(g::t(lang, K::RulePrOnly), plain));
@@ -839,7 +857,7 @@ async fn settings_body(
839857 // danger zone. The pane holds them to one screen (see _fit_settings.scss).
840858 Ok(view! {
841859 repo_head(head: head)
842- settings_nav_for(lang: lang, title: title.clone(), current: "general")
860+ settings_frame(lang: lang, title: title.clone(), current: "general",
843861 if let Some((text, is_error)) = notice {
844862 if is_error {
845863 alert(message: text)
@@ -869,6 +887,7 @@ async fn settings_body(
869887 }
870888 </div>
871889 </div>
890+ )
872891 })
873892 }
874893
crates/forge-web/src/pages/repo_side.rsmodified+20 -20
@@ -7,8 +7,8 @@ use std::collections::HashMap;
77 use std::path::{Path, PathBuf};
88 use std::sync::{Mutex, OnceLock};
99
10-use forge_core::ci::{JobState, RunState};
1110 use forge_core::Repo;
11+use forge_core::ci::{JobState, RunState};
1212 use forge_git::churn::{self, CommitChurn};
1313 use forge_git::{browse, history};
1414 use time::OffsetDateTime;
@@ -26,7 +26,6 @@ use crate::pages::passkeys::s;
2626 use crate::pages::releases::LatestRelease;
2727 use crate::repo_stats::{LangShare, languages, license_file, license_id};
2828 use crate::state::AppState;
29-use crate::views::commit_line::commit_line;
3029 use crate::views::timeline::{StripBar, history_strip};
3130 use crate::views::{human_size, now_unix, rel_time, short_oid};
3231
@@ -185,16 +184,6 @@ pub fn strip_bars(commits: &[CommitChurn], ci: &HashMap<String, RunState>) -> Ve
185184 .collect()
186185 }
187186
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-
198187 /// One CI run as the column shows it: a link to the run, its dot, and one line of words. A run
199188 /// still going has a clock that ticks.
200189 pub struct RunRow {
@@ -249,7 +238,10 @@ pub async fn run_rows(state: &AppState, lang: Lang, repo: &Repo) -> Result<Vec<R
249238 )
250239 })
251240 .count();
252- let started = jobs.iter().filter_map(|job| job.started_at.as_deref()).min();
241+ let started = jobs
242+ .iter()
243+ .filter_map(|job| job.started_at.as_deref())
244+ .min();
253245 let branch = run
254246 .git_ref
255247 .strip_prefix("refs/heads/")
@@ -385,7 +377,11 @@ fn lang_slices(langs: &[LangShare]) -> Vec<LangSlice> {
385377 let slice = LangSlice {
386378 x: format!("{at}%"),
387379 width: format!("{}%", share.percent),
388- class: if share.others.is_empty() { SHADES[i.min(3)] } else { SHADES[4] },
380+ class: if share.others.is_empty() {
381+ SHADES[i.min(3)]
382+ } else {
383+ SHADES[4]
384+ },
389385 };
390386 at += share.percent;
391387 slice
@@ -464,7 +460,11 @@ pub async fn readme_meta(lang: Lang, facts: Option<TreeFacts>) -> Result<impl Vi
464460 let facts = facts.unwrap_or_default();
465461 let mut parts: Vec<String> = Vec::new();
466462 if let Some((file, id)) = facts.license.as_ref() {
467- parts.push(if id.is_empty() { file.clone() } else { id.clone() });
463+ parts.push(if id.is_empty() {
464+ file.clone()
465+ } else {
466+ id.clone()
467+ });
468468 }
469469 if facts.size > 0 {
470470 parts.push(human_size(lang, facts.size));
@@ -497,7 +497,6 @@ pub async fn readme_meta(lang: Lang, facts: Option<TreeFacts>) -> Result<impl Vi
497497 pub async fn repo_dock(
498498 lang: Lang,
499499 runs: Vec<RunRow>,
500- subject: Option<String>,
501500 total: u64,
502501 ci_href: String,
503502 owner: String,
@@ -520,9 +519,6 @@ pub async fn repo_dock(
520519 </a>
521520 <span class="dock-state">(state_text(lang, run.state.as_str()))</span>
522521 <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>
525- }
526522 if let Some(since) = run.since.as_deref() {
527523 if let Some(est) = run.est.as_ref() {
528524 <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>
@@ -553,7 +549,11 @@ fn release_counts(lang: Lang, release: &LatestRelease) -> String {
553549 Lang::En => format!(
554550 " \u{b7} {assets} {} \u{b7} {downloads} {}",
555551 if assets == 1 { "asset" } else { "assets" },
556- if downloads == 1 { "download" } else { "downloads" }
552+ if downloads == 1 {
553+ "download"
554+ } else {
555+ "downloads"
556+ }
557557 ),
558558 }
559559 }
crates/forge-web/src/pages/repo_webhooks.rsmodified+12 -6
@@ -18,7 +18,7 @@ use topcoat::router::content::Form;
1818 use topcoat::router::error::{SeeOther, forbidden, not_found, see_other};
1919 use topcoat::router::request::uri;
2020 use topcoat::router::{page, path_param, route};
21-use topcoat::view::{View, component, view};
21+use topcoat::view::{Child, View, component, view};
2222
2323 use crate::audit::{self, Actor, Target};
2424 use crate::auth::{require_csrf, require_user};
@@ -28,7 +28,7 @@ use crate::i18n::{
2828 };
2929 use crate::pages::repo::repo_head;
3030 use crate::pages::repo_ctx::{RepoCtx, RepoHead, load_repo};
31-use crate::pages::repo_settings::settings_nav_for;
31+use crate::pages::repo_settings::settings_frame;
3232 use crate::pages::repo_settings_live::settings_head;
3333 use crate::state::AppState;
3434 use crate::views::{alert, empty_state, enc, now_unix, relative_time, shell};
@@ -493,10 +493,11 @@ async fn frame_top(
493493 notice: Option<(&'static str, bool)>,
494494 archived: bool,
495495 lang: Lang,
496+ #[default] child: Child<'_>,
496497 ) -> Result<impl View> {
497498 Ok(view! {
498499 repo_head(head: head)
499- settings_nav_for(lang: lang, title: title, current: "webhooks")
500+ settings_frame(lang: lang, title: title, current: "webhooks",
500501 if let Some((text, is_error)) = notice {
501502 if is_error {
502503 alert(message: text)
@@ -507,6 +508,8 @@ async fn frame_top(
507508 if archived {
508509 <section class="card notice" role="status">(g::t(lang, K::HookArchivedNotice))</section>
509510 }
511+ (child)
512+ )
510513 })
511514 }
512515
@@ -570,7 +573,7 @@ async fn hooks_list_body(
570573 ) -> Result<impl View> {
571574 let new_href = format!("{}/new", hooks_href(&title));
572575 Ok(view! {
573- frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang)
576+ frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang,
574577 <section class="card">
575578 <h2>(g::t(lang, K::Webhooks))</h2>
576579 <p class="muted small">(g::t(lang, K::WebhooksIntro))</p>
@@ -613,6 +616,7 @@ async fn hooks_list_body(
613616 </ul>
614617 }
615618 </section>
619+ )
616620 })
617621 }
618622
@@ -685,7 +689,7 @@ async fn hook_body(
685689 let delete_action = format!("{edit_action}/delete");
686690 let events = event_boxes(lang, &draft.events);
687691 Ok(view! {
688- frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang)
692+ frame_top(head: head, title: title.clone(), notice: notice, archived: archived, lang: lang,
689693 <section class="card">
690694 <h2>(g::t(lang, K::EditWebhook))</h2>
691695 if archived {
@@ -732,6 +736,7 @@ async fn hook_body(
732736 </div>
733737 </section>
734738 }
739+ )
735740 })
736741 }
737742
@@ -811,7 +816,7 @@ async fn hook_new_body(
811816 let events = event_boxes(lang, &draft.events);
812817 let back = hooks_href(&title);
813818 Ok(view! {
814- frame_top(head: head, title: title.clone(), notice: None, archived: archived, lang: lang)
819+ frame_top(head: head, title: title.clone(), notice: None, archived: archived, lang: lang,
815820 <div class="fit-pane settings-split">
816821 <section class="card">
817822 <h2>(g::t(lang, K::AddWebhook))</h2>
@@ -822,6 +827,7 @@ async fn hook_new_body(
822827 <p><a href=(back.as_str())>(g::t(lang, K::BackToWebhooks))</a></p>
823828 </section>
824829 </div>
830+ )
825831 })
826832 }
827833
crates/forge-web/src/pages/review_requests.rsmodified+1 -1
@@ -292,7 +292,7 @@ async fn review_requests(cx: &Cx) -> Result<impl View> {
292292 empty_state(title: ga::t(lang, AK::NoReviewRequests))
293293 }
294294 if !empty {
295- <section class="card">
295+ <section class="card list-pane fit-pane">
296296 <ul class="notif-list review-request-list">
297297 for row in rows.iter() {
298298 <li>
crates/forge-web/src/pages/settings_appearance.rsmodified+8 -2
@@ -588,7 +588,11 @@ pub fn sidebar_stored(stored: &str) -> &'static str {
588588
589589 /// Builds the page for a viewer. Each choice shows the stored value, or the default when the
590590 /// stored id is no longer offered, which is what the page renders on `<html>` too.
591-fn page_for(viewer: &(User, Session), lang: Lang, prefs: &HashMap<String, String>) -> AppearancePage {
591+fn page_for(
592+ viewer: &(User, Session),
593+ lang: Lang,
594+ prefs: &HashMap<String, String>,
595+) -> AppearancePage {
592596 let user = &viewer.0;
593597 let density = match prefs.get(DENSITY).map(String::as_str) {
594598 Some("compact") => "compact",
@@ -796,7 +800,9 @@ mod tests {
796800 "accent upper case {id}"
797801 );
798802 }
799- for id in ["fern", "spark", "graphite", "dusk", "ink", "anvil", "hue-120"] {
803+ for id in [
804+ "fern", "spark", "graphite", "dusk", "ink", "anvil", "hue-120",
805+ ] {
800806 assert_eq!(
801807 base_choice(Lang::Tr, Some(id), "fern").unwrap(),
802808 id,
crates/forge-web/src/pages/settings_gpg.rsmodified+1 -1
@@ -50,7 +50,7 @@ async fn gpg_view(
5050 if !available {
5151 <p class="notice">(t(lang, Key::GpgUnavailable))</p>
5252 }
53- <section class="card">
53+ <section class="card fit-pane">
5454 if keys.is_empty() {
5555 empty_state(title: t(lang, Key::NoGpgKeys),
5656 <a class="button" href="#add-gpg-key">(t(lang, Key::AddGpgKeyTitle))</a>)
crates/forge-web/src/pages/settings_gpg_tests.rsmodified+22 -4
@@ -132,7 +132,14 @@ async fn gpg_refusals_and_the_listing_share_one_site() {
132132 .await
133133 .unwrap();
134134 let anon_fields = [("csrf", CSRF), ("id", key.id.as_str())];
135- let anon = call(&site, "POST", "/settings/gpg/delete", None, Some(&anon_fields)).await;
135+ let anon = call(
136+ &site,
137+ "POST",
138+ "/settings/gpg/delete",
139+ None,
140+ Some(&anon_fields),
141+ )
142+ .await;
136143 assert_eq!(anon.status, 303, "anonymous delete");
137144 let bad_delete = [("csrf", "wrong"), ("id", key.id.as_str())];
138145 let reply = call(
@@ -153,8 +160,14 @@ async fn gpg_refusals_and_the_listing_share_one_site() {
153160 // The page lists the key. The notice shows only when GPG is missing on this server.
154161 let reply = call(&site, "GET", "/settings/gpg", Some(&cookie), None).await;
155162 assert_eq!(reply.status, 200, "listing page");
156- assert!(reply.body.contains(FINGERPRINT), "listing shows the fingerprint");
157- assert!(reply.body.contains("tahinli@example.com"), "listing shows the email");
163+ assert!(
164+ reply.body.contains(FINGERPRINT),
165+ "listing shows the fingerprint"
166+ );
167+ assert!(
168+ reply.body.contains("tahinli@example.com"),
169+ "listing shows the email"
170+ );
158171 let notice = "GPG verification is unavailable on this server";
159172 assert_eq!(reply.body.contains(notice), !available, "notice");
160173 }
@@ -175,7 +188,12 @@ async fn owners_delete_their_own_keys_and_no_one_elses() {
175188 .unwrap();
176189 let bob_key = site
177190 .store
178- .add_gpg_key(&bob.id, BOB_FINGERPRINT, "armored", &["bob@example.com".into()])
191+ .add_gpg_key(
192+ &bob.id,
193+ BOB_FINGERPRINT,
194+ "armored",
195+ &["bob@example.com".into()],
196+ )
179197 .await
180198 .unwrap();
181199 let own_key = site
crates/forge-web/src/pages/settings_keys.rsmodified+47 -9
@@ -147,7 +147,7 @@ async fn keys_view(
147147 <section class="page-head">
148148 <h1>(t(lang, Key::SshKeys))</h1>
149149 </section>
150- <section class="card">
150+ <section class="card fit-pane">
151151 if keys.is_empty() {
152152 empty_state(title: t(lang, Key::NoSshKeys),
153153 <a class="button" href="#add-key">(t(lang, Key::AddSshKeyTitle))</a>)
@@ -308,9 +308,27 @@ mod tests {
308308 .collect::<Vec<_>>()
309309 .join(" ");
310310 let cases = [
311- ("ed25519 with comment", ED25519.to_owned(), "ssh-ed25519", "test@forge", ED25519_FP),
312- ("ed25519 bare and padded", format!(" {bare}\n"), "ssh-ed25519", "", ED25519_FP),
313- ("ecdsa", ECDSA.to_owned(), "ecdsa-sha2-nistp256", "tahinli@tFedora", ECDSA_FP),
311+ (
312+ "ed25519 with comment",
313+ ED25519.to_owned(),
314+ "ssh-ed25519",
315+ "test@forge",
316+ ED25519_FP,
317+ ),
318+ (
319+ "ed25519 bare and padded",
320+ format!(" {bare}\n"),
321+ "ssh-ed25519",
322+ "",
323+ ED25519_FP,
324+ ),
325+ (
326+ "ecdsa",
327+ ECDSA.to_owned(),
328+ "ecdsa-sha2-nistp256",
329+ "tahinli@tFedora",
330+ ECDSA_FP,
331+ ),
314332 ];
315333 for (name, input, algorithm, comment, fingerprint) in cases {
316334 let parsed = parse_public_key(&input).unwrap_or_else(|e| panic!("case {name}: {e:?}"));
@@ -337,18 +355,38 @@ mod tests {
337355 let relabelled = ED25519.replacen("ssh-ed25519", "ecdsa-sha2-nistp256", 1);
338356 let huge = format!("ssh-ed25519 {}", "A".repeat(MAX_KEY_CHARS));
339357 let cases = [
340- ("rsa", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCn test@host".to_owned(), KeyProblem::Rsa),
358+ (
359+ "rsa",
360+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCn test@host".to_owned(),
361+ KeyProblem::Rsa,
362+ ),
341363 (
342364 "dss",
343365 "ssh-dss AAAAB3NzaC1kc3MAAACBAP test@host".to_owned(),
344366 KeyProblem::UnsupportedType("ssh-dss".into()),
345367 ),
346368 ("relabelled", relabelled, KeyProblem::Mismatch),
347- ("bad base64", "ssh-ed25519 !!!notbase64".to_owned(), KeyProblem::BadBase64),
348- ("truncated", "ssh-ed25519 AAAA".to_owned(), KeyProblem::Truncated),
349- ("length past the end", format!("ssh-ed25519 {body}"), KeyProblem::Truncated),
369+ (
370+ "bad base64",
371+ "ssh-ed25519 !!!notbase64".to_owned(),
372+ KeyProblem::BadBase64,
373+ ),
374+ (
375+ "truncated",
376+ "ssh-ed25519 AAAA".to_owned(),
377+ KeyProblem::Truncated,
378+ ),
379+ (
380+ "length past the end",
381+ format!("ssh-ed25519 {body}"),
382+ KeyProblem::Truncated,
383+ ),
350384 ("empty", " ".to_owned(), KeyProblem::Empty),
351- ("no key body", "ssh-ed25519".to_owned(), KeyProblem::MissingBody),
385+ (
386+ "no key body",
387+ "ssh-ed25519".to_owned(),
388+ KeyProblem::MissingBody,
389+ ),
352390 ("too long", huge, KeyProblem::TooLong),
353391 ];
354392 for (name, input, want) in cases {
crates/forge-web/src/pages/settings_profile.rsmodified+4 -1
@@ -318,7 +318,10 @@ pub(crate) async fn store_avatar(
318318 };
319319 // Decoding and resizing are CPU-bound; keep them off the async workers. A decode can take
320320 // around 128 MiB, so only a couple run at once.
321- let _permit = avatar_slots().acquire().await.map_err(std::io::Error::other)?;
321+ let _permit = avatar_slots()
322+ .acquire()
323+ .await
324+ .map_err(std::io::Error::other)?;
322325 let joined = tokio::task::spawn_blocking(move || process_avatar(&bytes)).await;
323326 let processed = joined.map_err(std::io::Error::other)??;
324327 store
crates/forge-web/src/pages/settings_security.rsmodified+1 -1
@@ -241,7 +241,7 @@ async fn security_body(page: SecurityPage) -> Result<impl View> {
241241 <div class="settings-layout">
242242 <section class="page-head">
243243 <h1>(t(lang, Key::Security))</h1>
244- <p class="muted"><a href="/settings/security/log">(t(lang, Key::SecurityLog))</a>(t(lang, Key::SecurityLogRest))</p>
244+ <p class="muted page-action"><a href="/settings/security/log">(t(lang, Key::SecurityLog))</a>(t(lang, Key::SecurityLogRest))</p>
245245 </section>
246246 if let Some(message) = notice {
247247 <section class="card notice" role="status">
crates/forge-web/src/pages/settings_sessions.rsmodified+7 -9
@@ -59,8 +59,14 @@ async fn sessions_view(
5959 Ok(view! {
6060 <section class="page-head">
6161 <h1>(t(lang, Key::Sessions))</h1>
62+ if others > 0 {
63+ <form method="post" action="/settings/sessions/revoke-others" class="inline-form">
64+ <input type="hidden" name="csrf" value=(csrf)>
65+ <button type="submit" class="danger">(t(lang, Key::RevokeAllOthers))</button>
66+ </form>
67+ }
6268 </section>
63- <section class="card">
69+ <section class="card fit-pane">
6470 <ul class="item-list">
6571 for session in sessions.into_iter() {
6672 <li class="item">
@@ -91,14 +97,6 @@ async fn sessions_view(
9197 }
9298 </ul>
9399 </section>
94- if others > 0 {
95- <section class="card">
96- <form method="post" action="/settings/sessions/revoke-others" class="inline-form">
97- <input type="hidden" name="csrf" value=(csrf)>
98- <button type="submit" class="danger">(t(lang, Key::RevokeAllOthers))</button>
99- </form>
100- </section>
101- }
102100 })
103101 }
104102
crates/forge-web/src/pages/settings_tokens.rsmodified+1 -1
@@ -100,7 +100,7 @@ async fn tokens_view(
100100 <p class="muted small">(t(lang, Key::UseAsPassword))</p>
101101 </section>
102102 }
103- <section class="card">
103+ <section class="card fit-pane">
104104 if tokens.is_empty() {
105105 empty_state(title: t(lang, Key::NoAccessTokens),
106106 <a class="button" href="#add-token">(t(lang, Key::NewToken))</a>)
crates/forge-web/src/pages/snippets.rsmodified+53 -17
@@ -305,7 +305,7 @@ async fn snippet_list_body(
305305 <a class="button primary" href="/snippets/new">(g::t(lang, K::NewSnippet))</a>
306306 }
307307 </section>
308- <section class="card">
308+ <section class="card list-pane fit-pane">
309309 if rows.is_empty() {
310310 empty_state(title: g::t(lang, K::NoSnippets),
311311 if signed_in {
@@ -422,7 +422,7 @@ async fn snippet_form(
422422 }
423423 <form method="post" action=(action) class="snippet-form fit-pane">
424424 <input type="hidden" name="csrf" value=(csrf)>
425- <header class="snippet-head">
425+ <header class="snippet-head page-head">
426426 <h1>(heading)</h1>
427427 <div class="snippet-head-actions">
428428 <fieldset class="snippet-visibility">
@@ -535,7 +535,7 @@ async fn revisions_body(
535535 <h1>(heading.as_str())</h1>
536536 <a href=(back)>(g::t(lang, K::BackToSnippet))</a>
537537 </section>
538- <section class="card">
538+ <section class="card list-pane fit-pane">
539539 if revisions.is_empty() {
540540 <p class="muted">(g::t(lang, K::NoRevisions))</p>
541541 } else {
@@ -589,10 +589,7 @@ async fn snippets_list(cx: &Cx) -> Result<impl View> {
589589 .store
590590 .list_snippets(viewer_id.as_deref())
591591 .await?;
592- let rows: Vec<ListRow> = summaries
593- .into_iter()
594- .map(|s| list_row(lang, s))
595- .collect();
592+ let rows: Vec<ListRow> = summaries.into_iter().map(|s| list_row(lang, s)).collect();
596593 let signed_in = viewer.is_some();
597594 let title = g::t(lang, K::Snippets);
598595 Ok(view! {
@@ -859,10 +856,17 @@ mod tests {
859856 ("name_2", "b.rs"),
860857 ("content_2", ""),
861858 ]));
862- assert_eq!(draft.files.len(), 3, "blank cards: every card is kept while editing");
859+ assert_eq!(
860+ draft.files.len(),
861+ 3,
862+ "blank cards: every card is kept while editing"
863+ );
863864 let saved = draft.saved_files();
864865 assert_eq!(saved.len(), 2, "blank cards: a save drops the blank ones");
865- assert_eq!(saved[0].content, "one\ntwo", "blank cards: CRLF is normalised");
866+ assert_eq!(
867+ saved[0].content, "one\ntwo",
868+ "blank cards: CRLF is normalised"
869+ );
866870 assert_eq!(saved[1].name, "b.rs", "blank cards: the kept file");
867871
868872 // Case: a leading newline in a file survives the textarea.
@@ -913,7 +917,11 @@ mod tests {
913917 draft.remove(0);
914918 let numbers: Vec<usize> = draft.slots().iter().map(|s| s.number).collect();
915919 assert_eq!(numbers, vec![1, 2], "remove: numbers are kept");
916- assert_eq!(draft.slots()[0].name, "b.txt", "remove: the other card's name");
920+ assert_eq!(
921+ draft.slots()[0].name,
922+ "b.txt",
923+ "remove: the other card's name"
924+ );
917925
918926 // Case: add and remove clicks are told apart from a save.
919927 let add = form(&[("op", "add"), ("name_0", "a")]);
@@ -922,7 +930,11 @@ mod tests {
922930 assert_eq!(draft.slots().len(), 2, "add click: two cards");
923931 let remove = form(&[("remove", "1"), ("name_0", "a"), ("name_1", "")]);
924932 let mut draft = Draft::from_form(&remove);
925- assert_eq!(apply_slot_step(&mut draft, &remove), Some(0), "remove click: tab");
933+ assert_eq!(
934+ apply_slot_step(&mut draft, &remove),
935+ Some(0),
936+ "remove click: tab"
937+ );
926938 assert_eq!(draft.slots().len(), 1, "remove click: one card");
927939 assert_eq!(
928940 apply_slot_step(&mut Draft::blank(), &form(&[("title", "t")])),
@@ -933,8 +945,16 @@ mod tests {
933945 // Case: add shows the new last file.
934946 let mut draft = Draft::blank();
935947 let add = form(&[("op", "add"), ("name_0", "a")]);
936- assert_eq!(apply_slot_step(&mut draft, &add), Some(0), "add shows: first add");
937- assert_eq!(apply_slot_step(&mut draft, &add), Some(1), "add shows: new last");
948+ assert_eq!(
949+ apply_slot_step(&mut draft, &add),
950+ Some(0),
951+ "add shows: first add"
952+ );
953+ assert_eq!(
954+ apply_slot_step(&mut draft, &add),
955+ Some(1),
956+ "add shows: new last"
957+ );
938958 assert_eq!(draft.slots().len(), 2, "add shows: two cards");
939959
940960 // Case: removing a card shows the file before it, and the first one when it is first.
@@ -944,10 +964,18 @@ mod tests {
944964 }
945965 // Files 0..=2 at positions 0..=2; removing the file at position 2 shows position 1.
946966 let remove = form(&[("remove", "2")]);
947- assert_eq!(apply_slot_step(&mut draft, &remove), Some(1), "remove shows: before");
967+ assert_eq!(
968+ apply_slot_step(&mut draft, &remove),
969+ Some(1),
970+ "remove shows: before"
971+ );
948972 // Removing the first file shows the new first one.
949973 let remove = form(&[("remove", "0")]);
950- assert_eq!(apply_slot_step(&mut draft, &remove), Some(0), "remove shows: first");
974+ assert_eq!(
975+ apply_slot_step(&mut draft, &remove),
976+ Some(0),
977+ "remove shows: first"
978+ );
951979
952980 // Case: a failed save keeps the posted tab, and falls back to the first.
953981 let mut draft = Draft::blank();
@@ -956,8 +984,16 @@ mod tests {
956984 }
957985 let numbers: Vec<usize> = draft.slots().iter().map(|s| s.number).collect();
958986 assert_eq!(numbers, vec![0, 1, 2], "failed save: three cards");
959- assert_eq!(posted_tab(&draft, &form(&[("tab", "2")])), 2, "failed save: posted tab");
960- assert_eq!(posted_tab(&draft, &form(&[("tab", "9")])), 0, "failed save: unknown tab");
987+ assert_eq!(
988+ posted_tab(&draft, &form(&[("tab", "2")])),
989+ 2,
990+ "failed save: posted tab"
991+ );
992+ assert_eq!(
993+ posted_tab(&draft, &form(&[("tab", "9")])),
994+ 0,
995+ "failed save: unknown tab"
996+ );
961997 assert_eq!(posted_tab(&draft, &form(&[])), 0, "failed save: no tab");
962998 }
963999 }
crates/forge-web/src/pages/tree.rsmodified+2 -2
@@ -422,7 +422,7 @@ pub async fn latest_commit_bar(bar: LatestBar, lang: Lang) -> Result<impl View>
422422 <span>(author)</span>
423423 }
424424 </span>
425- <a class="latest-subject" href=(last.href.as_str())>(last.summary)</a>
425+ <a class="latest-subject" href=(last.href.as_str())>commit_line(subject: last.summary.clone())</a>
426426 <span class="latest-meta">
427427 <a class="mono latest-sha" href=(last.href.as_str())>(short)</a>
428428 <time class="latest-age" data-rel="true" datetime=(last.iso.as_str()) title=(last.absolute.as_str())>(last.age)</time>
@@ -572,7 +572,7 @@ async fn tree_page(cx: &Cx) -> Result<impl View> {
572572 Ok(view! {
573573 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
574574 repo_head(head: header)
575- <div class="repo-grid repo-home">
575+ <div class="repo-grid repo-home tree-browse">
576576 <div class="repo-main">
577577 <div class="browse-bar" data-live=(live.as_deref()) data-live-code=(live.is_some().then_some("true")) data-live-gone=(g::t(lang, K::LivePathGone))>
578578 ref_selector(lang: lang, label: mi::t(lang, MK::RefLabel), current: ref_name.clone(), branches: branches, tags: tags,
crates/forge-web/src/pages/wiki.rsmodified+8 -5
@@ -26,6 +26,7 @@ use crate::i18n::{self, Lang};
2626 use crate::live::Topic;
2727 use crate::pages::repo::repo_head;
2828 use crate::pages::repo_ctx::{RepoCtx, load_repo};
29+use crate::pages::repo_settings::settings_frame;
2930 use crate::pages::wiki_live::{bump_wiki, page_live_url, wiki_live_url};
3031 use crate::render::markdown::render_markdown;
3132 use crate::state::AppState;
@@ -204,7 +205,7 @@ fn page_links(
204205 #[component]
205206 async fn wiki_view_body(html: String) -> Result<impl View> {
206207 Ok(view! {
207- <section class="card wiki-page">
208+ <section class="card wiki-page fit-pane">
208209 <div class="markdown-body">(Unescaped::new_unchecked(html))</div>
209210 </section>
210211 })
@@ -219,7 +220,7 @@ async fn wiki_empty_body(
219220 ) -> Result<impl View> {
220221 let new = repo_href(&owner, &repo, "wiki", "-/new");
221222 Ok(view! {
222- <section class="card wiki-page">
223+ <section class="card wiki-page fit-pane">
223224 empty_state(title: g::t(lang, K::WikiNoPages),
224225 if can_write {
225226 <a class="button primary" href=(new.as_str())>(g::t(lang, K::CreateFirstPage))</a>
@@ -244,7 +245,7 @@ async fn wiki_list_body(
244245 })
245246 .collect();
246247 Ok(view! {
247- <section class="card wiki-page">
248+ <section class="card wiki-page fit-pane">
248249 if rows.is_empty() {
249250 empty_state(title: g::t(lang, K::NoPagesYet))
250251 } else {
@@ -261,7 +262,7 @@ async fn wiki_list_body(
261262 #[component]
262263 async fn wiki_history_body(lang: Lang, rows: Vec<RevisionRow>) -> Result<impl View> {
263264 Ok(view! {
264- <section class="card wiki-page">
265+ <section class="card wiki-page fit-pane">
265266 if rows.is_empty() {
266267 empty_state(title: g::t(lang, K::NoChangesYet))
267268 } else {
@@ -723,7 +724,9 @@ async fn wiki_settings_page(cx: &Cx) -> Result<impl View> {
723724 Ok(view! { cx =>
724725 shell(title: title.as_str(), viewer: ctx.viewer.as_ref(),
725726 repo_head(head: header)
726- wiki_settings_body(lang: lang, action: action, csrf: csrf, enabled: enabled)
727+ settings_frame(lang: lang, title: format!("{}/{}", ctx.repo.owner_name, ctx.repo.name), current: "wiki",
728+ wiki_settings_body(lang: lang, action: action, csrf: csrf, enabled: enabled)
729+ )
727730 )
728731 })
729732 }
crates/forge-web/src/render/commit_message.rsmodified+4 -1
@@ -150,7 +150,10 @@ fn strip_marker(clause: &str) -> &str {
150150 fn split_type(clause: &str) -> Option<(&'static str, &str)> {
151151 let rest = strip_marker(clause);
152152 let word_len = rest.bytes().take_while(u8::is_ascii_lowercase).count();
153- let kind = KINDS.iter().copied().find(|kind| *kind == &rest[..word_len])?;
153+ let kind = KINDS
154+ .iter()
155+ .copied()
156+ .find(|kind| *kind == &rest[..word_len])?;
154157 let mut tail = &rest[word_len..];
155158 if let Some(after) = tail.strip_prefix('(') {
156159 let close = after.find(')')?;
crates/forge-web/src/repo_stats.rsmodified+8 -1
@@ -109,7 +109,14 @@ const EXTENSIONS: &[(&str, &str)] = &[
109109 ];
110110
111111 /// Directory names whose contents are vendored or built, so they never count.
112-const SKIPPED_SEGMENTS: &[&str] = &["vendor", "node_modules", "third_party", "dist", "target", ".git"];
112+const SKIPPED_SEGMENTS: &[&str] = &[
113+ "vendor",
114+ "node_modules",
115+ "third_party",
116+ "dist",
117+ "target",
118+ ".git",
119+];
113120
114121 /// The language a path counts as, by its exact file name or its extension. None for anything
115122 /// unknown, vendored, generated or prose.
crates/forge-web/src/views/diff.rsmodified+1 -5
@@ -110,11 +110,7 @@ impl DiffOpts {
110110 let split = match current_user(cx).await? {
111111 Some((user, _)) => {
112112 let state = app_context::<AppState>(cx);
113- let stored = state
114- .store
115- .user_prefs(&user.id)
116- .await?
117- .remove(DIFF_VIEW);
113+ let stored = state.store.user_prefs(&user.id).await?.remove(DIFF_VIEW);
118114 match view_param.as_deref() {
119115 Some(v @ ("split" | "unified")) => {
120116 if stored.as_deref() != Some(v) {
crates/forge-web/src/views/mod.rsmodified+117 -24
@@ -32,11 +32,11 @@ use crate::i18n::authoring::{self as au, K as AuK};
3232 use crate::i18n::browse as br;
3333 use crate::i18n::code::{self as g, K};
3434 use crate::i18n::community::{self as cm, K as CK};
35-use crate::i18n::packages::{self as pk, K as PK};
3635 use crate::i18n::link::{self as lk, K as LinkKey};
3736 use crate::i18n::migrate::{self as mg, K as MGK};
3837 use crate::i18n::misc::{self as mi, K as MK};
3938 use crate::i18n::orgs::{self as o, K as OK};
39+use crate::i18n::packages::{self as pk, K as PK};
4040 use crate::i18n::{self, Key, Lang, t};
4141 use crate::pages::assets::highlight_css_text;
4242 use crate::pages::user_prefs::{CORNER_POS, TREE_WIDTH, clean_pref};
@@ -156,7 +156,9 @@ fn path_segments(path: &str, title: &str) -> Vec<(String, Option<String>)> {
156156 if let Some(repo) = parts.get(1) {
157157 segments.push((repo.clone(), Some(repo_href(owner, repo, "", ""))));
158158 match &parts[2..] {
159- [kind, git_ref, prefix @ ..] if matches!(kind.as_str(), "tree" | "blob") && !prefix.is_empty() => {
159+ [kind, git_ref, prefix @ ..]
160+ if matches!(kind.as_str(), "tree" | "blob") && !prefix.is_empty() =>
161+ {
160162 let mut at = git_ref.clone();
161163 for part in prefix {
162164 at.push('/');
@@ -206,7 +208,15 @@ fn live_strip(lang: Lang, runs: &ActorRuns) -> LiveStrip {
206208 let mut rows = Vec::new();
207209 for run in &runs.running {
208210 let job = run.current_job.as_deref().unwrap_or("");
209- rows.push(strip_run("hot", run, if job.is_empty() { String::new() } else { format!(" {job}") }));
211+ rows.push(strip_run(
212+ "hot",
213+ run,
214+ if job.is_empty() {
215+ String::new()
216+ } else {
217+ format!(" {job}")
218+ },
219+ ));
210220 }
211221 for run in &runs.finished {
212222 let (state, word) = match run.state {
@@ -217,7 +227,9 @@ fn live_strip(lang: Lang, runs: &ActorRuns) -> LiveStrip {
217227 };
218228 rows.push(strip_run(state, run, format!(" {word}")));
219229 }
220- let count = |pred: fn(RunState) -> bool| runs.finished.iter().filter(|run| pred(run.state)).count() as u64;
230+ let count = |pred: fn(RunState) -> bool| {
231+ runs.finished.iter().filter(|run| pred(run.state)).count() as u64
232+ };
221233 let running = runs.running.len() as u64;
222234 let failed = count(|state| matches!(state, RunState::Failure | RunState::Error));
223235 let passed = count(|state| matches!(state, RunState::Success));
@@ -304,20 +316,43 @@ struct ProfileCorner {
304316 #[component]
305317 async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View> {
306318 let review_chip = (corner.reviews > 0).then(|| {
307- (corner.reviews.to_string(), mi::review_requests_count(lang, corner.reviews))
319+ (
320+ corner.reviews.to_string(),
321+ mi::review_requests_count(lang, corner.reviews),
322+ )
323+ });
324+ let mention_chip = (corner.mentions > 0).then(|| {
325+ (
326+ corner.mentions.to_string(),
327+ mi::mentions_count(lang, corner.mentions),
328+ )
329+ });
330+ let failing_chip = (corner.failing > 0).then(|| {
331+ (
332+ corner.failing.to_string(),
333+ mi::failing_runs_count(lang, corner.failing),
334+ )
308335 });
309- let mention_chip = (corner.mentions > 0)
310- .then(|| (corner.mentions.to_string(), mi::mentions_count(lang, corner.mentions)));
311- let failing_chip = (corner.failing > 0)
312- .then(|| (corner.failing.to_string(), mi::failing_runs_count(lang, corner.failing)));
313336 let bell_label = mi::t(lang, MK::AllNotifications);
314337 let theme_label = mi::t(lang, MK::ThemeLabel);
315338 let match_label = mi::t(lang, MK::MatchSystem);
316339 let light_label = mi::t(lang, MK::Light);
317340 let dark_label = mi::t(lang, MK::Dark);
318- let auto_pressed = if corner.theme == "auto" { "true" } else { "false" };
319- let light_pressed = if corner.theme == "light" { "true" } else { "false" };
320- let dark_pressed = if corner.theme == "dark" { "true" } else { "false" };
341+ let auto_pressed = if corner.theme == "auto" {
342+ "true"
343+ } else {
344+ "false"
345+ };
346+ let light_pressed = if corner.theme == "light" {
347+ "true"
348+ } else {
349+ "false"
350+ };
351+ let dark_pressed = if corner.theme == "dark" {
352+ "true"
353+ } else {
354+ "false"
355+ };
321356 // The chips' titles as nav.js rebuilds them: the server's phrase with `{n}` for the count. The
322357 // singular and plural forms are separate, as English puts "request" and "requests" apart.
323358 let review_template = count_template(&mi::review_requests_count(lang, 2), 2);
@@ -464,6 +499,7 @@ pub async fn shell(
464499 None
465500 };
466501 let section_menu = section.clone();
502+ let site_shell = section.as_ref().is_some_and(|s| s.site);
467503 let theme_attr = crate::theme::data_theme(__cx, viewer.map(|(user, _)| user));
468504 // The relative-time wording and the server's clock, for nav.js to keep `<time data-rel>` labels current.
469505 let rel_words_attr = rel_words(lang);
@@ -538,7 +574,11 @@ pub async fn shell(
538574 .into_iter()
539575 .enumerate()
540576 .map(|(i, (label, href))| PathCrumb {
541- class: if i == 0 && href.is_some() { "pathbar-seg owner" } else { "pathbar-seg" },
577+ class: if i == 0 && href.is_some() {
578+ "pathbar-seg owner"
579+ } else {
580+ "pathbar-seg"
581+ },
542582 label,
543583 href,
544584 })
@@ -558,7 +598,10 @@ pub async fn shell(
558598 waiting
559599 .iter()
560600 .find(|item| {
561- matches!(item.reason, forge_core::notifications::Reason::ReviewRequested) == review
601+ matches!(
602+ item.reason,
603+ forge_core::notifications::Reason::ReviewRequested
604+ ) == review
562605 })
563606 .map_or_else(
564607 || "/notifications".to_owned(),
@@ -575,7 +618,9 @@ pub async fn shell(
575618 |(owner, repo, number)| repo_href(owner, repo, "ci", &format!("runs/{number}")),
576619 );
577620 // The corner's drag saves its position with this token, the same one the page's forms send.
578- let prefs_csrf = viewer.map(|(_, session)| session.csrf_token.clone()).unwrap_or_default();
621+ let prefs_csrf = viewer
622+ .map(|(_, session)| session.csrf_token.clone())
623+ .unwrap_or_default();
579624 let corner = viewer.map(|(user, session)| ProfileCorner {
580625 username: user.username.clone(),
581626 name: user
@@ -731,7 +776,7 @@ pub async fn shell(
731776 </form>
732777 </div>
733778 }
734- <div class="shell">
779+ <div class=(if site_shell { "shell shell-site" } else { "shell" })>
735780 if let Some(section) = section {
736781 <aside class="shell-sidebar">
737782 section_nav(title: section.title.as_str(), back: section.back, back_href: section.back_href.as_str(), items: section.items, current: section.current, live: section.live)
@@ -792,6 +837,9 @@ pub struct Section {
792837 pub current: &'static str,
793838 /// The stream the section's pages follow, or empty when they follow none.
794839 pub live: &'static str,
840+ /// True for the site-wide sections (admin and the user's settings), which lay their pages out
841+ /// as panes across the window. An organization's settings keep their own layout.
842+ pub site: bool,
795843 }
796844
797845 pub fn admin_items(lang: Lang) -> Vec<NavItem> {
@@ -922,8 +970,16 @@ pub fn global_items(lang: Lang, can_create_org: bool) -> Vec<NavItem> {
922970 };
923971 let mut items = vec![
924972 item("explore", "/explore", t(lang, Key::Explore)),
925- item("notifications", "/notifications", t(lang, Key::Notifications)),
926- item("reviews", "/review-requests", au::t(lang, AuK::ReviewRequests)),
973+ item(
974+ "notifications",
975+ "/notifications",
976+ t(lang, Key::Notifications),
977+ ),
978+ item(
979+ "reviews",
980+ "/review-requests",
981+ au::t(lang, AuK::ReviewRequests),
982+ ),
927983 item(
928984 "needs-you",
929985 "/needs-you",
@@ -1028,6 +1084,7 @@ pub fn section_for(lang: Lang, path: &str) -> Option<Section> {
10281084 items: org_items(lang, second),
10291085 current,
10301086 live: "",
1087+ site: false,
10311088 });
10321089 }
10331090 _ => return None,
@@ -1049,6 +1106,7 @@ pub fn section_for(lang: Lang, path: &str) -> Option<Section> {
10491106 items,
10501107 current,
10511108 live,
1109+ site: true,
10521110 })
10531111 }
10541112
@@ -1632,7 +1690,11 @@ async fn ref_group(
16321690 now: i64,
16331691 ) -> Result<impl View> {
16341692 let count = links.len();
1635- let icon = if kind == "tags" { TAG_ICON } else { BRANCH_ICON };
1693+ let icon = if kind == "tags" {
1694+ TAG_ICON
1695+ } else {
1696+ BRANCH_ICON
1697+ };
16361698 let head_id = format!("ref-head-{kind}");
16371699 Ok(view! {
16381700 if count > 0 {
@@ -1779,7 +1841,10 @@ mod tests {
17791841 vec![
17801842 ("tahinli".to_owned(), Some("/tahinli".to_owned())),
17811843 ("forge".to_owned(), Some("/tahinli/forge".to_owned())),
1782- ("src".to_owned(), Some("/tahinli/forge/tree/main/src".to_owned())),
1844+ (
1845+ "src".to_owned(),
1846+ Some("/tahinli/forge/tree/main/src".to_owned())
1847+ ),
17831848 ("main.rs".to_owned(), None),
17841849 ]
17851850 );
@@ -2033,25 +2098,53 @@ mod shell_tests {
20332098 let store = state.store.clone();
20342099 let router = crate::test_support::app_router(state);
20352100
2036- let tag = html_tag_for_colours(&router, &store, "tahinli", "colour-token", ["ocean", "plum", "ink", "dusk"]).await;
2101+ let tag = html_tag_for_colours(
2102+ &router,
2103+ &store,
2104+ "tahinli",
2105+ "colour-token",
2106+ ["ocean", "plum", "ink", "dusk"],
2107+ )
2108+ .await;
20372109 assert!(tag.contains("data-accent-light=\"ocean\""), "{tag}");
20382110 assert!(tag.contains("data-accent-dark=\"plum\""), "{tag}");
20392111 assert!(tag.contains("data-base-light=\"ink\""), "{tag}");
20402112 assert!(tag.contains("data-base-dark=\"dusk\""), "{tag}");
20412113 assert!(!tag.contains("data-accent="), "{tag}");
20422114 // Stored ids that are no longer offered fall back to the defaults, never to nothing.
2043- let removed = html_tag_for_colours(&router, &store, "removed", "removed-token", ["removed-palette", "removed-palette", "x", "x"]).await;
2115+ let removed = html_tag_for_colours(
2116+ &router,
2117+ &store,
2118+ "removed",
2119+ "removed-token",
2120+ ["removed-palette", "removed-palette", "x", "x"],
2121+ )
2122+ .await;
20442123 assert!(removed.contains("data-accent-light=\"sage\""), "{removed}");
20452124 assert!(removed.contains("data-accent-dark=\"sage\""), "{removed}");
20462125 assert!(removed.contains("data-base-light=\"fern\""), "{removed}");
20472126 assert!(removed.contains("data-base-dark=\"fern\""), "{removed}");
20482127 // A removed preset (`ochre`, `mist`) falls back too, and a hue passes through as itself.
2049- let retired = html_tag_for_colours(&router, &store, "retired", "retired-token", ["ochre", "terracotta", "mist", "stone"]).await;
2128+ let retired = html_tag_for_colours(
2129+ &router,
2130+ &store,
2131+ "retired",
2132+ "retired-token",
2133+ ["ochre", "terracotta", "mist", "stone"],
2134+ )
2135+ .await;
20502136 assert!(retired.contains("data-accent-light=\"sage\""), "{retired}");
20512137 assert!(retired.contains("data-accent-dark=\"sage\""), "{retired}");
20522138 assert!(retired.contains("data-base-light=\"fern\""), "{retired}");
20532139 assert!(retired.contains("data-base-dark=\"fern\""), "{retired}");
2054- let hued = html_tag_for_colours(&router, &store, "hued", "hued-token", ["hue-215", "hue-7", "hue-300", "spark"]).await;
2140+ let hued = html_tag_for_colours(
2141+ &router,
2142+ &store,
2143+ "hued",
2144+ "hued-token",
2145+ ["hue-215", "hue-7", "hue-300", "spark"],
2146+ )
2147+ .await;
20552148 assert!(hued.contains("data-accent-light=\"hue-215\""), "{hued}");
20562149 assert!(hued.contains("data-accent-dark=\"hue-7\""), "{hued}");
20572150 assert!(hued.contains("data-base-light=\"hue-300\""), "{hued}");
crates/forge-web/src/web_push/crypto.rsmodified+2 -3
@@ -80,9 +80,8 @@ fn encrypt_body(
8080 salt: &[u8; 16],
8181 payload: &[u8],
8282 ) -> Result<Vec<u8>> {
83- let encryption_error = |e: &dyn std::fmt::Display| {
84- Error::Crypto(format!("web push encryption failed: {e}"))
85- };
83+ let encryption_error =
84+ |e: &dyn std::fmt::Display| Error::Crypto(format!("web push encryption failed: {e}"));
8685 let as_public = as_secret.public_key().to_sec1_point(false);
8786 let ua_point = ua_public.to_sec1_point(false);
8887 let shared = p256::ecdh::diffie_hellman(as_secret.to_nonzero_scalar(), ua_public.as_affine());
crates/forge-web/src/web_push/mod.rsmodified+1 -2
@@ -492,8 +492,7 @@ mod tests {
492492 }
493493
494494 fn device(endpoint: String) -> PushSubscription {
495- let secret = p256::SecretKey::from_slice(&crypto::new_vapid_private())
496- .expect("scalar");
495+ let secret = p256::SecretKey::from_slice(&crypto::new_vapid_private()).expect("scalar");
497496 let point = secret.public_key().to_sec1_point(false);
498497 PushSubscription {
499498 id: endpoint.clone(),
crates/forge-web/tests/e2e/orgs_ui_e2e.rsmodified+4 -1
@@ -400,7 +400,10 @@ async fn org_settings_delete_and_audit_end_to_end() {
400400 assert!(shown.body.contains("Settings saved."), "saved notice");
401401 assert!(shown.body.contains("Anvils and more"), "description saved");
402402 let profile = http.get("/acme", Some(&tahinli)).await;
403- assert!(profile.body.contains("Acme Inc"), "display name on the profile");
403+ assert!(
404+ profile.body.contains("Acme Inc"),
405+ "display name on the profile"
406+ );
404407 assert_eq!(
405408 selected_value(&shown.body, "default_repo_role").as_deref(),
406409 Some("write"),
crates/forge-web/tests/e2e/repo_settings_e2e.rsmodified+8 -2
@@ -217,7 +217,10 @@ async fn repo_settings_end_to_end() {
217217 )
218218 .await;
219219 assert_eq!(deleted.status, 303, "owner delete: {}", deleted.body);
220- assert_eq!(deleted.header(LOCATION).as_deref(), Some("/bob?tab=repositories"));
220+ assert_eq!(
221+ deleted.header(LOCATION).as_deref(),
222+ Some("/bob?tab=repositories")
223+ );
221224 assert!(
222225 cookie_named(&deleted, "forge_notice").is_some(),
223226 "notice cookie"
@@ -338,7 +341,10 @@ async fn repo_settings_deletes_rows_when_repo_dir_is_missing() {
338341 "delete with missing dir: {}",
339342 deleted.body
340343 );
341- assert_eq!(deleted.header(LOCATION).as_deref(), Some("/bob?tab=repositories"));
344+ assert_eq!(
345+ deleted.header(LOCATION).as_deref(),
346+ Some("/bob?tab=repositories")
347+ );
342348 assert_eq!(
343349 http.get("/bob/gone", Some(&bob)).await.status,
344350 404,
crates/forge-web/tests/e2e/ui_prefs_e2e.rsmodified+2 -3
@@ -95,9 +95,8 @@ fn theme_button(body: &str) -> (String, String) {
9595 /// The theme the profile corner's three-way choice shows as pressed, for signed-in users.
9696 fn pressed_theme(body: &str) -> Option<String> {
9797 let doc = scraper::Html::parse_document(body);
98- let selector =
99- scraper::Selector::parse("form.corner-theme-set button[aria-pressed=\"true\"]")
100- .expect("selector");
98+ let selector = scraper::Selector::parse("form.corner-theme-set button[aria-pressed=\"true\"]")
99+ .expect("selector");
101100 doc.select(&selector)
102101 .next()
103102 .and_then(|el| el.value().attr("value"))
style/_continuity.scssmodified+57 -7
@@ -1,21 +1,71 @@
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) {
1+// Continuity: every navigation is the same calm transition (nav.js sets `html.is-navigating` for it).
2+// The top bar, the profile corner and the repo head stay where they are, the active tab slides to its
3+// new place, and the page body fades in with a small rise. A link from a row also grows into the new
4+// page's title (`forge-row`). Reduced motion turns all of it off.
5+html.is-navigating {
6+ .topbar {
7+ view-transition-name: forge-top;
8+ }
9+
10+ .repo-head-code {
11+ view-transition-name: forge-head;
12+ }
13+
14+ .repo-tabs .tab.active {
15+ view-transition-name: forge-tab;
16+ }
17+
18+ .shell-body > main {
19+ view-transition-name: forge-main;
20+ }
21+}
22+
23+::view-transition-group(forge-row),
24+::view-transition-group(forge-tab) {
525 animation-duration: 220ms;
626 animation-timing-function: ease-out;
727 }
828
929 ::view-transition-old(forge-row),
10-::view-transition-new(forge-row) {
30+::view-transition-new(forge-row),
31+::view-transition-old(forge-tab),
32+::view-transition-new(forge-tab) {
1133 animation-duration: 220ms;
1234 animation-timing-function: ease-out;
1335 }
1436
37+// The chrome does not fade: the same bar is on both pages.
38+::view-transition-old(forge-top),
39+::view-transition-new(forge-top),
1540 ::view-transition-old(root),
1641 ::view-transition-new(root) {
17- animation-duration: 160ms;
18- animation-timing-function: ease-out;
42+ animation: none;
43+}
44+
45+::view-transition-old(forge-top),
46+::view-transition-old(root) {
47+ display: none;
48+}
49+
50+::view-transition-old(forge-main) {
51+ animation: forge-main-out 90ms ease-in both;
52+}
53+
54+::view-transition-new(forge-main) {
55+ animation: forge-main-in 200ms ease-out both;
56+}
57+
58+@keyframes forge-main-out {
59+ to {
60+ opacity: 0;
61+ }
62+}
63+
64+@keyframes forge-main-in {
65+ from {
66+ opacity: 0;
67+ transform: translateY(6px);
68+ }
1969 }
2070
2171 @media (prefers-reduced-motion: reduce) {
style/_empty.scssmodified+4 -4
@@ -1,11 +1,11 @@
1-// An empty list (views::empty_state): a quiet centred block with the next step under it.
1+// An empty list (views::empty_state): a quiet left-aligned block with the next step under it.
22 .empty-state {
33 display: flex;
44 flex-direction: column;
5- align-items: center;
5+ align-items: flex-start;
66 gap: 6px;
77 padding: 28px 16px;
8- text-align: center;
8+ text-align: left;
99 color: var(--muted);
1010
1111 .empty-state-title {
@@ -23,7 +23,7 @@
2323 .empty-state-action {
2424 display: flex;
2525 flex-wrap: wrap;
26- justify-content: center;
26+ justify-content: flex-start;
2727 gap: 8px;
2828 margin-top: 8px;
2929
style/_fit_code.scssmodified+0 -38
@@ -30,44 +30,6 @@
3030 }
3131 }
3232
33-// Job page: the job card and the artifacts sit in a side column; the log card fills the right side,
34-// and its `pre` is the scroller (nav.js follows its scrollTop), so the log card itself never scrolls.
35-@media (min-width: 900px) {
36- .ci-job-grid.fit-pane {
37- display: grid;
38- grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
39- grid-template-rows: auto minmax(0, 1fr);
40- gap: 16px;
41-
42- > .card:not(.ci-logcard) {
43- align-self: start;
44- min-width: 0;
45- margin: 0;
46- }
47-
48- > .ci-logcard {
49- grid-column: 2;
50- grid-row: 1 / span 2;
51- display: flex;
52- flex-direction: column;
53- min-width: 0;
54- min-height: 0;
55- margin: 0;
56- overflow: hidden;
57-
58- > *:not(.ci-log) {
59- flex: none;
60- }
61-
62- .ci-log {
63- flex: 1 1 auto;
64- min-height: 0;
65- max-height: none;
66- }
67- }
68- }
69-}
70-
7133 // Run page and runs list: the selected run (the right column of the split) is the pane. The runs
7234 // list beside it (.ci-side, main.scss) uses the same height.
7335 @media (min-width: 761px) {
style/_lang_admin.scssadded+90 -0
@@ -0,0 +1,90 @@
1+// Settings and admin pages: the pages behind the site section sidebar (`.shell-site`, see views/mod.rs).
2+// Main takes the window's full width. From 900px its direct children are panes that sit side by side
3+// across the window, and anything that is not a pane (the head, a notice) spans the row. Forms stop at
4+// 720px and stay left aligned. Repo, org and other pages are not affected.
5+
6+// The page's column: main itself, or the `data-live` wrapper that most admin pages put inside it.
7+$page-column: ".shell-site > .shell-body > main, .shell-site > .shell-body > main > [data-live]:not(.srv-page):not(.health-page):not(.user-page):not(.teams-page)";
8+
9+#{$page-column} {
10+ min-width: 0;
11+ max-width: none;
12+}
13+
14+@media (min-width: 900px) {
15+ #{$page-column} {
16+ display: grid;
17+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
18+ align-items: start;
19+ gap: 16px;
20+
21+ > :not(.card) {
22+ grid-column: 1 / -1;
23+ }
24+ }
25+}
26+
27+// Settings pages wrap their sections in one `.settings-layout`; it fills main and takes no max width.
28+.shell-site .settings-layout {
29+ width: 100%;
30+ min-width: 0;
31+ max-width: none;
32+ box-sizing: border-box;
33+}
34+
35+// A form in a pane is a column of its own: 720px at most, left aligned. The mail form keeps its
36+// three-field row.
37+.shell-site main .card > form:not(.inline-form):not([action="/admin/mail"]),
38+.shell-site main .card > form.stack:not([action="/admin/mail"]) {
39+ max-width: 720px;
40+}
41+
42+// Ledes that used to sit under a page's title: a muted line at the top of the page's first pane.
43+.page-lede {
44+ margin: 0 0 12px;
45+ font-size: 13.5px;
46+}
47+
48+// The head's action (Security's link to the log) sits at the right end of the one row.
49+@media (min-width: 900px) {
50+ .page-head > .page-action {
51+ flex: none;
52+ margin: 0;
53+ }
54+}
55+
56+// Server and health pages keep their own grids; their ledes span the row above the panes.
57+.srv-page > .page-lede,
58+.health-page > .page-lede,
59+.health-page > .health-summary {
60+ grid-column: 1 / -1;
61+}
62+
63+// Rows inside a pane are hairlines, not cards in cards: a card nested in a pane drops its own tone and
64+// edge.
65+.shell-site main .card .card {
66+ background: transparent;
67+ box-shadow: none;
68+}
69+
70+// Section headings in a settings or admin pane read as labels (mono, uppercase, muted), not Archivo
71+// titles. Scoped to the settings frame, account settings and the site pages, so repo and org pages keep
72+// their titles. The user page's danger heading keeps its red.
73+.settings-layout .card > h2,
74+.settings-layout .fit-pane > h2,
75+.shell-site main .card > h2,
76+.shell-site main .fit-pane > h2 {
77+ @extend %mono-label;
78+}
79+
80+.shell-site main .user-danger > h2 {
81+ color: var(--danger);
82+}
83+
84+// Panes side by side end at the same height. A card's bottom margin would shorten a stretched pane
85+// by 16px, so the split's and the grids' cards drop it; the grid gap already spaces them.
86+.fit-split > .card,
87+.health-page > .card,
88+.user-page > .card {
89+ margin-bottom: 0;
90+}
style/_lang_browse.scssadded+124 -0
@@ -0,0 +1,124 @@
1+// Page language for the browse pages (file, blame, code search, tree, wiki) and the repo settings.
2+// See the head and pane rules in _language.scss and the design notes in fit.scss.
3+
4+// Repo settings: the sections in a left pane and the page's content in a right pane, both filling the
5+// window below the repo head. The markup is settings_frame (pages/repo_settings.rs). Below 900px the
6+// sections are a row of links above the content, and the content stacks.
7+.settings-layout {
8+ min-width: 0;
9+}
10+
11+.settings-main {
12+ min-width: 0;
13+}
14+
15+@media (min-width: 900px) {
16+ // The repo's frame only: account settings use the same class with the site sidebar around them.
17+ .settings-layout:has(> .settings-nav) {
18+ display: grid;
19+ grid-template-columns: 200px minmax(0, 1fr);
20+ gap: 16px;
21+ height: max(360px, calc(100dvh - var(--pane-top, 288px) - var(--pane-foot, 78px)));
22+ }
23+
24+ // The section list: a pane of links, the current one takes the accent wash.
25+ .settings-layout > .settings-nav {
26+ flex-direction: column;
27+ flex-wrap: nowrap;
28+ align-content: flex-start;
29+ gap: 2px;
30+ min-height: 0;
31+ margin: 0;
32+ padding: 8px;
33+ overflow-y: auto;
34+ background: var(--surface);
35+ border: 1px solid var(--border);
36+ border-radius: var(--radius-lg);
37+
38+ a {
39+ display: flex;
40+ align-items: center;
41+ min-height: 36px;
42+ margin-bottom: 0;
43+ padding: 0 12px;
44+ border-bottom: 0;
45+ border-radius: var(--radius-md);
46+ font-weight: 500;
47+ }
48+
49+ a[aria-current="page"] {
50+ background: var(--accent-soft);
51+ color: var(--accent-ink);
52+ border-bottom: 0;
53+ }
54+ }
55+
56+ // The content pane: its cards stack, and the page's split of cards (or a long list) scrolls inside
57+ // the pane rather than making the page scroll.
58+ .settings-layout > .settings-main {
59+ display: flex;
60+ flex-direction: column;
61+ gap: 16px;
62+ min-height: 0;
63+ overflow-y: auto;
64+ overscroll-behavior: contain;
65+
66+ > .fit-pane {
67+ flex: 1 1 auto;
68+ height: auto;
69+ min-height: 0;
70+ }
71+ }
72+}
73+
74+// Settings forms stand left aligned at a readable width; the split cards keep their own widths.
75+.settings-main form.stack:not(.webhook-form) {
76+ max-width: 720px;
77+}
78+
79+// Tree pages: the repo home's grid without the bottom dock (only the repo home shows the dock), so the
80+// listing and the README fill the window.
81+@media (min-width: 900px) {
82+ .tree-browse {
83+ --repo-home-h: max(360px, calc(100dvh - var(--pane-top, 288px) - var(--pane-foot, 78px)));
84+ }
85+}
86+
87+// Code search: the search form and the results are one pane that fills the window. The results scroll
88+// inside it, and take the full width.
89+@media (min-width: 900px) {
90+ .search-page.fit-pane {
91+ display: flex;
92+ flex-direction: column;
93+ gap: 12px;
94+ overflow: hidden;
95+
96+ > :not(.search-results) {
97+ flex: none;
98+ }
99+
100+ > .search-results {
101+ flex: 1 1 auto;
102+ min-height: 0;
103+ overflow-y: auto;
104+ overscroll-behavior: contain;
105+ }
106+ }
107+}
108+
109+.search-page .search-form,
110+.search-page .search-results {
111+ width: 100%;
112+ max-width: none;
113+}
114+
115+// Wiki: an empty list or page is left aligned in its pane, with the next step under the message.
116+.wiki-page .empty-state {
117+ align-items: flex-start;
118+ padding: 0;
119+ text-align: left;
120+
121+ .empty-state-action {
122+ justify-content: flex-start;
123+ }
124+}
style/_lang_ci.scssadded+85 -0
@@ -0,0 +1,85 @@
1+// The CI list and the job page in the page language (LANGUAGE.md): both fill the window under the head,
2+// each pane scrolls inside itself, and nothing is a centred column. Imported last, so it wins over the
3+// older split and job rules in main.scss and _fit_code.scss.
4+
5+// The timeline is drawn in 640 units: past this width its text would grow with the pane.
6+.ci-gantt {
7+ max-width: 800px;
8+ overflow: visible;
9+}
10+
11+// The runs list (about 380px) and the selected run fill the window down to the footer.
12+@media (min-width: 900px) {
13+ .ci-split.fit-pane {
14+ grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
15+ align-items: stretch;
16+ gap: 12px;
17+ padding: 0;
18+ overflow: hidden;
19+ }
20+
21+ .ci-split > .ci-side,
22+ .ci-split > .ci-main {
23+ position: static;
24+ min-height: 0;
25+ max-height: none;
26+ margin: 0;
27+ }
28+
29+ .ci-split > .ci-side {
30+ display: flex;
31+ flex-direction: column;
32+ overflow: hidden;
33+ }
34+
35+ // One row of controls: the count, Run workflow and Status badge stay on one line.
36+ .ci-split > .ci-side .ci-side-head,
37+ .ci-split > .ci-side .ci-tools {
38+ flex-wrap: nowrap;
39+ }
40+
41+ .ci-split > .ci-side .ci-run-list {
42+ flex: 1 1 auto;
43+ min-height: 0;
44+ overflow-y: auto;
45+ overscroll-behavior: contain;
46+ }
47+
48+ .ci-split > .ci-main {
49+ overflow-y: auto;
50+ overscroll-behavior: contain;
51+ }
52+}
53+
54+// Between phone and desktop the panes stack, as the rest of the site does.
55+@media (max-width: 899px) {
56+ .ci-split {
57+ grid-template-columns: minmax(0, 1fr);
58+ }
59+}
60+
61+// The detail's empty state reads from the left, inside its pane.
62+.ci-split .empty-state {
63+ align-items: flex-start;
64+ padding: 16px 0;
65+ text-align: left;
66+
67+ .empty-state-hint {
68+ max-width: none;
69+ }
70+}
71+
72+// The job page: the head and the log fill the window, the log pane takes the rest.
73+@media (min-width: 900px) {
74+ .ci-job.fit-pane {
75+ display: flex;
76+ flex-direction: column;
77+ gap: 12px;
78+ padding: 0;
79+ overflow: hidden;
80+ }
81+
82+ .ci-job .ci-tl-no a {
83+ color: inherit;
84+ }
85+}
style/_lang_issues.scssadded+274 -0
@@ -0,0 +1,274 @@
1+// Issues, pull requests and discussions in the page language (style/_language.scss, LANGUAGE.md).
2+// Lists are one pane: a toolbar row, then hairline rows with the metadata at the right end. Issue,
3+// pull and discussion pages are a conversation pane and a 300px sidebar pane, each scrolling inside
4+// itself. Forms are 720px and left aligned. Markup: `.issue-pane` wraps a list page's body.
5+
6+// Lists: one pane that fills the window. The toolbar stays at the top, the rows scroll under it,
7+// and the pager stays at the foot.
8+@media (min-width: 900px) {
9+ .issue-pane.fit-pane {
10+ display: flex;
11+ flex-direction: column;
12+ margin: 0;
13+ padding: 0;
14+ overflow: hidden;
15+ border: 1px solid var(--border);
16+ border-radius: var(--radius-lg);
17+ background: var(--surface);
18+
19+ > .issue-toolbar,
20+ > .pinned-issues,
21+ > .pager {
22+ flex: none;
23+ }
24+
25+ > .issue-list,
26+ > .commit-list,
27+ > .issue-timeline {
28+ flex: 1 1 auto;
29+ min-height: 0;
30+ overflow: auto;
31+ overscroll-behavior: contain;
32+ }
33+
34+ > .issue-list {
35+ border: 0;
36+ border-radius: 0;
37+ background: none;
38+ }
39+ }
40+}
41+
42+// Toolbar: tabs, search and filters, and the buttons on one row.
43+.issue-pane > .issue-toolbar {
44+ display: flex;
45+ flex-wrap: wrap;
46+ align-items: center;
47+ gap: 8px 12px;
48+ margin: 0;
49+ padding: 10px 14px;
50+ border-bottom: 1px solid var(--border);
51+
52+ > .issue-tabs {
53+ flex: none;
54+ gap: 2px;
55+
56+ a {
57+ padding: 4px 10px;
58+ }
59+ }
60+
61+ > .issue-search {
62+ flex: 1 1 16rem;
63+ min-width: 0;
64+ margin: 0;
65+ flex-wrap: nowrap;
66+
67+ input[type="search"] {
68+ flex: 1 1 10rem;
69+ min-width: 8rem;
70+ max-width: none;
71+ height: 32px;
72+ }
73+
74+ select,
75+ button {
76+ height: 32px;
77+ padding: 0 10px;
78+ font-size: 13px;
79+ }
80+ }
81+
82+ > .issue-tools {
83+ display: flex;
84+ flex: none;
85+ align-items: center;
86+ gap: 8px;
87+
88+ nav {
89+ display: flex;
90+ gap: 8px;
91+ }
92+
93+ .button {
94+ height: 32px;
95+ padding: 0 12px;
96+ font-size: 13px;
97+ line-height: 30px;
98+ box-sizing: border-box;
99+ }
100+ }
101+}
102+
103+.issue-pane > .pinned-issues {
104+ margin: 0;
105+ padding: 10px 14px;
106+ border-bottom: 1px solid var(--border);
107+}
108+
109+// Rows: a hairline between them, the title and metadata on the left, the assignees and the
110+// comment count right aligned at the far end of the row.
111+.issue-pane .issue-list .issue-row {
112+ display: grid;
113+ grid-template-columns: 14px minmax(0, 1fr) minmax(7rem, auto);
114+ align-items: center;
115+ gap: 12px;
116+ padding: 10px 14px;
117+ border-top: 1px solid var(--border);
118+
119+ > .issue-state {
120+ grid-column: 1;
121+ margin: 0;
122+ align-self: center;
123+ }
124+
125+ > .issue-main {
126+ grid-column: 2;
127+ min-width: 0;
128+ }
129+
130+ > .issue-aside {
131+ grid-column: 3;
132+ justify-content: flex-end;
133+ min-width: 0;
134+ }
135+
136+ // A row without a state dot (discussions, the template chooser): two columns.
137+ &:not(:has(> .issue-state)) {
138+ grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
139+
140+ > .issue-main {
141+ grid-column: 1;
142+ }
143+
144+ > .issue-aside {
145+ grid-column: 2;
146+ }
147+ }
148+}
149+
150+.issue-pane .issue-list .issue-row:first-child {
151+ border-top: 0;
152+}
153+
154+.issue-pane .issue-row .issue-meta {
155+ margin-top: 2px;
156+}
157+
158+.issue-pane .issue-row .issue-title-line {
159+ gap: 6px;
160+}
161+
162+.issue-pane > .pager {
163+ margin: 0;
164+ padding: 8px 14px;
165+ border-top: 1px solid var(--border);
166+}
167+
168+// Issue, pull request and discussion pages: the title in one line, then state and meta on one line.
169+.issue-heading {
170+ overflow: hidden;
171+ margin: 0;
172+ font-size: 20px;
173+ line-height: 1.25;
174+ white-space: nowrap;
175+ text-overflow: ellipsis;
176+}
177+
178+.issue-head {
179+ margin-bottom: 0;
180+}
181+
182+.issue-byline {
183+ margin: 4px 0 0;
184+ font-size: 13px;
185+ line-height: 1.4;
186+}
187+
188+@media (min-width: 900px) {
189+ // The conversation is the left pane, the sidebar a 300px right pane. Both scroll inside.
190+ .issue-layout {
191+ grid-template-columns: minmax(0, 1fr) 300px;
192+ gap: 16px;
193+ height: max(360px, calc(100dvh - var(--pane-top, 288px) - var(--pane-foot, 78px)));
194+ }
195+
196+ .issue-layout > .issue-column.fit-pane,
197+ .issue-layout > .issue-sidebar.fit-pane {
198+ height: 100%;
199+ margin: 0;
200+ padding: 12px;
201+ border: 1px solid var(--border);
202+ border-radius: var(--radius-lg);
203+ background: var(--surface);
204+ }
205+
206+ .issue-layout > .issue-column.fit-pane {
207+ gap: 12px;
208+ }
209+
210+ // Sidebar: the sections stack with a hairline, so the labels and assignees fit one screen.
211+ .issue-layout > .issue-sidebar.fit-pane {
212+ gap: 0;
213+
214+ > .issue-side-section:last-child {
215+ border-bottom: 0;
216+ }
217+ }
218+}
219+
220+// Label checklist: compact chips in a wrapping row instead of one tall list.
221+.issue-side-section form.stack:has(> .issue-check) {
222+ display: flex;
223+ flex-direction: row;
224+ flex-wrap: wrap;
225+ align-items: center;
226+ justify-content: flex-start;
227+ gap: 6px;
228+
229+ > * {
230+ grid-column: auto;
231+ }
232+
233+ > .issue-check {
234+ display: inline-flex;
235+ align-items: center;
236+ gap: 4px;
237+ height: 26px;
238+ margin: 0;
239+ padding: 0 8px 0 6px;
240+ border: 1px solid var(--border);
241+ border-radius: var(--radius-full);
242+ font-size: 12px;
243+ white-space: nowrap;
244+
245+ .label-chip {
246+ padding: 0 4px;
247+ font-size: 12px;
248+ }
249+ }
250+
251+ > div {
252+ flex: 1 0 100%;
253+ }
254+}
255+
256+.issue-side-section .issue-chips {
257+ display: flex;
258+ flex-wrap: wrap;
259+ gap: 6px;
260+}
261+
262+// Forms: 720px, left aligned. They do not stretch across a wide window.
263+.issue-new,
264+.issue-edit.card {
265+ max-width: 720px;
266+}
267+
268+// Comment history: the versions scroll inside their pane.
269+.issue-timeline.fit-pane {
270+ padding: 12px;
271+ border: 1px solid var(--border);
272+ border-radius: var(--radius-lg);
273+ background: var(--surface);
274+}
style/_lang_lists.scssadded+181 -0
@@ -0,0 +1,181 @@
1+// Page language for the repo list and form pages: commits, branches, tags, releases, compare, labels,
2+// milestones, merge queue and security. See _language.scss and LANGUAGE.md. Markup keeps its strings and
3+// the classes tests read; this file gives the wrappers their one-screen shape. Headings are styled by
4+// selector because tests read them as plain h2 elements.
5+
6+// A list pane: one surface pane that fills the window. Its toolbar row stays at the top, its rows
7+// scroll inside `.list-scroll`, and the pager or a footnote sits at its foot. Below 900px it is as tall
8+// as its content.
9+@media (min-width: 900px) {
10+ .lang-list.fit-pane {
11+ display: flex;
12+ flex-direction: column;
13+ overflow: hidden;
14+ margin-bottom: 0;
15+ padding: 0;
16+ background: var(--surface);
17+ border-radius: var(--radius-lg);
18+ box-shadow: inset 0 0 0 1px var(--border);
19+ }
20+}
21+
22+.lang-list {
23+ > .list-bar {
24+ flex: none;
25+ display: flex;
26+ flex-wrap: wrap;
27+ align-items: center;
28+ gap: 8px 16px;
29+ min-height: 44px;
30+ padding: 8px 16px;
31+ border-bottom: 1px solid var(--border);
32+
33+ > h2 {
34+ @extend %mono-label;
35+ margin: 0;
36+ }
37+
38+ > p {
39+ margin: 0;
40+ }
41+ }
42+
43+ > .list-scroll,
44+ > .fit-scroll {
45+ flex: 1 1 auto;
46+ min-height: 0;
47+ padding: 0 16px;
48+ overflow: auto;
49+ overscroll-behavior: contain;
50+
51+ > .table-wrap {
52+ margin: 0;
53+ }
54+ }
55+
56+ > .pager,
57+ > .list-foot {
58+ flex: none;
59+ margin: 0;
60+ padding: 8px 16px;
61+ border-top: 1px solid var(--border);
62+ }
63+
64+ > .list-foot {
65+ margin: 0;
66+ }
67+}
68+
69+// Commits and compare lists keep their own cap only where they are not a pane.
70+.lang-list .compare-commits {
71+ max-height: none;
72+}
73+
74+// The branches create form opens under the toolbar, right aligned when closed.
75+.lang-list > .list-bar > .new-branch {
76+ margin: 0 0 0 auto;
77+}
78+
79+.lang-list > .list-bar > .new-branch[open] {
80+ flex-basis: 100%;
81+ margin-left: 0;
82+}
83+
84+// Releases: the toolbar holds the heading and the new button, cards stack with hairlines.
85+.lang-list > .release-list-head {
86+ justify-content: space-between;
87+}
88+
89+// Forms sit left aligned at 720px, never in a centred page column.
90+.lang-form {
91+ max-width: 720px;
92+
93+ > h2 {
94+ @extend %mono-label;
95+ margin: 0 0 12px;
96+ }
97+}
98+
99+// The release form was 960px wide; forms are 720px, left aligned.
100+.release-form {
101+ max-width: 720px;
102+}
103+
104+// Two panes side by side from 900px: a main pane and a side pane (380px). A list first when the
105+// left pane is a list. A lone pane takes the whole row.
106+.lang-split {
107+ display: grid;
108+ gap: 16px;
109+ align-items: stretch;
110+
111+ > * {
112+ min-width: 0;
113+ }
114+}
115+
116+.lang-pane {
117+ padding: 16px;
118+ background: var(--surface);
119+ border-radius: var(--radius-lg);
120+ box-shadow: inset 0 0 0 1px var(--border);
121+
122+ > h2 {
123+ @extend %mono-label;
124+ margin: 0 0 12px;
125+ }
126+
127+ // A second section in the same pane (edit page: assets, then delete) gets room above it.
128+ > h2:not(:first-child) {
129+ margin-top: 24px;
130+ }
131+}
132+
133+// The create form beside a list: a section heading in the same label style.
134+.lang-side > h2 {
135+ @extend %mono-label;
136+ margin: 0 0 12px;
137+}
138+
139+@media (min-width: 900px) {
140+ .lang-split {
141+ grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
142+ }
143+
144+ .lang-split.is-list {
145+ grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
146+ }
147+
148+ .lang-split > .lang-pane.fit-pane,
149+ .lang-split > .lang-list.fit-pane {
150+ height: max(360px, calc(100dvh - var(--pane-top, 288px) - var(--pane-foot, 78px)));
151+ }
152+
153+ .lang-split > .lang-pane:only-child {
154+ grid-column: 1 / -1;
155+ }
156+}
157+
158+// Compare: the detail pane holds the open-request form and the diff, and scrolls inside itself.
159+.compare-open {
160+ max-width: 720px;
161+ margin-bottom: 16px;
162+
163+ > h2 {
164+ @extend %mono-label;
165+ margin: 0 0 12px;
166+ }
167+}
168+
169+// Security: the toolbar holds the heading and the counts; the alerts table scrolls below it.
170+.lang-list > .list-bar > .muted {
171+ margin: 0;
172+}
173+
174+// Branches table and tags table fill the pane width; the action column sits at the right.
175+.lang-list .branch-table {
176+ width: 100%;
177+}
178+
179+.lang-list .branch-actions {
180+ text-align: right;
181+}
style/_lang_people.scssadded+152 -0
@@ -0,0 +1,152 @@
1+// Page language for the profile, organization, list and form pages (memory design/LANGUAGE.md).
2+// Imported after _language.scss. Tokens only, so both themes follow main.scss.
3+
4+// Forms are left aligned at 720px: no page column is centred, and the help sits beside the form.
5+.newrepo-form {
6+ max-width: 720px;
7+}
8+
9+.newrepo-head {
10+ text-align: left;
11+}
12+
13+// The import pages' tab strip and cards run to the width of the page, not 960px.
14+.import-tabs,
15+.import-tabs + .alert,
16+.import-recent,
17+.import-job,
18+.export-page {
19+ max-width: none;
20+}
21+
22+// New organization: the form is left aligned at 720px, not a centred 440px card.
23+.org-new {
24+ max-width: 720px;
25+}
26+
27+// Organization pages: the name and the description share the head row.
28+.org-head .org-head-text {
29+ display: flex;
30+ flex-wrap: wrap;
31+ align-items: baseline;
32+ gap: 4px 16px;
33+
34+ p {
35+ margin: 0;
36+ }
37+}
38+
39+// A list page's pane: one surface, the rows full width, hairlines between them.
40+.list-pane {
41+ padding: 4px 16px;
42+}
43+
44+// The head's side note (Explore's intro): a small line at the right, out of the h1's row flow.
45+@media (min-width: 900px) {
46+ .page-head > .page-note {
47+ flex: 0 1 auto;
48+ margin: 0 0 0 auto;
49+ text-align: right;
50+ }
51+}
52+
53+// Home: the name, the tagline and the buttons share the head row.
54+.home-head .actions {
55+ margin: 0;
56+}
57+
58+// Needs you: sections are columns on a wide window. One section takes the whole width.
59+@media (min-width: 900px) {
60+ .needs-grid {
61+ grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
62+ }
63+}
64+
65+// Review requests: wide rows with the metadata at the right, not stacked under the title.
66+@media (min-width: 900px) {
67+ .review-request-list li {
68+ display: grid;
69+ grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) minmax(0, 12rem) 9rem;
70+ align-items: center;
71+ gap: 0 16px;
72+ padding: 10px 0;
73+ border-bottom: 1px solid var(--border);
74+
75+ &:last-child {
76+ border-bottom: 0;
77+ }
78+ }
79+}
80+
81+// Profile: a left pane (avatar, name, bio, local time, buttons) about 300px wide, and a right pane
82+// with the tabs and the content, which takes the rest of the width. Below 900px the page stacks.
83+@media (min-width: 900px) {
84+ .profile-page {
85+ position: relative;
86+ min-height: 340px;
87+ padding-left: 324px;
88+
89+ > * {
90+ min-width: 0;
91+ }
92+
93+ > * + *,
94+ > .profile-overview > * + * {
95+ margin-top: 16px;
96+ }
97+
98+ > :nth-child(2) {
99+ margin-top: 0;
100+ }
101+
102+ > .profile-head {
103+ position: absolute;
104+ top: 0;
105+ left: 0;
106+ box-sizing: border-box;
107+ width: 300px;
108+ flex-direction: column;
109+ align-items: flex-start;
110+ flex-wrap: nowrap;
111+ gap: 12px;
112+ padding: 20px;
113+ background: var(--surface);
114+ border: 1px solid var(--border);
115+ border-radius: var(--radius-lg);
116+ }
117+
118+ .profile-head .profile-about {
119+ padding: 0;
120+ background: none;
121+ border: 0;
122+ }
123+
124+ .profile-head .profile-avatar {
125+ width: 160px;
126+ height: 160px;
127+ }
128+
129+ .profile-head .profile-org-actions {
130+ margin-top: 0;
131+ }
132+ }
133+}
134+
135+// The profile's tab row sits where every other page's head row sits.
136+@media (min-width: 900px) {
137+ .profile-page > .profile-tabs,
138+ .profile-page > nav {
139+ margin-top: -8px;
140+ }
141+}
142+
143+// Profile section titles are labels, like every section under a head.
144+.profile-section-head h2 {
145+ margin: 0;
146+ color: var(--muted);
147+ font-family: var(--mono);
148+ font-size: 12px;
149+ font-weight: 500;
150+ letter-spacing: 0.08em;
151+ text-transform: uppercase;
152+}
style/_language.scssadded+16 -0
@@ -0,0 +1,16 @@
1+// The page language shared by every page (see the head rules): one head row of one height with one
2+// rule under it, so nothing jumps between pages. Imported after the page partials.
3+@media (min-width: 900px) {
4+ .page-head {
5+ align-items: center;
6+ min-height: 40px;
7+ margin-bottom: 16px;
8+ border-bottom: 1px solid var(--border);
9+
10+ h1 {
11+ margin: 0;
12+ font-size: 20px;
13+ line-height: 1.2;
14+ }
15+ }
16+}
style/_look.scssmodified+0 -1
@@ -22,7 +22,6 @@ h1 {
2222
2323 .repo-title,
2424 .issue-heading,
25-.ci-run-title,
2625 .import-job-title {
2726 font-family: var(--display);
2827 font-weight: 700;
style/_pull.scssmodified+5 -0
@@ -461,6 +461,11 @@
461461 font-size: 13.5px;
462462 }
463463
464+// Inside a pane the pane scrolls, not the page, so the header sticks to the pane's own top edge.
465+.fit-pane .diff-file-header {
466+ top: 0;
467+}
468+
464469 // Path on the left; status and counts grouped on the right.
465470 .diff-path {
466471 min-width: 0;
style/_repo.scssmodified+2 -5
@@ -263,10 +263,6 @@
263263
264264 // The repo home takes the whole width of the page column instead of the 1280px other pages keep:
265265 // the README gets the room the tree column leaves.
266-.shell-body > main:has(.repo-home) {
267- max-width: none;
268-}
269-
270266 .repo-home {
271267 // The grid fills the window below the repo header and above the footer, so the page does not
272268 // scroll; each column scrolls on its own. nav.js measures both ends (syncShellTop).
@@ -361,7 +357,8 @@
361357
362358 // Lines stay a readable length however wide the column gets; the scroll area keeps the width.
363359 .markdown-body > * {
364- max-width: 900px;
360+ max-width: 860px;
361+ margin-inline: auto;
365362 }
366363 }
367364
style/_shell.scssmodified+3 -4
@@ -1089,9 +1089,8 @@ button.corner-link.link-button {
10891089 box-sizing: border-box;
10901090 width: 100%;
10911091 min-width: 0;
1092- max-width: 1280px;
1093- margin: 0 auto;
1094- padding: 24px 16px 24px;
1092+ margin: 0;
1093+ padding: 20px 16px 24px;
10951094 }
10961095
10971096 .site-footer {
@@ -1171,7 +1170,7 @@ body[data-signed-in] .shell:not(:has(> .shell-sidebar)) .site-footer {
11711170
11721171 @media (min-width: 700px) {
11731172 .shell-body > main {
1174- padding: 28px 28px 24px;
1173+ padding: 20px 28px 24px;
11751174 }
11761175
11771176 .site-footer {
style/_timeline.scssmodified+63 -45
@@ -2,7 +2,7 @@
22 // history strip itself. The dock is always shown under the panes; the panes give it room.
33
44 :root {
5- --dock-h: 150px;
5+ --dock-h: 52px;
66 }
77
88 // The panes fill the window above the dock: the dock's height comes off the pane height that
@@ -94,26 +94,44 @@ body:has(.repo-home) .site-footer {
9494 }
9595 }
9696
97-// The search entry stays on one line beside Go to file.
97+// Search code is in the palette and the path bar's search; the toolbar keeps the branch, Go to file
98+// and Clone.
9899 .repo-home .repo-search-link {
99- flex: none;
100- white-space: nowrap;
100+ display: none;
101+}
102+
103+// The tree column is name and age; the commit subject column comes back when the pane is dragged
104+// wide enough to read it.
105+.repo-home .repo-main {
106+ container-type: inline-size;
107+}
108+
109+@container (max-width: 639px) {
110+ .tree-table th:nth-child(2),
111+ .tree-table .tree-commit {
112+ display: none;
113+ }
114+}
115+
116+// The README pane has one header row: its file name, with the licence, size and top language laid
117+// over the right end of that row.
118+.repo-readme {
119+ position: relative;
101120 }
102121
103-// The README pane's header: the licence, size and top language at the right end.
104122 .readme-head {
123+ position: absolute;
124+ top: 0;
125+ right: 0;
126+ z-index: 1;
105127 display: flex;
106- justify-content: flex-end;
107128 align-items: center;
108- flex: none;
109- min-height: 36px;
129+ height: 36px;
110130 padding: 0 14px;
111- border-bottom: 1px solid var(--border);
112131 font-family: var(--mono);
113132 font-size: 12px;
114133 color: var(--muted);
115134 white-space: nowrap;
116- overflow: hidden;
117135 }
118136
119137 // The tree pane's latest commit: one line, the subject first, then the short sha and the age.
@@ -136,20 +154,27 @@ body:has(.repo-home) .site-footer {
136154 display: none;
137155 }
138156
157+ // Only the avatar: the column has no room for the name beside the subject.
139158 .latest-author {
140- max-width: 9rem;
141- overflow: hidden;
142- white-space: nowrap;
159+ flex: none;
160+
161+ > a,
162+ > span:not(.avatar) {
163+ display: none;
164+ }
143165 }
144166 }
145167
168+// One thin row at the foot of the page: the newest CI run at the left, clear of the floating profile
169+// panel, then the commit strip, then the commit count and All runs.
146170 .repo-dock {
147171 display: flex;
148- flex-direction: column;
149- gap: 12px;
172+ align-items: center;
173+ gap: 16px;
174+ box-sizing: border-box;
150175 height: var(--dock-h);
151176 margin-top: 12px;
152- padding: 14px 16px;
177+ padding: 0 16px 0 260px;
153178 min-width: 0;
154179 overflow: hidden;
155180 background: var(--surface);
@@ -158,25 +183,13 @@ body:has(.repo-home) .site-footer {
158183 font-size: 13px;
159184 }
160185
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.
186+// The CI words: the run's dot, number, state and sha, then the strip, then the count and All runs.
163187 .dock-info {
164- display: flex;
165- align-items: center;
166- gap: 10px;
167- min-width: 0;
168- height: 28px;
169- white-space: nowrap;
188+ display: contents;
170189
171190 > * {
172191 flex: none;
173- }
174-
175- .dock-subject {
176- flex: 1 1 auto;
177- min-width: 0;
178- overflow: hidden;
179- text-overflow: ellipsis;
192+ white-space: nowrap;
180193 }
181194
182195 .dock-run {
@@ -192,40 +205,45 @@ body:has(.repo-home) .site-footer {
192205 color: var(--text-2);
193206 }
194207
208+ .dock-count,
209+ .dock-all {
210+ order: 2;
211+ }
212+
195213 .dock-all {
196214 font-weight: 600;
197215 color: var(--text);
198216 }
199217 }
200218
201-// The strip: the label in the left 254px column, which the floating profile panel covers by
202-// default, then the bars.
219+// The strip takes the rest of the row; its label is for screen readers.
203220 .dock-history {
221+ order: 1;
204222 display: flex;
205- flex: 1 1 auto;
206- min-height: 0;
223+ flex: 1 1 0;
224+ align-items: flex-end;
225+ min-width: 0;
226+ height: 100%;
207227 }
208228
209229 .history-strip {
210- display: grid;
211- grid-template-columns: 254px minmax(0, 1fr);
212- column-gap: 16px;
213- align-items: start;
230+ flex: 1 1 auto;
214231 min-width: 0;
215- width: 100%;
216- min-height: 0;
217232 }
218233
219234 .history-label {
220- margin: 0;
221- padding-top: 2px;
235+ position: absolute;
236+ width: 1px;
237+ height: 1px;
238+ overflow: hidden;
239+ clip-path: inset(50%);
222240 }
223241
224242 .history-bars {
225243 display: flex;
226244 align-items: flex-end;
227- gap: 3px;
228- height: 80px;
245+ gap: 2px;
246+ height: 28px;
229247 min-width: 0;
230248 overflow: hidden;
231249
style/_timeline_ci.scssmodified+2 -11
@@ -307,23 +307,14 @@
307307 overscroll-behavior: contain;
308308 }
309309
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-
310+// The dock is the repo page's `.repo-dock` pane (_timeline.scss), without its CI words: the run page
311+// already says that.
316312 @media (min-width: 900px) {
317313 .ci-run .repo-dock {
318314 margin-top: 0;
319315 }
320316 }
321317
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-
327318 // Phone and narrow windows: the panes stack and the page grows, as the rest of the site does.
328319 @media (max-width: 899px) {
329320 .ci-tl-main {
style/main.scssmodified+7 -8
@@ -6370,14 +6370,6 @@ button.ci-stopping {
63706370 color: var(--muted);
63716371 }
63726372
6373-.ci-run-title {
6374- margin: 0 0 8px;
6375- font-size: 1.25rem;
6376- font-weight: 600;
6377- letter-spacing: -0.01em;
6378- overflow-wrap: anywhere;
6379-}
6380-
63816373 .ci-run-top {
63826374 display: flex;
63836375 flex-wrap: wrap;
@@ -8068,3 +8060,10 @@ button.ci-job-last {
80688060 // Last on purpose: the look pass (Archivo titles, mono labels, tone depth, page wash) restyles
80698061 // shared classes above it.
80708062 @import "look";
8063+@import "language";
8064+@import "lang_browse";
8065+@import "lang_people";
8066+@import "lang_issues";
8067+@import "lang_ci";
8068+@import "lang_admin";
8069+@import "lang_lists";