forge
Explore
Log in

Don't you dare go Hollow

Admin server settings are one line a setting (name, control, notes) on eleven short pages that each fit the screen, with Restart server in the head

Browse files at this commit

41ee476e8b139791f96c0d623a9e02b8dfd7b76eAhmet Kaan GümüşParent: fd174b4
All checks have passed
Show checks
  • style
    • admin server settings are one line a setting (name, control, notes) on eleven short pages that each fit the screen, with Restart server in the head
    • tabs and rails no longer shift when you pick another, since the current one keeps its neighbours' weight
    • CI draws passed in green, failed in red and running in the accent everywhere: run and job ticks, step strips, state pills, a runner's jobs, the head's run dots and the commit history bars
    • the history caption says what height and colour mean
    • selects are 280px like every field, with the chevron at their end
    • Appearance's background chips show each base's tint, and both colour rows put their sliders and hex on one edge
    • the top bar's avatar, wordmark, path and Ctrl K share one middle line, and Log out lines up with the menu's other rows
    • repo settings is one rail list with no second row of tabs
    • the file view has one switch for Rendered, Source and Blame, the same on every view, before its actions
    • the branch picker is the standard small pill and the files rail starts on the sheet's edge
    • Health puts its verdict in the head and Storage beside Services so it fits the screen
    • the branch rule form uses the field kit with each note beside its box
    • a comment's reactions, Edit and Delete share one row
    • every pager is one row of Newer, the page and Older on the sheet's inset 🐛 fix: a runner's log is as tall as the window instead of a 16px strip
    • the run timeline's chart shows again, at the page's text size, and a job's last line starts on the left
    • a running run's title names the step that is running, not one that failed
    • a closed confirm no longer leaves an empty gap in a row of actions
    • the passed state pill is green instead of the accent
    • admin user search says it covers organizations too
Show full message
💄 style: admin server settings are one line a setting (name, control, notes) on eleven short pages that each fit the screen, with Restart server in the head; tabs and rails no longer shift when you pick another, since the current one keeps its neighbours' weight; CI draws passed in green, failed in red and running in the accent everywhere: run and job ticks, step strips, state pills, a runner's jobs, the head's run dots and the commit history bars; the history caption says what height and colour mean; selects are 280px like every field, with the chevron at their end; Appearance's background chips show each base's tint, and both colour rows put their sliders and hex on one edge; the top bar's avatar, wordmark, path and Ctrl K share one middle line, and Log out lines up with the menu's other rows; repo settings is one rail list with no second row of tabs; the file view has one switch for Rendered, Source and Blame, the same on every view, before its actions; the branch picker is the standard small pill and the files rail starts on the sheet's edge; Health puts its verdict in the head and Storage beside Services so it fits the screen; the branch rule form uses the field kit with each note beside its box; a comment's reactions, Edit and Delete share one row; every pager is one row of Newer, the page and Older on the sheet's inset 🐛 fix: a runner's log is as tall as the window instead of a 16px strip; the run timeline's chart shows again, at the page's text size, and a job's last line starts on the left; a running run's title names the step that is running, not one that failed; a closed confirm no longer leaves an empty gap in a row of actions; the passed state pill is green instead of the accent; admin user search says it covers organizations too
crates/forge-web-base/src/i18n/repo_admin.rsmodified+4 -4
@@ -174,10 +174,10 @@ pub fn t(lang: Lang, key: K) -> &'static str {
174174 (AlreadyOwner, En) => "The repository already belongs to that user.",
175175 (AlreadyOwner, Tr) => "Depo zaten bu kullanıcıya ait.",
176176 (ApprovalsHelp, En) => {
177- "Approvals count only from reviewers with Write access or higher, using each reviewer's latest review."
177+ "How many a pull needs, 0 to 20. They count only from reviewers with Write access or higher, using each reviewer's latest review."
178178 }
179179 (ApprovalsHelp, Tr) => {
180- "Onaylar yalnızca yazma veya daha yüksek erişimi olan inceleyicilerden, her inceleyicinin en son incelemesine göre sayılır."
180+ "Bir çekme isteğinin gereken onay sayısı, 0 ile 20 arası. Onaylar yalnızca yazma veya daha yüksek erişimi olan inceleyicilerden, her inceleyicinin en son incelemesine göre sayılır."
181181 }
182182 (ApprovalsRange, En) => "required approvals must be a whole number from 0 to 20",
183183 (ApprovalsRange, Tr) => "Gerekli onay sayısı 0 ile 20 arasında bir tam sayı olmalıdır.",
@@ -403,8 +403,8 @@ pub fn t(lang: Lang, key: K) -> &'static str {
403403 (RequireUpToDate, Tr) => {
404404 "Çekme isteğinin kaynak dalı, hedef dalın en son hâlini içermelidir"
405405 }
406- (RequiredApprovals, En) => "Required approvals (0 to 20)",
407- (RequiredApprovals, Tr) => "Gerekli onay sayısı (0 ile 20 arası)",
406+ (RequiredApprovals, En) => "Approvals",
407+ (RequiredApprovals, Tr) => "Onaylar",
408408 (RestrictPushDesc, En) => "Direct pushes are limited to repo admins.",
409409 (RestrictPushTitle, En) => "Only accept changes through pull requests",
410410 (Role, En) => "Role",
crates/forge-web/build.rsmodified+29 -4
@@ -122,9 +122,34 @@ fn base_rules(css: &mut String, base: &Base) {
122122 );
123123 }
124124
125+/// A base's tint made plain enough to see on a chip: the hue of its muted text, with its
126+/// saturation raised five times (at most 55%) at a middle lightness. The neutrals themselves are
127+/// too close to grey to tell apart at 30px.
128+fn base_tint(hex: &str) -> String {
129+ let channel = |i: usize| u8::from_str_radix(&hex[i..i + 2], 16).unwrap_or(0) as f64 / 255.0;
130+ let (r, g, b) = (channel(1), channel(3), channel(5));
131+ let (max, min) = (r.max(g).max(b), r.min(g).min(b));
132+ let l = (max + min) / 2.0;
133+ let d = max - min;
134+ let (h, s) = if d == 0.0 {
135+ (0.0, 0.0)
136+ } else {
137+ let s = d / (1.0 - (2.0 * l - 1.0).abs());
138+ let h = if max == r {
139+ ((g - b) / d).rem_euclid(6.0)
140+ } else if max == g {
141+ (b - r) / d + 2.0
142+ } else {
143+ (r - g) / d + 4.0
144+ };
145+ (h * 60.0, s)
146+ };
147+ format!("hsl({:.0} {:.0}% 52%)", h, (s * 5.0).min(0.55) * 100.0)
148+}
149+
125150 /// The swatch chips for the settings picker. They show fixed colours, so they do not depend on
126-/// the current theme: an accent chip is the accent itself, a base chip is its background and text
127-/// split diagonally.
151+/// the current theme: an accent chip is the accent itself, a base chip is its background and its
152+/// tint split diagonally.
128153 fn swatch_rules(css: &mut String) {
129154 for palette in PALETTES {
130155 css.push_str(&format!(
@@ -139,11 +164,11 @@ fn swatch_rules(css: &mut String) {
139164 for base in BASES {
140165 css.push_str(&format!(
141166 ".base-swatch[data-base-light-swatch=\"{}\"] {{ background: linear-gradient(135deg, {} 0 50%, {} 50% 100%); }}\n",
142- base.id, base.light.bg, base.light.text
167+ base.id, base.light.bg, base_tint(base.light.muted)
143168 ));
144169 css.push_str(&format!(
145170 ".base-swatch[data-base-dark-swatch=\"{}\"] {{ background: linear-gradient(135deg, {} 0 50%, {} 50% 100%); }}\n",
146- base.id, base.dark.bg, base.dark.text
171+ base.id, base.dark.bg, base_tint(base.dark.muted)
147172 ));
148173 }
149174 }
crates/forge-web/src/pages/admin_health.rsmodified+20 -13
@@ -496,19 +496,24 @@ async fn health_view(
496496 } = health;
497497 // An active alert needs attention as much as a failing service does.
498498 let attention = attention + count;
499- let summary_dot = if attention > 0 { Dot::Bad } else { Dot::Ok };
499+ // The verdict leads the head's line, with its dot, so the page says how things are first.
500500 let summary = if attention > 0 {
501- needs_attention(lang, attention)
501+ SubPart {
502+ text: needs_attention(lang, attention),
503+ href: None,
504+ class: "b health-sum bad",
505+ }
502506 } else {
503- at(lang, A::Fine).to_owned()
507+ SubPart {
508+ text: at(lang, A::Fine).to_owned(),
509+ href: None,
510+ class: "b health-sum ok",
511+ }
504512 };
513+ let sub = vec![summary, SubPart::text(at(lang, A::HealthIntro))];
505514 Ok(view! {
506- head(title: at(lang, A::Health), sub: vec![SubPart::text(at(lang, A::HealthIntro))], live: Some("/admin/health/events"))
507- <p class="state">
508- <span class=(format!("health-dot {}", summary_dot.class()))></span>
509- " " (summary)
510- </p>
511- <div class="sheet">
515+ head(title: at(lang, A::Health), sub: sub, live: Some("/admin/health/events"))
516+ <div class="sheet health-sheet">
512517 if count > 0 {
513518 <section class="sec" role="alert">
514519 <h2>(alert_text::banner_heading(lang, count))</h2>
@@ -539,11 +544,13 @@ async fn health_view(
539544 for f in facts.into_iter() {
540545 <div class="line" data-kb-row="">
541546 <span class="name">(f.label)</span>
542- <span class=(format!("val {}", f.dot.value_class()))>(f.value.as_str())</span>
547+ <span class="val">
548+ <span class=(f.dot.value_class())>(f.value.as_str())</span>
549+ if !f.detail.is_empty() {
550+ " · " <span class="health-path">(f.detail.as_str())</span>
551+ }
552+ </span>
543553 </div>
544- if !f.detail.is_empty() {
545- <p class="hint health-path">(f.detail.as_str())</p>
546- }
547554 }
548555 <p class="hint">(meta.as_str())</p>
549556 </section>
crates/forge-web/src/pages/admin_runners.rsmodified+14 -5
@@ -1140,8 +1140,9 @@ struct RunnerJobRow {
11401140 /// `#` and the run's number.
11411141 run_text: String,
11421142 state_text: String,
1143- /// `ci-state ci-<state>`, the class the runs list colours the state with.
1144- state_class: String,
1143+ /// The classes of the tick the CI list colours a job's state with: `tick` and `ok`, `bad`, `live`
1144+ /// or `skip`, or `tick` alone for a waiting job.
1145+ state_class: &'static str,
11451146 /// The run time so far for a running job, the whole run time for a finished one. `-` when unknown.
11461147 duration: String,
11471148 /// The time from queued to started. `-` when it never started.
@@ -1162,7 +1163,13 @@ fn runner_job_row(lang: Lang, job: &RunnerJob) -> RunnerJobRow {
11621163 repo,
11631164 run_text: format!("#{}", job.run_number),
11641165 state_text: state_text(lang, j.state.as_str()),
1165- state_class: format!("ci-state ci-{}", j.state.as_str()),
1166+ state_class: match j.state {
1167+ JobState::Success => "tick ok",
1168+ JobState::Failure | JobState::Error => "tick bad",
1169+ JobState::Running => "tick live",
1170+ JobState::Cancelled | JobState::Skipped => "tick skip",
1171+ JobState::Blocked | JobState::Queued => "tick",
1172+ },
11661173 duration: or_dash(duration_text(
11671174 lang,
11681175 j.started_at.as_deref(),
@@ -1743,7 +1750,7 @@ async fn runner_detail_view(
17431750 <p class="hint">(s(lang, "Not running any job.", "Hiçbir iş çalıştırmıyor."))</p>
17441751 }
17451752 for job in running_jobs.iter() {
1746- <div class="line"><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span></div>
1753+ <div class="line"><span class=(job.state_class) title=(job.state_text.as_str()) aria-label=(job.state_text.as_str())></span><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span></div>
17471754 }
17481755 </section>
17491756 <section class="sec">
@@ -1751,9 +1758,11 @@ async fn runner_detail_view(
17511758 if recent_jobs.is_empty() {
17521759 <p class="hint">(s(lang, "No finished jobs yet.", "Henüz biten iş yok."))</p>
17531760 }
1761+ <div class="runner-recent">
17541762 for job in recent_jobs.iter() {
1755- <div class="line"><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val"><span class=(job.state_class.as_str())>(job.state_text.as_str())</span></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span><span class="val"><time data-rel="true" datetime=(job.finished_at.as_str())>(job.finished_ago.as_str())</time></span></div>
1763+ <div class="line"><span class=(job.state_class) title=(job.state_text.as_str()) aria-label=(job.state_text.as_str())></span><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span><span class="val"><time data-rel="true" datetime=(job.finished_at.as_str())>(job.finished_ago.as_str())</time></span></div>
17561764 }
1765+ </div>
17571766 </section>
17581767 }
17591768 </div>
crates/forge-web/src/pages/admin_server.rsmodified+189 -167
@@ -38,7 +38,7 @@ use crate::pages::ci_runs::{changed_event, events_response};
3838 use crate::pages::passkeys::s;
3939 use crate::self_update;
4040 use crate::state::AppState;
41-use crate::views::parts::{RailItem, SubPart, confirm_act, head, rail, reveal};
41+use crate::views::parts::{RailItem, SubPart, confirm_act, head, rail};
4242 use crate::views::{enc, shell};
4343
4444 #[query_params(error = bad_request)]
@@ -86,8 +86,6 @@ struct OptionRow {
8686 /// One field, already formatted for the template. A secret's value is never in here.
8787 struct Row {
8888 key: &'static str,
89- /// The category the setting belongs to, for a search result's link.
90- group: Group,
9189 label: &'static str,
9290 help: &'static str,
9391 kind_label: &'static str,
@@ -108,24 +106,118 @@ struct Row {
108106 is_select: bool,
109107 is_secret: bool,
110108 fixed: bool,
111- /// A value the config file sets: it reads as a line and opens in place to change.
112- file_line: bool,
113- /// A short control: two of them in a row share a `.field-pair`.
114- short: bool,
115109 }
116110
117-pub(crate) fn tab_label(lang: Lang, group: Group) -> &'static str {
118- g::t(
119- lang,
120- match group {
121- Group::General => K::SrvTabGeneral,
122- Group::Limits => K::SrvTabLimits,
123- Group::Storage => K::SrvTabStorage,
124- Group::Backups => K::SrvTabBackups,
125- Group::Integrations => K::SrvTabIntegrations,
126- Group::Alerts => K::SrvTabAlerts,
127- },
128- )
111+/// One page of settings: a part of a category small enough to read without scrolling. Saving posts
112+/// the page's slug; the save covers the page's category, and only the page's switches are read as
113+/// off when absent.
114+pub(crate) struct SrvPage {
115+ pub(crate) slug: &'static str,
116+ group: Group,
117+ en: &'static str,
118+ tr: &'static str,
119+ keys: &'static [&'static str],
120+}
121+
122+impl SrvPage {
123+ pub(crate) fn label(&self, lang: Lang) -> &'static str {
124+ s(lang, self.en, self.tr)
125+ }
126+}
127+
128+/// The pages in rail order. Every setting is on exactly one page.
129+pub(crate) const PAGES: &[SrvPage] = &[
130+ SrvPage {
131+ slug: "general",
132+ group: Group::General,
133+ en: "General",
134+ tr: "Genel",
135+ keys: &["registration", "orgs.creation", "trusted_proxies", "banner.message", "banner.level", "banner.expires"],
136+ },
137+ SrvPage {
138+ slug: "addresses",
139+ group: Group::General,
140+ en: "Addresses",
141+ tr: "Adresler",
142+ keys: &["base_url", "user_content_base_url", "ssh_public_host", "ssh_public_port", "listen", "user_content_listen", "ssh_listen", "database", "data_dir"],
143+ },
144+ SrvPage {
145+ slug: "limits",
146+ group: Group::Limits,
147+ en: "CI",
148+ tr: "CI",
149+ keys: &["ci.enabled", "ci.registration_token_hours", "ci.max_log_mb", "ci.max_artifact_mb", "ci.max_artifacts_per_job", "ci.max_job_artifacts_mb"],
150+ },
151+ SrvPage {
152+ slug: "retention",
153+ group: Group::Limits,
154+ en: "Retention and uploads",
155+ tr: "Saklama ve yüklemeler",
156+ keys: &["ci.log_retention_days", "ci.artifact_retention_days", "ci.artifact_keep_runs", "ci.artifact_max_total_mb", "lfs.max_object_mb", "releases.max_asset_mb"],
157+ },
158+ SrvPage {
159+ slug: "storage",
160+ group: Group::Storage,
161+ en: "Storage",
162+ tr: "Depolama",
163+ keys: &["storage.backend", "storage.r2.account_id", "storage.r2.bucket", "storage.r2.jurisdiction", "storage.r2.prefix", "storage.r2.access_key_id", "storage.r2.secret_access_key_file"],
164+ },
165+ SrvPage {
166+ slug: "s3",
167+ group: Group::Storage,
168+ en: "S3 storage",
169+ tr: "S3 depolama",
170+ keys: &["storage.s3.bucket", "storage.s3.region", "storage.s3.endpoint", "storage.s3.prefix", "storage.s3.access_key_id", "storage.s3.secret_access_key_file", "storage.s3.allow_http", "storage.s3.virtual_hosted_style"],
171+ },
172+ SrvPage {
173+ slug: "backups",
174+ group: Group::Backups,
175+ en: "Backups",
176+ tr: "Yedekler",
177+ keys: &["backup.dir", "backup.interval_hours", "backup.keep", "backup.fsck_interval_days", "backup.healthcheck_url"],
178+ },
179+ SrvPage {
180+ slug: "replication",
181+ group: Group::Backups,
182+ en: "Replication",
183+ tr: "Çoğaltma",
184+ keys: &["replication.target", "replication.ssh_port", "replication.identity_file", "replication.known_hosts_file", "replication.db_snapshot_minutes", "replication.reconcile_minutes", "replication.healthcheck_url"],
185+ },
186+ SrvPage {
187+ slug: "integrations",
188+ group: Group::Integrations,
189+ en: "Integrations",
190+ tr: "Entegrasyonlar",
191+ keys: &["mail.transport", "webhooks.allow_http", "webhooks.allowed_hosts", "advisories.enabled", "advisories.ecosystems", "advisories.refresh_hours"],
192+ },
193+ SrvPage {
194+ slug: "self-update",
195+ group: Group::Integrations,
196+ en: "Self-update",
197+ tr: "Kendini güncelleme",
198+ keys: &["self_update.enabled", "self_update.repo", "self_update.branch", "self_update.job", "self_update.artifact"],
199+ },
200+ SrvPage {
201+ slug: "alerts",
202+ group: Group::Alerts,
203+ en: "Alerts",
204+ tr: "Uyarılar",
205+ // Each threshold sits under the alert it tunes.
206+ keys: &["alerts.enabled", "alerts.email", "alerts.on_runner_offline", "alerts.runner_offline_minutes", "alerts.on_disk", "alerts.disk_free_percent", "alerts.disk_free_gib", "alerts.on_backup", "alerts.on_ci_killed", "alerts.on_self_update", "alerts.on_replication"],
207+ },
208+];
209+
210+/// The page named by `slug`. An old category slug opens that category's first page.
211+pub(crate) fn page_by_slug(slug: &str) -> Option<&'static SrvPage> {
212+ PAGES.iter().find(|page| page.slug == slug)
213+}
214+
215+/// The page that holds the setting `key`.
216+pub(crate) fn page_of(key: &str) -> &'static SrvPage {
217+ PAGES
218+ .iter()
219+ .find(|page| page.keys.contains(&key))
220+ .unwrap_or(&PAGES[0])
129221 }
130222
131223 /// The words for a choice's stored value. Values that are names (smtp, s3, eu) read as they are.
@@ -172,7 +264,6 @@ fn row(lang: Lang, view: &FieldView) -> Row {
172264 let is_bool = field.ty == Ty::Bool && editable;
173265 let is_number = matches!(field.ty, Ty::Uint(..)) && editable;
174266 let is_select = matches!(field.ty, Ty::Choice(_)) && editable;
175- let file_line = editable && view.source == Source::File;
176267 let secret_state = if view.secret_set {
177268 g::t(lang, K::SrvSecretSet)
178269 } else {
@@ -200,7 +291,6 @@ fn row(lang: Lang, view: &FieldView) -> Row {
200291 };
201292 Row {
202293 key: field.key,
203- group: field.group,
204294 label,
205295 help,
206296 kind_label,
@@ -224,34 +314,17 @@ fn row(lang: Lang, view: &FieldView) -> Row {
224314 is_select,
225315 is_secret,
226316 fixed: !editable,
227- file_line,
228- short: editable && !file_line && !is_secret && (is_number || is_select),
229317 }
230318 }
231319
232-/// Groups the rows into blocks. Two short controls in a row share one `.field-pair`.
233-fn into_blocks(rows: Vec<Row>) -> Vec<Vec<Row>> {
234- let mut blocks: Vec<Vec<Row>> = Vec::new();
235- for row in rows {
236- let joins = row.short && blocks.last().is_some_and(|b| b.len() == 1 && b[0].short);
237- if joins {
238- if let Some(last) = blocks.last_mut() {
239- last.push(row);
240- }
241- } else {
242- blocks.push(vec![row]);
243- }
244- }
245- blocks
246-}
247-
248-async fn rows_for(state: &AppState, lang: Lang, group: Group) -> forge_core::Result<Vec<Row>> {
320+/// The rows of one page, in the page's order.
321+async fn rows_for(state: &AppState, lang: Lang, page: &SrvPage) -> forge_core::Result<Vec<Row>> {
249322 let overrides = state.store.server_overrides().await?;
250- Ok(state
251- .settings
252- .views(&overrides)
323+ let views = state.settings.views(&overrides);
324+ Ok(page
325+ .keys
253326 .iter()
254- .filter(|view| view.field.group == group)
327+ .filter_map(|key| views.iter().find(|view| view.field.key == *key))
255328 .map(|view| row(lang, view))
256329 .collect())
257330 }
@@ -272,7 +345,8 @@ async fn search_hits(state: &AppState, lang: Lang, needle: &str) -> forge_core::
272345 .collect())
273346 }
274347
275-/// One setting. A value the config file sets reads as a line, and opens in place to change.
348+/// One setting on one line: its name, then its control (or its value when it cannot be changed
349+/// here), then what to know about it. Every control is the same width, so the notes line up.
276350 #[component]
277351 async fn srv_row(lang: Lang, row: &Row) -> Result<impl View> {
278352 let id = format!("srv-{}", row.key);
@@ -280,96 +354,62 @@ async fn srv_row(lang: Lang, row: &Row) -> Result<impl View> {
280354 Ok(view! {
281355 <div class="srv-row" id=(id.as_str())>
282356 if row.fixed {
283- <div class="line">
284- <span class="name">(row.label)</span>
285- <span class="val">(row.value_text.as_str())</span>
286- </div>
287- srv_hints(lang: lang, row: row)
288- } else if row.file_line {
289- <div class="line">
290- <span class="name">(row.label)</span>
291- <span class="val">(row.value_text.as_str())</span>
292- </div>
293- reveal(label: s(lang, "Set here", "Burada ayarla"),
294- srv_control(lang: lang, row: row, input: input.as_str())
295- )
357+ <span class="srv-name">(row.label)</span>
358+ <span class="srv-value">(row.value_text.as_str())</span>
296359 } else {
297- srv_control(lang: lang, row: row, input: input.as_str())
298- }
299- </div>
300- })
301-}
302-
303-/// The control of one setting, labelled for the viewer, with its hints under it. A switch carries
304-/// its own label, and its hints sit under the switch.
305-#[component]
306-async fn srv_control(lang: Lang, row: &Row, input: &str) -> Result<impl View> {
307- Ok(view! {
308- <div class="srv-control">
309- if row.is_bool {
310- <label class="switch">
311- <input type="checkbox" id=(input) name=(row.key) value="true" checked=(row.checked)>
312- <span>(row.label)</span>
313- </label>
314- srv_hints(lang: lang, row: row)
315- } else {
316- <div class="field">
317- <label for=(input)>(row.label)</label>
318- if row.is_select {
319- <select id=(input) name=(row.key)>
360+ <label class="srv-name" for=(input.as_str())>(row.label)</label>
361+ <span class="srv-value">
362+ if row.is_bool {
363+ <input type="checkbox" id=(input.as_str()) name=(row.key) value="true" checked=(row.checked)>
364+ } else if row.is_select {
365+ <select id=(input.as_str()) name=(row.key)>
320366 for option in row.options.iter() {
321367 <option value=(option.value.as_str()) selected=(option.selected)>(option.label.as_str())</option>
322368 }
323369 </select>
324- } else if row.is_number && row.max.parse::<u64>().is_ok_and(|max| max <= 100) {
325- // A small range steps with − and +, like the runner's Max.
326- <div class="runner-pill">
327- <button type="button" class="runner-step" data-step="-1" aria-label=(s(lang, "Fewer", "Azalt"))>"−"</button>
328- <input type="number" id=(input) name=(row.key) value=(row.value.as_str()) min=(row.min.as_str()) max=(row.max.as_str()) step="1" inputmode="numeric">
329- <button type="button" class="runner-step" data-step="1" aria-label=(s(lang, "More", "Artır"))>"+"</button>
330- </div>
331370 } else if row.is_number {
332- <input type="number" id=(input) name=(row.key) value=(row.value.as_str()) min=(row.min.as_str()) max=(row.max.as_str())>
371+ <input type="number" id=(input.as_str()) name=(row.key) value=(row.value.as_str()) min=(row.min.as_str()) max=(row.max.as_str()) inputmode="numeric">
333372 } else if row.is_secret {
334- <input type="password" id=(input) name=(row.key) autocomplete="new-password" maxlength="1024">
373+ <input type="password" id=(input.as_str()) name=(row.key) autocomplete="new-password" maxlength="1024" placeholder=(row.secret_state)>
335374 } else {
336- <input type="text" id=(input) name=(row.key) value=(row.value.as_str()) maxlength="1024" autocomplete="off">
375+ <input type="text" id=(input.as_str()) name=(row.key) value=(row.value.as_str()) maxlength="1024" autocomplete="off">
337376 }
338- srv_hints(lang: lang, row: row)
339- </div>
377+ </span>
340378 }
379+ srv_hints(lang: lang, row: row)
341380 </div>
342381 })
343382 }
344383
345-/// What a setting says under its control: its help, its kind, a secret's rule and its override.
384+/// What a setting says after its control, one sentence after another: its help, its kind, a
385+/// secret's rule and its override.
346386 #[component]
347387 async fn srv_hints(lang: Lang, row: &Row) -> Result<impl View> {
348388 Ok(view! {
349- <div class="srv-hints">
389+ <span class="srv-hints">
350390 if !row.help.is_empty() {
351- <p class="hint">(row.help)</p>
391+ <span class="hint">(row.help)</span>
352392 }
353393 if row.is_secret {
354- <p class="hint">(row.secret_state) ". " (g::t(lang, K::SrvSecretHint))</p>
394+ <span class="hint">(g::t(lang, K::SrvSecretHint))</span>
355395 }
356396 if !row.kind_label.is_empty() {
357- <p class="hint">(row.kind_label)</p>
397+ <span class="hint">(row.kind_label)</span>
358398 }
359399 if row.pending {
360- <p class="hint">(g::t(lang, K::SrvRestartNeeded))</p>
400+ <span class="hint">(g::t(lang, K::SrvRestartNeeded))</span>
361401 }
362402 if row.has_override {
363- <p class="hint">
403+ <span class="hint">
364404 (s(lang, "Set here.", "Burada ayarlandı."))
365405 if row.show_file_value {
366406 " " (g::t(lang, K::SrvFileValue)) ": " <code>(row.file_value.as_str())</code>
367407 }
368408 " "
369409 <button type="submit" class="act" form="srv-reset" name="key" value=(row.key)>(g::t(lang, K::SrvResetToFile))</button>
370- </p>
410+ </span>
371411 }
372- </div>
412+ </span>
373413 })
374414 }
375415
@@ -377,16 +417,15 @@ async fn srv_hints(lang: Lang, row: &Row) -> Result<impl View> {
377417 async fn server_view(
378418 lang: Lang,
379419 csrf: String,
380- group: Group,
420+ page: &'static SrvPage,
381421 rows: Vec<Row>,
382422 q: String,
383423 search: Option<Vec<Row>>,
384424 notice: Option<String>,
385425 restart: Restart,
386426 ) -> Result<impl View> {
387- let tab = group.slug();
427+ let tab = page.slug;
388428 let any_editable = rows.iter().any(|r| !r.fixed);
389- let blocks = into_blocks(rows);
390429 let search_label = s(lang, "Search server settings", "Sunucu ayarlarında ara");
391430 // A pending restart names the boot id it waits for: the stream then sends at once when a new
392431 // process answers, and the page re-renders.
@@ -397,13 +436,13 @@ async fn server_view(
397436 ),
398437 _ => "/admin/server/events".to_owned(),
399438 };
400- let items: Vec<RailItem> = Group::ALL
401- .into_iter()
402- .map(|g_tab| RailItem {
403- name: tab_label(lang, g_tab).to_owned(),
439+ let items: Vec<RailItem> = PAGES
440+ .iter()
441+ .map(|item| RailItem {
442+ name: item.label(lang).to_owned(),
404443 val: String::new(),
405- href: format!("/admin/server?cat={}", g_tab.slug()),
406- current: g_tab == group,
444+ href: format!("/admin/server?cat={}", item.slug),
445+ current: search.is_none() && item.slug == page.slug,
407446 })
408447 .collect();
409448 let sub = vec![
@@ -414,8 +453,14 @@ async fn server_view(
414453 forge_ci::build::display()
415454 )),
416455 ];
456+ let restart_label = s(lang, "Restart server", "Sunucuyu yeniden başlat");
457+ let restart_note = s(lang, "Restart the server now? Requests in flight finish first, and the site is unavailable for a few seconds. Settings marked restart needed take effect, and so does a newly installed binary. Needs a supervisor such as systemd to start it again.", "Sunucu şimdi yeniden başlatılsın mı? Süren istekler önce biter, site birkaç saniye kullanılamaz. \"Yeniden başlatma gerekli\" işaretli ayarlar ve yeni kurulan ikili devreye girer. Yeniden başlatmak için systemd gibi bir gözetmen gerekir.");
417458 Ok(view! {
418- head(title: g::t(lang, K::ServerSettings), sub: sub)
459+ head(title: g::t(lang, K::ServerSettings), sub: sub,
460+ if restart != Restart::Pending {
461+ confirm_act(lang: lang, label: restart_label, action: "/admin/server/restart", csrf: csrf.as_str(), fields: vec![("tab".to_owned(), tab.to_owned())], note: Some(restart_note.to_owned()))
462+ }
463+ )
419464 <div data-live=(live.as_str())>
420465 if restart == Restart::Pending {
421466 <p class="state" role="status" aria-live="polite"><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>
@@ -433,7 +478,7 @@ async fn server_view(
433478 <input id="server-search" type="search" name="q" value=(q.as_str()) placeholder=(search_label) data-live-search="" autocomplete="off">
434479 </form>
435480 )
436- <div class="sheet">
481+ <div class="sheet srv-sheet">
437482 if let Some(hits) = search {
438483 <section class="sec">
439484 <h2>(s(lang, "Results", "Sonuçlar"))</h2>
@@ -441,53 +486,30 @@ async fn server_view(
441486 <p class="state">(s(lang, "No setting matches.", "Eşleşen ayar yok."))</p>
442487 }
443488 for hit in hits.iter() {
444- <a class="line" href=(format!("/admin/server?cat={}#srv-{}", hit.group.slug(), hit.key))>
489+ <a class="line" href=(format!("/admin/server?cat={}#srv-{}", page_of(hit.key).slug, hit.key))>
445490 <span class="name">(hit.label)</span>
446- <span class="val">(tab_label(lang, hit.group))</span>
491+ <span class="val">(page_of(hit.key).label(lang))</span>
447492 </a>
448493 }
449494 </section>
450495 } else {
451- <section class="sec">
452- <h2>(tab_label(lang, group))</h2>
453- <form method="post" action="/admin/server" class="fields">
454- <input type="hidden" name="csrf" value=(csrf.as_str())>
455- <input type="hidden" name="tab" value=(tab)>
456- for block in blocks.iter() {
457- if block.len() > 1 {
458- <div class="field-pair">
459- for r in block.iter() {
460- srv_row(lang: lang, row: r)
461- }
462- </div>
463- } else {
464- for r in block.iter() {
465- srv_row(lang: lang, row: r)
466- }
467- }
468- }
469- if any_editable {
496+ <form method="post" action="/admin/server" class="srv-form">
497+ <input type="hidden" name="csrf" value=(csrf.as_str())>
498+ <input type="hidden" name="tab" value=(tab)>
499+ for r in rows.iter() {
500+ srv_row(lang: lang, row: r)
501+ }
502+ if any_editable {
503+ <div class="acts srv-save">
470504 <button type="submit" class="primary">(i18n::t(lang, Key::Save))</button>
471- }
472- </form>
473- </section>
505+ </div>
506+ }
507+ </form>
474508 }
475509 <form id="srv-reset" method="post" action="/admin/server/reset">
476510 <input type="hidden" name="csrf" value=(csrf.as_str())>
477511 <input type="hidden" name="tab" value=(tab)>
478512 </form>
479- <section class="sec">
480- <h2>(s(lang, "Restart server", "Sunucuyu yeniden başlat"))</h2>
481- <p class="hint">(s(lang, "Stops gracefully and starts again, so a newly installed binary and every setting marked restart needed take effect. Needs a supervisor such as systemd to start it again.", "Düzgünce durdurup yeniden başlatır; böylece yeni kurulan ikili ve \"yeniden başlatma gerekli\" işaretli her ayar devreye girer. Yeniden başlatmak için systemd gibi bir gözetmen gerekir."))</p>
482- if restart == Restart::Pending {
483- <p class="state">(s(lang, "A restart is in progress.", "Yeniden başlatma sürüyor."))</p>
484- }
485- if restart != Restart::Pending {
486- <div class="acts">
487- confirm_act(lang: lang, label: s(lang, "Restart server", "Sunucuyu yeniden başlat"), action: "/admin/server/restart", csrf: csrf.as_str(), fields: vec![("tab".to_owned(), tab.to_owned())], note: Some(s(lang, "Restart the server now? Requests in flight finish first, and the site is unavailable for a few seconds.", "Sunucu şimdi yeniden başlatılsın mı? Süren istekler önce biter, site birkaç saniye kullanılamaz.").to_owned()))
488- </div>
489- }
490- </section>
491513 </div>
492514 </div>
493515 </div>
@@ -500,23 +522,23 @@ async fn server_page(cx: &Cx) -> Result<impl View> {
500522 let query = query_params::<ServerQuery>(cx)?;
501523 let state = app_context::<AppState>(cx);
502524 let lang = i18n::lang(cx, Some(&viewer.0));
503- let group = query
525+ let page = query
504526 .cat
505527 .as_deref()
506528 .or(query.tab.as_deref())
507- .and_then(Group::parse)
508- .unwrap_or(Group::General);
529+ .and_then(page_by_slug)
530+ .unwrap_or(&PAGES[0]);
509531 let q = query.q.clone().unwrap_or_default();
510532 let needle = q.trim().to_lowercase();
511533 let (rows, search) = if needle.is_empty() {
512- (rows_for(state, lang, group).await?, None)
534+ (rows_for(state, lang, page).await?, None)
513535 } else {
514536 (Vec::new(), Some(search_hits(state, lang, &needle).await?))
515537 };
516538 let csrf = viewer.1.csrf_token.clone();
517539 let title = g::t(lang, K::ServerSettings);
518540 Ok(view! {
519- shell(title: title, viewer: Some(&viewer), server_view(lang: lang, csrf: csrf, group: group, rows: rows, q: q, search: search, notice: query.notice.clone(), restart: restart_state(query.restarting.as_deref())))
541+ shell(title: title, viewer: Some(&viewer), server_view(lang: lang, csrf: csrf, page: page, rows: rows, q: q, search: search, notice: query.notice.clone(), restart: restart_state(query.restarting.as_deref())))
520542 })
521543 }
522544
@@ -528,15 +550,15 @@ async fn server_save(cx: &Cx, Form(mut form): Form<HashMap<String, String>>) ->
528550 }
529551 let lang = i18n::lang(cx, Some(&viewer.0));
530552 let state = app_context::<AppState>(cx);
531- let group = form
553+ let page = form
532554 .get("tab")
533- .and_then(|t| Group::parse(t))
534- .unwrap_or(Group::General);
535- // An unchecked box is absent from the post.
536- for field in ss::FIELDS
537- .iter()
538- .filter(|f| f.group == group && f.ty == Ty::Bool && f.kind != Kind::ReadOnly)
539- {
555+ .and_then(|t| page_by_slug(t))
556+ .unwrap_or(&PAGES[0]);
557+ let group = page.group;
558+ // An unchecked box is absent from the post. Only the page's own switches were on the form.
559+ for field in ss::FIELDS.iter().filter(|f| {
560+ page.keys.contains(&f.key) && f.ty == Ty::Bool && f.kind != Kind::ReadOnly
561+ }) {
540562 form.entry(field.key.to_owned())
541563 .or_insert_with(|| "false".to_owned());
542564 }
@@ -550,7 +572,7 @@ async fn server_save(cx: &Cx, Form(mut form): Form<HashMap<String, String>>) ->
550572 };
551573 Err(see_other(format!(
552574 "/admin/server?cat={}&notice={}",
553- group.slug(),
575+ page.slug,
554576 enc(&notice)
555577 ))
556578 .into())
@@ -874,10 +896,10 @@ mod tests {
874896 assert_eq!(fx.state.live().ci.max_log_mb, 16);
875897
876898 // A read-only field is shown but cannot be posted.
877- let page = admin_get(&fx, "/admin/server?tab=general").await;
899+ let page = admin_get(&fx, "/admin/server?tab=addresses").await;
878900 assert!(page.contains("127.0.0.1:7660"));
879901 assert!(!page.contains("name=\"listen\""));
880- save(&fx, "general", "listen=0.0.0.0%3A1").await;
902+ save(&fx, "addresses", "listen=0.0.0.0%3A1").await;
881903 assert!(fx.state.store.server_overrides().await.unwrap().is_empty());
882904
883905 // Out-of-range, wrong-kind and unknown-storage values are rejected, and nothing is stored.
@@ -945,7 +967,7 @@ mod tests {
945967 let fx = fixture().await;
946968
947969 // A restart field is stored, the live value stays, and the page says so.
948- save(&fx, "general", "base_url=https%3A%2F%2Fnew.example").await;
970+ save(&fx, "addresses", "base_url=https%3A%2F%2Fnew.example").await;
949971 assert_eq!(
950972 fx.state
951973 .store
@@ -957,7 +979,7 @@ mod tests {
957979 Some("https://new.example")
958980 );
959981 assert_eq!(fx.state.live().base_url, "https://forge.test/");
960- let page = admin_get(&fx, "/admin/server?tab=general").await;
982+ let page = admin_get(&fx, "/admin/server?tab=addresses").await;
961983 assert!(page.contains("restart needed"));
962984 assert!(page.contains("https://new.example"));
963985
crates/forge-web/src/pages/admin_users.rsmodified+1 -1
@@ -208,7 +208,7 @@ async fn users_view(
208208 let (links, prev, next) = pager_links(page, pages, |n| users_href(&q, kind, n));
209209 let empty = rows.is_empty();
210210 let open = error.is_some();
211- let search_label = s(lang, "Search users", "Kullanıcılarda ara");
211+ let search_label = s(lang, "Search users and organizations", "Kullanıcı ve kuruluşlarda ara");
212212 let filter_label = s(lang, "Filter", "Filtre");
213213 let all_label = format!("{} {}", s(lang, "All", "Tümü"), all_count);
214214 let people_label = format!(
crates/forge-web/src/pages/blame.rsmodified+14 -1
@@ -197,6 +197,16 @@ async fn blame_page(cx: &Cx) -> Result<impl View> {
197197 "blob",
198198 &format!("{ref_name}/{file}"),
199199 );
200+ // Blame sits beside the file's source: a markdown file's plain view, any other file's own page.
201+ let markdown = matches!(
202+ file_name.rsplit_once('.').map(|(_, ext)| ext.to_ascii_lowercase()).as_deref(),
203+ Some("md" | "markdown")
204+ );
205+ let source_href = if markdown {
206+ format!("{blob_href}?plain=1")
207+ } else {
208+ blob_href.clone()
209+ };
200210 let history = repo_href(
201211 &repo.owner_name,
202212 &repo.name,
@@ -227,7 +237,10 @@ async fn blame_page(cx: &Cx) -> Result<impl View> {
227237 <div class="sheet-tools">
228238 <strong>(file_name)</strong>
229239 <span class="mono">(size)</span>
230- <a class="act" href=(blob_href.as_str())>(b::t(lang, b::K::BlameBackToFile))</a>
240+ <nav class="sub" aria-label=(crate::pages::passkeys::s(lang, "View", "Görünüm"))>
241+ <a href=(source_href.as_str())>(crate::i18n::code::t(lang, crate::i18n::code::K::SourceToggle))</a>
242+ <a href="" aria-current="page">(b::t(lang, b::K::BlameLink))</a>
243+ </nav>
231244 <a class="act" href=(history.as_str())>(g::t(lang, K::HistoryLink))</a>
232245 </div>
233246 <section class="file" data-lines="">
crates/forge-web/src/pages/blob.rsmodified+23 -14
@@ -237,13 +237,6 @@ async fn blob_page(cx: &Cx) -> Result<impl View> {
237237 "commits",
238238 &format!("{ref_name}/{file}"),
239239 );
240- let toggle = if !is_markdown {
241- None
242- } else if plain {
243- Some((g::t(lang, K::Rendered), base.clone()))
244- } else {
245- Some((g::t(lang, K::SourceToggle), format!("{base}?plain=1")))
246- };
247240 let blame = repo_href(
248241 &repo.owner_name,
249242 &repo.name,
@@ -264,6 +257,19 @@ async fn blob_page(cx: &Cx) -> Result<impl View> {
264257
265258 let kind = viewer.kind;
266259 let is_text = kind == "text";
260+ // The ways to read the file, one switch with the current one marked, the same on every view of
261+ // it: Rendered and Source for markdown, Source alone otherwise, and Blame for any text.
262+ let mut views: Vec<(&'static str, String, bool)> = Vec::new();
263+ if is_markdown {
264+ views.push((g::t(lang, K::Rendered), base.clone(), !plain));
265+ views.push((g::t(lang, K::SourceToggle), format!("{base}?plain=1"), plain));
266+ } else if is_text {
267+ views.push((g::t(lang, K::SourceToggle), base.clone(), true));
268+ }
269+ let can_blame = is_text || is_markdown;
270+ if can_blame {
271+ views.push((b::t(lang, b::K::BlameLink), blame.clone(), false));
272+ }
267273 let note = viewer.note;
268274 let html = viewer.html;
269275 let lines = viewer.lines;
@@ -337,17 +343,20 @@ async fn blob_page(cx: &Cx) -> Result<impl View> {
337343 <div class="sheet-tools">
338344 <strong>(file_name.clone())</strong>
339345 <span class="mono">(size_line)</span>
340- if let Some((label, href)) = toggle {
341- <a class="act" href=(href)>(label)</a>
342- }
343- if is_text {
344- <a class="act" href=(blame.as_str())>(b::t(lang, b::K::BlameLink))</a>
345- <button type="button" class="act" data-copy-permalink="" title=(b::t(lang, b::K::PermalinkHint))
346- data-copied=(b::t(lang, b::K::PermalinkCopied))>(b::t(lang, b::K::CopyPermalink))</button>
346+ if views.len() > 1 {
347+ <nav class="sub" aria-label=(s(lang, "View", "Görünüm"))>
348+ for (label, href, on) in views.into_iter() {
349+ <a href=(href) aria-current=(on.then_some("page"))>(label)</a>
350+ }
351+ </nav>
347352 }
348353 <a class="act" href=(history)>(g::t(lang, K::HistoryLink))</a>
349354 <a class="act" href=(raw.clone())>(g::t(lang, K::RawLink))</a>
350355 <a class="act" href=(download_href) download=(download_name)>(g::t(lang, K::DownloadLink))</a>
356+ if can_blame {
357+ <button type="button" class="act" data-copy-permalink="" title=(b::t(lang, b::K::PermalinkHint))
358+ data-copied=(b::t(lang, b::K::PermalinkCopied))>(b::t(lang, b::K::CopyPermalink))</button>
359+ }
351360 </div>
352361 <section class="file" data-lines="" data-permalink=(permalink.as_str())>
353362 if kind == "image" {
crates/forge-web/src/pages/ci_job.rsmodified+1 -1
@@ -512,7 +512,7 @@ async fn job_body(
512512 </div>
513513 }
514514 <div class="sec ci-dock">
515- <p class="hint">(crate::pages::passkeys::s(lang, "bar height is lines changed", "çubuk yüksekliği değişen satır sayısıdır"))</p>
515+ <p class="hint">(crate::pages::passkeys::s(lang, "a bar's height is its lines changed, its colour its CI result", "çubuğun yüksekliği değişen satır sayısı, rengi CI sonucudur"))</p>
516516 <div class="dock-history">
517517 history_strip(lang: lang, owner: owner, repo: repo, bars: bars)
518518 </div>
crates/forge-web/src/pages/ci_runs.rsmodified+21 -13
@@ -1452,7 +1452,7 @@ fn job_steps(
14521452 StepState::Cancelled => "ci-sp-off",
14531453 },
14541454 seg: match state {
1455- StepState::Passed => "",
1455+ StepState::Passed => "ok",
14561456 StepState::Running => "live",
14571457 StepState::Failed => "bad",
14581458 StepState::Cancelled => "skip",
@@ -1742,7 +1742,7 @@ async fn runs_split(
17421742 RunState::Running => "live",
17431743 RunState::Cancelled => "skip",
17441744 RunState::Queued | RunState::WaitingApproval => "wait",
1745- _ => "done",
1745+ RunState::Success => "ok",
17461746 },
17471747 href: row_href(run.number),
17481748 // The list page alone draws no run, so it marks none.
@@ -2007,7 +2007,7 @@ async fn run_detail(
20072007 tick: match job.state {
20082008 JobState::Failure | JobState::Error => "bad",
20092009 JobState::Running => "live",
2010- JobState::Success => "done",
2010+ JobState::Success => "ok",
20112011 _ => "",
20122012 },
20132013 detail: job.image.clone(),
@@ -2088,14 +2088,22 @@ async fn run_detail(
20882088 let (headline, headline_class) = run_headline(
20892089 lang,
20902090 run.state,
2091- // The step that failed or runs says more than its job does.
2092- picked.map_or("", |index| {
2093- let job = &lines[index];
2094- job.steps
2091+ // The step that failed or runs says more than its job does. A running run names what runs
2092+ // now, whichever job is shown: a job that failed earlier in it is not what is running.
2093+ if run.state == RunState::Running {
2094+ lines
20952095 .iter()
2096- .find(|step| matches!(step.seg, "bad" | "live"))
2097- .map_or(job.name.as_str(), |step| step.name.as_str())
2098- }),
2096+ .find_map(|job| job.steps.iter().find(|step| step.seg == "live"))
2097+ .map_or("", |step| step.name.as_str())
2098+ } else {
2099+ picked.map_or("", |index| {
2100+ let job = &lines[index];
2101+ job.steps
2102+ .iter()
2103+ .find(|step| step.seg == "bad")
2104+ .map_or(job.name.as_str(), |step| step.name.as_str())
2105+ })
2106+ },
20992107 &duration_text(lang, Some(run.created_at.as_str()), run.finished_at.as_deref()),
21002108 );
21012109 Ok(RunDetail {
@@ -2275,7 +2283,7 @@ async fn runs_sheet(lang: Lang, list: &ListView) -> Result<impl View> {
22752283 if let Some(href) = newer_href {
22762284 <a href=(href.as_str())>(g::t(lang, K::Newer))</a>
22772285 }
2278- <span class="muted small">(page_label.as_str())</span>
2286+ <span>(page_label.as_str())</span>
22792287 if let Some(href) = older_href {
22802288 <a href=(href.as_str())>(g::t(lang, K::Older))</a>
22812289 }
@@ -2450,7 +2458,7 @@ async fn run_head(lang: Lang, run: &RunDetail, all_href: Option<String>) -> Resu
24502458 }
24512459 </div>
24522460 <p class="head-sub">
2453- <span class="b" data-run=(run.number)>(run.title.as_str())</span>
2461+ <span class="b" data-run=(run.number) title=(run.title.as_str())>(run.title.as_str())</span>
24542462 <span class="sep" aria-hidden="true">"·"</span>
24552463 <span>(run.trigger.as_str()) " \u{b7} " (run.branch.as_str())</span>
24562464 <span class="sep" aria-hidden="true">"·"</span>
@@ -2668,7 +2676,7 @@ async fn run_log(
26682676 run_timeline(lang: lang, run: run)
26692677 run_artifacts(lang: lang, run: run)
26702678 <div class="sec ci-dock">
2671- <p class="hint">(crate::pages::passkeys::s(lang, "bar height is lines changed", "çubuk yüksekliği değişen satır sayısıdır"))</p>
2679+ <p class="hint">(crate::pages::passkeys::s(lang, "a bar's height is its lines changed, its colour its CI result", "çubuğun yüksekliği değişen satır sayısı, rengi CI sonucudur"))</p>
26722680 <div class="dock-history">
26732681 history_strip(lang: lang, owner: owner, repo: repo, bars: bars)
26742682 </div>
crates/forge-web/src/pages/commits.rsmodified+1 -1
@@ -402,7 +402,7 @@ async fn commits_page(cx: &Cx) -> Result<impl View> {
402402 }
403403 }
404404 if has_newer || has_older {
405- <nav class="sub">
405+ <nav class="pager">
406406 if has_newer {
407407 <a href=(newer_href.as_str())>(g::t(lang, K::NewerLink))</a>
408408 }
crates/forge-web/src/pages/discussions.rsmodified+1 -1
@@ -347,7 +347,7 @@ async fn discussions_list_page(cx: &Cx) -> Result<impl View> {
347347 }
348348 }
349349 if has_newer || has_older {
350- <nav class="sub">
350+ <nav class="pager">
351351 if has_newer {
352352 <a href=(newer_href.as_str())>(newer_label)</a>
353353 }
crates/forge-web/src/pages/issues_list.rsmodified+1 -1
@@ -658,7 +658,7 @@ async fn issues_list_page(cx: &Cx) -> Result<impl View> {
658658 }
659659 }
660660 if has_newer || has_older {
661- <nav class="sub">
661+ <nav class="pager">
662662 if has_newer {
663663 <a href=(newer_href.as_str())>(g::t(lang, K::Newer))</a>
664664 }
crates/forge-web/src/pages/palette.rsmodified+8 -10
@@ -16,7 +16,7 @@
1616
1717 use std::collections::HashSet;
1818
19-use forge_core::server_settings::{FIELDS, Group};
19+use forge_core::server_settings::FIELDS;
2020 use forge_core::store::orgs::OrgMemberRole;
2121 use http::header::{CACHE_CONTROL, CONTENT_TYPE, X_CONTENT_TYPE_OPTIONS};
2222 use serde_json::{Value, json};
@@ -30,7 +30,7 @@ use crate::i18n::code::{self, K as CK};
3030 use crate::i18n::orgs::{self as g, K};
3131 use crate::i18n::repo_admin::{self as ra, K as RK};
3232 use crate::i18n::{self, Lang};
33-use crate::pages::admin_server::tab_label;
33+use crate::pages::admin_server::{PAGES, page_of};
3434 use crate::pages::org_new::may_create_org;
3535 use crate::pages::passkeys::s;
3636 use crate::state::AppState;
@@ -453,9 +453,9 @@ async fn palette(cx: &Cx) -> Result<Response> {
453453 "page",
454454 );
455455 let server = crate::i18n::admin::t(lang, crate::i18n::admin::K::ServerSettings);
456- for group in Group::ALL {
457- let label = format!("{server} \u{b7} {}", tab_label(lang, group));
458- let href = format!("/admin/server?tab={}", group.slug());
456+ for page in PAGES {
457+ let label = format!("{server} \u{b7} {}", page.label(lang));
458+ let href = format!("/admin/server?cat={}", page.slug);
459459 push(&mut items, &mut seen, &label, &href, "page");
460460 }
461461 for field in FIELDS {
@@ -463,11 +463,9 @@ async fn palette(cx: &Cx) -> Result<Response> {
463463 (Lang::Tr, Some((tr, _))) => tr,
464464 _ => field.label,
465465 };
466- let label = format!(
467- "{server} \u{b7} {} \u{b7} {name}",
468- tab_label(lang, field.group)
469- );
470- let href = format!("/admin/server?tab={}#srv-{}", field.group.slug(), field.key);
466+ let page = page_of(field.key);
467+ let label = format!("{server} \u{b7} {} \u{b7} {name}", page.label(lang));
468+ let href = format!("/admin/server?cat={}#srv-{}", page.slug, field.key);
471469 let terms = [field.key, field.label];
472470 push_terms(&mut items, &mut seen, &label, &href, "page", &terms);
473471 }
crates/forge-web/src/pages/pulls_list.rsmodified+1 -1
@@ -384,7 +384,7 @@ async fn pulls_list_page(cx: &Cx) -> Result<impl View> {
384384 }
385385 }
386386 if has_newer || has_older {
387- <nav class="sub">
387+ <nav class="pager">
388388 if has_newer {
389389 <a href=(newer_href.as_str())>(g::t(lang, K::Newer))</a>
390390 }
crates/forge-web/src/pages/repo_settings.rsmodified+67 -67
@@ -303,10 +303,9 @@ async fn danger_zone(
303303 }
304304
305305 /// The settings frame: the rail of settings pages beside the sheet holding the page's own content
306-/// (its children). Every settings page shows the same rail. `current` names the page shown
307-/// (`general`, `branches`, `webhooks`, ...) and marks its rail item. On the General page the sections
308-/// (`branches`, `discussions`, `danger`) are tabs above the frame; the danger tab only for a viewer
309-/// who may delete the repo (`can_delete`).
306+/// (its children). Every settings page shows the same rail, one list of every page. `current` names
307+/// the page shown (`general`, `branches`, `webhooks`, ...) and marks its rail item. Danger zone is
308+/// listed only for a viewer who may delete the repo (`can_delete`).
310309 #[component]
311310 pub async fn settings_frame(
312311 lang: Lang,
@@ -315,7 +314,6 @@ pub async fn settings_frame(
315314 can_delete: bool,
316315 #[default] child: Child<'_>,
317316 ) -> Result<impl View> {
318- let general_on = matches!(current, "general" | "branches" | "discussions" | "danger");
319317 let discussions_label = crate::i18n::community::t(lang, crate::i18n::community::K::Discussions);
320318 let item = |name: &str, href: String, on: bool| RailItem {
321319 name: name.to_owned(),
@@ -323,26 +321,21 @@ pub async fn settings_frame(
323321 href,
324322 current: on,
325323 };
326- let items = vec![
327- item(g::t(lang, K::General), format!("/{title}/settings"), general_on),
324+ let mut items = vec![
325+ item(g::t(lang, K::General), format!("/{title}/settings"), current == "general"),
328326 item(g::t(lang, K::Collaborators), format!("/{title}/settings/collaborators"), current == "collaborators"),
329- item(g::t(lang, K::RenameTransferNav), format!("/{title}/settings/rename"), current == "rename"),
327+ item(g::t(lang, K::BranchProtection), format!("/{title}/settings?section=branches"), current == "branches"),
328+ item(discussions_label, format!("/{title}/settings?section=discussions"), current == "discussions"),
330329 item(g::t(lang, K::Webhooks), format!("/{title}/settings/hooks"), current == "webhooks"),
331330 item(g::t(lang, K::Mirrors), format!("/{title}/settings/mirrors"), current == "mirrors"),
332331 item(g::t(lang, K::Secrets), format!("/{title}/settings/secrets"), current == "secrets"),
333332 item(crate::i18n::code::t(lang, crate::i18n::code::K::TabWiki), format!("/{title}/settings/wiki"), current == "wiki"),
333+ item(g::t(lang, K::RenameTransferNav), format!("/{title}/settings/rename"), current == "rename"),
334334 ];
335+ if can_delete {
336+ items.push(item(g::t(lang, K::DangerZone), format!("/{title}/settings?section=danger"), current == "danger"));
337+ }
335338 Ok(view! {
336- if general_on {
337- <nav class="tabs" aria-label=(g::t(lang, K::SettingsNavLabel))>
338- <a href=(format!("/{title}/settings")) aria-current=((current == "general").then_some("page"))>(g::t(lang, K::General))</a>
339- <a href=(format!("/{title}/settings?section=branches")) aria-current=((current == "branches").then_some("page"))>(g::t(lang, K::BranchProtection))</a>
340- <a href=(format!("/{title}/settings?section=discussions")) aria-current=((current == "discussions").then_some("page"))>(discussions_label)</a>
341- if can_delete {
342- <a href=(format!("/{title}/settings?section=danger")) aria-current=((current == "danger").then_some("page"))>(g::t(lang, K::DangerZone))</a>
343- }
344- </nav>
345- }
346339 <div class="work">
347340 rail(label: g::t(lang, K::SettingsNavLabel), items: items)
348341 <div class="sheet">
@@ -636,65 +629,72 @@ async fn branch_rule_form(
636629 <input id=(pattern_id.as_str()) type="text" name="pattern" value=(pattern.as_str()) autocomplete="off" spellcheck="false" required=(true)>
637630 <p class="hint">(g::t(lang, K::PatternHelpA))<code>"*"</code>(g::t(lang, K::PatternHelpB))<code>"**"</code>(g::t(lang, K::PatternHelpC))<code>"/"</code>(g::t(lang, K::PatternHelpD))</p>
638631 </div>
639- <fieldset class="rule-group">
640- <legend>(g::t(lang, K::SectionPushes))</legend>
641- <label class="switch">
642- <input type="checkbox" name="allow_force_push" value="on" checked=(allow_force_push)>
643- <span>(g::t(lang, K::AllowForcePush))</span>
644- </label>
645- <p class="hint">(g::t(lang, K::ForcePushDesc))</p>
646- <label class="switch">
647- <input type="checkbox" name="allow_deletion" value="on" checked=(allow_deletion)>
648- <span>(g::t(lang, K::AllowDeletion))</span>
649- </label>
650- <p class="hint">(g::t(lang, K::DeletionDesc))</p>
651- <label class="switch">
652- <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)>
653- <span>(g::t(lang, K::RestrictPushTitle))</span>
654- </label>
655- <p class="hint">(g::t(lang, K::RestrictPushDesc))</p>
656- </fieldset>
657- <fieldset class="rule-group">
658- <legend>(g::t(lang, K::SectionMerging))</legend>
659- <div class="field">
660- <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label>
661- <div class="runner-pill">
662- <button type="button" class="runner-step" data-step="-1" aria-label=(passkeys::s(lang, "Fewer", "Azalt"))>"−"</button>
663- <input id=(approvals_id.as_str()) type="number" name="required_approvals" min="0" max="20" step="1" inputmode="numeric" value=(required_approvals.as_str())>
664- <button type="button" class="runner-step" data-step="1" aria-label=(passkeys::s(lang, "More", "Artır"))>"+"</button>
632+ // Each group is a field: its name in the label column, its boxes in the control column, each
633+ // box with its note beside it.
634+ <div class="field">
635+ <span class="field-label">(g::t(lang, K::SectionPushes))</span>
636+ <div class="checks">
637+ <div class="check-row">
638+ <label class="switch">
639+ <input type="checkbox" name="allow_force_push" value="on" checked=(allow_force_push)>
640+ <span>(g::t(lang, K::AllowForcePush))</span>
641+ </label>
642+ <span class="hint">(g::t(lang, K::ForcePushDesc))</span>
643+ </div>
644+ <div class="check-row">
645+ <label class="switch">
646+ <input type="checkbox" name="allow_deletion" value="on" checked=(allow_deletion)>
647+ <span>(g::t(lang, K::AllowDeletion))</span>
648+ </label>
649+ <span class="hint">(g::t(lang, K::DeletionDesc))</span>
650+ </div>
651+ <div class="check-row">
652+ <label class="switch">
653+ <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)>
654+ <span>(g::t(lang, K::RestrictPushTitle))</span>
655+ </label>
656+ <span class="hint">(g::t(lang, K::RestrictPushDesc))</span>
665657 </div>
666- <p class="hint">(g::t(lang, K::ApprovalsHelp))</p>
667658 </div>
668- <label class="switch">
669- <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)>
670- <span>(g::t(lang, K::BlockWhileChanges))</span>
671- </label>
672- <label class="switch">
673- <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)>
674- <span>(g::t(lang, K::RequireUpToDate))</span>
675- </label>
676- <label class="switch">
677- <input type="checkbox" name="require_merge_queue" value="on" checked=(require_merge_queue)>
678- <span>(mq::t(lang, mq::K::RequireMergeQueue))</span>
679- </label>
680- <p class="hint">(mq::t(lang, mq::K::RequireMergeQueueHint))</p>
681- </fieldset>
682- <fieldset class="rule-group">
683- <legend>(g::t(lang, K::SectionChecks))</legend>
684- <div class="field">
685- <label for=(checks_id.as_str())>(g::t(lang, K::RequiredChecks))</label>
686- <input id=(checks_id.as_str()) type="text" name="required_checks" value=(required_checks.as_str()) autocomplete="off" spellcheck="false" placeholder="ci/test, ci/lint">
687- <p class="hint">(g::t(lang, K::RequiredChecksHelp))</p>
659+ </div>
660+ <div class="field">
661+ <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label>
662+ <input id=(approvals_id.as_str()) type="number" name="required_approvals" min="0" max="20" step="1" inputmode="numeric" value=(required_approvals.as_str())>
663+ <p class="hint">(g::t(lang, K::ApprovalsHelp))</p>
664+ </div>
665+ <div class="field">
666+ <span class="field-label">(g::t(lang, K::SectionMerging))</span>
667+ <div class="checks">
668+ <label class="switch">
669+ <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)>
670+ <span>(g::t(lang, K::BlockWhileChanges))</span>
671+ </label>
672+ <label class="switch">
673+ <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)>
674+ <span>(g::t(lang, K::RequireUpToDate))</span>
675+ </label>
676+ <div class="check-row">
677+ <label class="switch">
678+ <input type="checkbox" name="require_merge_queue" value="on" checked=(require_merge_queue)>
679+ <span>(mq::t(lang, mq::K::RequireMergeQueue))</span>
680+ </label>
681+ <span class="hint">(mq::t(lang, mq::K::RequireMergeQueueHint))</span>
682+ </div>
688683 </div>
684+ </div>
685+ <div class="field">
686+ <label for=(checks_id.as_str())>(g::t(lang, K::SectionChecks))</label>
687+ <input id=(checks_id.as_str()) type="text" name="required_checks" value=(required_checks.as_str()) autocomplete="off" spellcheck="false" placeholder="ci/test, ci/lint" aria-label=(g::t(lang, K::RequiredChecks))>
688+ <p class="hint">(g::t(lang, K::RequiredChecksHelp))</p>
689689 if !contexts.is_empty() {
690- <p class="hint">(g::t(lang, K::RecentContexts))</p>
691690 <div class="acts">
691+ <span class="hint">(g::t(lang, K::RecentContexts))</span>
692692 for context in contexts.iter() {
693693 <button type="button" class="act" data-check-add=(context.as_str())>(context.as_str())</button>
694694 }
695695 </div>
696696 }
697- </fieldset>
697+ </div>
698698 <div class="acts">
699699 <button type="submit" class="primary">(g::t(lang, K::SaveRule))</button>
700700 <button type="button" class="act quiet" data-close-details="">(g::t(lang, K::CancelRule))</button>
crates/forge-web/src/pages/repo_side.rsmodified+2 -1
@@ -292,7 +292,8 @@ pub fn run_pips(runs: &[RunRow]) -> Vec<(String, String, &'static str)> {
292292 .map(|run| {
293293 let class = match run.state {
294294 RunState::Failure | RunState::Error => "bad",
295- RunState::Running | RunState::Queued => "live",
295+ RunState::Running => "live",
296+ RunState::Success => "ok",
296297 _ => "",
297298 };
298299 (run.href.clone(), run.title.clone(), class)
crates/forge-web/src/views/timeline.rsmodified+3 -2
@@ -31,11 +31,12 @@ pub fn bar_percent(lines: u64, max: u64) -> u32 {
3131 pct.clamp(MIN_BAR_PERCENT, 100)
3232 }
3333
34-/// The tone class of a bar: live for the newest commit while its run goes, bad when its latest
35-/// run failed, neutral otherwise.
34+/// The tone class of a bar, the colour of its commit's latest run as the CI pages draw it: live for
35+/// the newest commit while its run goes, ok when it passed, bad when it failed, neutral with no run.
3636 fn tone(ci: Option<RunState>, newest: bool) -> &'static str {
3737 match ci {
3838 Some(RunState::Running | RunState::Queued) if newest => "hs-live",
39+ Some(RunState::Success) => "hs-ok",
3940 Some(RunState::Failure | RunState::Error) => "hs-bad",
4041 _ => "hs-neutral",
4142 }
docs/ui-language.mdmodified+3 -2
@@ -88,14 +88,15 @@ before its label. Few fixed options are `.choice`:
8888 <div class="choice"><label><input type="radio" name="theme" value="auto" checked><span>Auto</span></label> ..</div>
8989 ```
9090
91-Longer lists are a `<select>`. Fields are soft filled shapes with no line around them. Every control has a
91+Longer lists are a `<select>`, 280px like a line of text with its chevron at its end, so every control in a
92+form ends on one edge. Fields are soft filled shapes with no line around them. Every control has a
9293 label. Errors are `alert` at the top of the form they belong to, which stays open with the user's text.
9394
9495 ## Lists and search
9596
9697 Every search bar is live: `data-live-search` on a real GET form's input in `.plain-search`. It sits in the
9798 tools row or above the rail's list. Filters are the rail, or `.tabs` when there are only a few. Pagers
98-appear only when another page exists. An empty list is `.state` with one line and its action as `.act`.
99+appear only when another page exists, as one `nav.pager` row (Newer, the page, Older) under the list. An empty list is `.state` with one line and its action as `.act`.
99100
100101 ## Menus
101102
style/_admin_rows.scssmodified+6 -2
@@ -53,9 +53,13 @@
5353 color: var(--text);
5454 }
5555
56-// Job logs pad each numbered line; the runner log has no numbers, so the box pads instead.
56+// The runner log is not a fit pane like a job's: it is as tall as the window leaves under the tabs and
57+// scrolls inside, and its lines start on the sheet's inset like the tools row above it.
5758 .ci-log.runner-log {
58- padding: 8px 12px;
59+ flex: none;
60+ min-height: 240px;
61+ max-height: calc(100dvh - 350px);
62+ padding: 0;
5963 }
6064
6165 // Copy all sits above the log, at its right edge.
style/_ci_estimate.scssmodified+34 -16
@@ -71,25 +71,39 @@ progress.ci-est.ci-tl-stepprog {
7171 background: var(--border-strong);
7272 }
7373
74- &.ci-sp-fail {
75- &::-webkit-progress-value,
76- &::-moz-progress-bar {
77- background: var(--bad);
78- }
74+ // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list.
75+ &.ci-sp-pass::-webkit-progress-value {
76+ background: var(--ok);
7977 }
8078
81- &.ci-sp-off {
82- &::-webkit-progress-value,
83- &::-moz-progress-bar {
84- background: var(--border);
85- }
79+ &.ci-sp-pass::-moz-progress-bar {
80+ background: var(--ok);
8681 }
8782
88- &.ci-sp-run {
89- &::-webkit-progress-value,
90- &::-moz-progress-bar {
91- background: var(--accent);
92- }
83+ &.ci-sp-fail::-webkit-progress-value {
84+ background: var(--bad);
85+ }
86+
87+ &.ci-sp-fail::-moz-progress-bar {
88+ background: var(--bad);
89+ }
90+
91+ // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list.
92+ &.ci-sp-off::-webkit-progress-value {
93+ background: var(--border);
94+ }
95+
96+ &.ci-sp-off::-moz-progress-bar {
97+ background: var(--border);
98+ }
99+
100+ // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list.
101+ &.ci-sp-run::-webkit-progress-value {
102+ background: var(--accent);
103+ }
104+
105+ &.ci-sp-run::-moz-progress-bar {
106+ background: var(--accent);
93107 }
94108
95109 // No value attribute: the element's own background carries a 30% segment that slides across.
@@ -100,7 +114,11 @@ progress.ci-est.ci-tl-stepprog {
100114 animation: ci-step-slide 1.4s linear infinite;
101115
102116 &::-webkit-progress-bar,
103- &::-webkit-progress-value,
117+ &::-webkit-progress-value {
118+ background: transparent;
119+ animation: none;
120+ }
121+
104122 &::-moz-progress-bar {
105123 background: transparent;
106124 animation: none;
style/_min_admin.scssmodified+0 -9
@@ -47,15 +47,6 @@ form.runner-load {
4747 margin-top: 8px;
4848 }
4949
50-// Server settings: one setting is a column of its control, its help and its actions.
51-.srv-row,
52-.srv-hints {
53- display: flex;
54- flex-direction: column;
55- gap: 6px;
56- min-width: 0;
57-}
58-
5950 // The small stepper sits at the start of its field, and its number box keeps its own width.
6051 .field > .runner-pill {
6152 align-self: flex-start;
style/_one.scssmodified+197 -30
@@ -486,7 +486,8 @@ input[type="radio"] {
486486 padding-top: 0;
487487 }
488488
489- // The canvas's sizes: a line of text is 280 wide, a select as wide as its words, a box of text 560.
489+ // The canvas's sizes: a line of text is 280 wide and so is a select, so every control in a form ends
490+ // on one edge; a box of text is 560.
490491 > input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="range"], [type="hidden"]) {
491492 width: 280px;
492493 max-width: 100%;
@@ -497,9 +498,8 @@ input[type="radio"] {
497498 width: 560px;
498499 }
499500
500- > select {
501- width: auto;
502- min-width: 160px;
501+ > select:not([multiple]) {
502+ width: 280px;
503503 max-width: 100%;
504504 }
505505
@@ -674,7 +674,7 @@ input[type="radio"] {
674674 background: var(--surface);
675675 box-shadow: 0 0 0 1px var(--border);
676676 color: var(--text);
677- font-weight: 600;
677+ font-weight: 500; // the same as its neighbours, so choosing never shifts the row
678678 }
679679 }
680680
@@ -771,6 +771,7 @@ input[type="radio"] {
771771 .pathbar-edit,
772772 button.pathbar-edit {
773773 flex: none;
774+ align-self: center;
774775 width: auto;
775776 height: auto;
776777 padding: 0;
@@ -985,6 +986,11 @@ button.corner-link {
985986 }
986987 }
987988
989+// The avatar is the whole button: no inset, so it sits on the top bar's middle line.
990+.corner-float summary.corner-btn {
991+ padding: 0;
992+}
993+
988994 .corner-sep {
989995 height: 1px;
990996 margin: 6px 4px;
@@ -1100,31 +1106,41 @@ main > .tabs {
11001106 }
11011107 }
11021108
1109+// Recent runs after the head line: a dot each, coloured by how it ended, the newest last.
11031110 .pips {
11041111 display: inline-flex;
11051112 align-items: center;
1106- gap: 3px;
1107- margin-left: 4px;
1113+ gap: 4px;
1114+ margin-left: 6px;
1115+ vertical-align: middle;
11081116 }
11091117
11101118 .pip {
11111119 display: block;
1112- width: 7px;
1113- height: 14px;
1114- border-radius: 2px;
1115- background: var(--border-strong);
1120+ width: 8px;
1121+ height: 8px;
1122+ border-radius: 50%;
1123+ box-shadow: inset 0 0 0 1.5px var(--border-strong);
1124+
1125+ &.ok {
1126+ background: var(--ok);
1127+ box-shadow: none;
1128+ }
11161129
11171130 &.bad {
11181131 background: var(--bad);
1132+ box-shadow: none;
11191133 }
11201134
11211135 &.live {
11221136 background: var(--accent);
1137+ box-shadow: none;
11231138 }
11241139
1140+ // The newest run is a little larger.
11251141 &.cur {
1126- outline: 2px solid var(--text);
1127- outline-offset: 1px;
1142+ width: 10px;
1143+ height: 10px;
11281144 }
11291145 }
11301146
@@ -1164,22 +1180,27 @@ main > .tabs {
11641180 }
11651181 }
11661182
1167-// The branch beside the Files heading: a quiet word that opens the one menu.
1183+// The branch beside the Files heading: the small soft pill every other picker in a tools row is, 32px
1184+// tall, that opens the one menu.
11681185 .rail-head .ref-select > summary {
11691186 display: inline-flex;
1170- gap: 4px;
1187+ gap: 6px;
11711188 align-items: center;
1172- height: auto;
1189+ height: 32px;
11731190 min-height: 0;
1174- padding: 0;
1191+ padding: 0 12px 0 14px;
11751192 border: 0;
1176- border-radius: 0;
1177- background: none;
1193+ border-radius: 16px;
1194+ background: var(--surface-2);
11781195 box-shadow: none;
1179- color: var(--muted);
1196+ color: var(--text);
11801197 cursor: pointer;
1181- font-size: 13px;
1182- font-weight: 600;
1198+ font-size: 14px;
1199+ font-weight: 500;
1200+
1201+ &:hover {
1202+ background: color-mix(in oklab, var(--surface-2) 88%, var(--text));
1203+ }
11831204
11841205 > svg:first-child {
11851206 display: none;
@@ -1194,7 +1215,7 @@ main > .tabs {
11941215 box-shadow: none;
11951216 color: inherit;
11961217 font-family: var(--font);
1197- font-size: 13px;
1218+ font-size: 14px;
11981219 }
11991220
12001221 svg {
@@ -1203,6 +1224,13 @@ main > .tabs {
12031224 }
12041225 }
12051226
1227+// The rail's head starts on the sheet's top edge, with no rule above it: the list's own rows draw the lines.
1228+.rail-head.browse-bar {
1229+ margin: 0 0 8px;
1230+ padding: 0;
1231+ border: 0;
1232+}
1233+
12061234 .rail-head {
12071235 display: flex;
12081236 flex-wrap: wrap;
@@ -1287,7 +1315,7 @@ main > .tabs {
12871315 &.sel {
12881316 background: var(--surface);
12891317 box-shadow: 0 0 0 1px var(--border);
1290- font-weight: 600;
1318+ font-weight: 500; // the same as its neighbours, so choosing never shifts the row
12911319 }
12921320 }
12931321
@@ -1524,6 +1552,7 @@ details > .status-list,
15241552 .strip-list a,
15251553 .corner-menu > a,
15261554 .corner-link,
1555+button.corner-link.link-button,
15271556 .menu-list > a,
15281557 .menu-list > form > button:not(.primary),
15291558 .row-menu-panel > form > button,
@@ -1683,6 +1712,10 @@ details > .status-list,
16831712 }
16841713 }
16851714
1715+ &.ok .bar {
1716+ background: var(--ok);
1717+ }
1718+
16861719 &.bad .bar {
16871720 background: var(--bad);
16881721 }
@@ -1767,6 +1800,23 @@ details > .status-list,
17671800 box-shadow: inset 0 0 0 5px var(--border-strong);
17681801 }
17691802
1803+ // CI: passed, failed and running each have their colour; waiting stays a ring, cancelled a dashed one.
1804+ &.ok {
1805+ box-shadow: inset 0 0 0 5px var(--ok);
1806+ }
1807+
1808+ // Skipped or cancelled: the waiting ring, struck through.
1809+ &.skip::after {
1810+ content: "";
1811+ position: absolute;
1812+ top: 7.25px;
1813+ left: 2px;
1814+ width: 12px;
1815+ height: 1.5px;
1816+ background: var(--border-strong);
1817+ transform: rotate(-45deg);
1818+ }
1819+
17701820 &.bad {
17711821 box-shadow: inset 0 0 0 5px var(--bad);
17721822 }
@@ -1881,7 +1931,7 @@ details > .status-list,
18811931 > nav.sub a[aria-current="true"] {
18821932 background: var(--accent-soft);
18831933 color: var(--accent);
1884- font-weight: 600;
1934+ font-weight: 500; // the same as its neighbours, so choosing never shifts the row
18851935 }
18861936
18871937 .switch {
@@ -2214,7 +2264,7 @@ main > .diff-section,
22142264 #ci-view-timeline:checked ~ .ci-logbar .ci-tl-tab-timeline {
22152265 background: var(--accent-soft);
22162266 color: var(--accent);
2217- font-weight: 600;
2267+ font-weight: 500; // the same as its neighbours, so choosing never shifts the row
22182268 }
22192269
22202270 .ci-log {
@@ -2681,7 +2731,7 @@ dialog[data-finder] {
26812731 background: var(--surface);
26822732 box-shadow: 0 0 0 1px var(--border);
26832733 color: var(--text);
2684- font-weight: 600;
2734+ font-weight: 500; // the same as its neighbours, so choosing never shifts the row
26852735 }
26862736
26872737 label:has(:focus-visible) {
@@ -2869,13 +2919,18 @@ main select {
28692919 }
28702920 }
28712921
2872-// A select opens the shared menu panel, and its icon is the shared chevron, not a triangle.
2922+// A select opens the shared menu panel, and its icon is the shared chevron, not a triangle. The
2923+// chevron sits at the field's end, as a text field's end is its edge, so a wide select reads as one.
28732924 @supports (appearance: base-select) {
2925+ select:not([multiple]):not([size]) {
2926+ gap: 8px;
2927+ }
2928+
28742929 select:not([multiple]):not([size])::picker-icon {
28752930 content: "";
28762931 width: 6px;
28772932 height: 6px;
2878- margin: -3px 2px 0 8px;
2933+ margin: -3px 2px 0 auto;
28792934 border-right: 1.5px solid currentColor;
28802935 border-bottom: 1.5px solid currentColor;
28812936 rotate: 45deg;
@@ -2923,10 +2978,122 @@ main select {
29232978 > .act[aria-current] {
29242979 background: var(--surface-2);
29252980 color: var(--text);
2926- font-weight: 600;
2981+ font-weight: 500; // the same as its neighbours, so choosing never shifts the row
29272982 }
29282983
29292984 > .hint {
29302985 font-size: 14px;
29312986 }
29322987 }
2988+
2989+// Pagers: Newer, the page, Older as quiet words in one row under the list, on the sheet's inset with
2990+// a hairline above. Every pager in the app is this row.
2991+nav.pager:not(.pager-numbered),
2992+.ci-side nav.pager:not(.pager-numbered) {
2993+ display: flex;
2994+ flex-wrap: wrap;
2995+ align-items: center;
2996+ gap: 4px;
2997+ margin: 0;
2998+ padding: 8px 18px;
2999+ border-top: 1px solid var(--border);
3000+ color: var(--muted);
3001+ font-size: 14px;
3002+
3003+ > a {
3004+ display: inline-flex;
3005+ align-items: center;
3006+ height: 30px;
3007+ padding: 0 10px;
3008+ border-radius: 12px;
3009+ color: var(--muted);
3010+ font-weight: 500;
3011+ text-decoration: none;
3012+
3013+ &:first-child {
3014+ margin-left: -10px;
3015+ }
3016+
3017+ &:hover {
3018+ background: var(--surface-2);
3019+ color: var(--text);
3020+ text-decoration: none;
3021+ }
3022+ }
3023+
3024+ > span {
3025+ padding: 0 10px;
3026+ }
3027+
3028+ > span:first-child {
3029+ padding-left: 0;
3030+ }
3031+}
3032+
3033+// A closed disclosure leaves no empty box behind: in a row of actions its hidden content would be one
3034+// more item, and one more gap, between its summary and the next action.
3035+details:not([open])::details-content {
3036+ display: none;
3037+}
3038+
3039+// A button in a tools row sits on the row's middle line, like the words beside it.
3040+.sheet-tools > button,
3041+.sheet-tools > form > button {
3042+ align-self: center;
3043+}
3044+
3045+// Colour rows: the swatches sit on nine fixed columns, the most any row has, so the sliders and the hex
3046+// box of Background and Accent start on one edge whatever each row holds. Hue, vividness and hex
3047+// follow on one line, each its own width; a note about a lightened hex goes under them.
3048+.colour-choices {
3049+ display: grid;
3050+ grid-template-columns: repeat(9, 30px) auto;
3051+ align-items: center;
3052+ gap: 8px;
3053+}
3054+
3055+.colour-choices > .tune {
3056+ grid-column: 10;
3057+ display: flex;
3058+ flex-wrap: wrap;
3059+ align-items: center;
3060+ gap: 6px 12px;
3061+ margin-left: 12px;
3062+
3063+ > .tune-row {
3064+ display: contents;
3065+ }
3066+
3067+ .hue-stripe,
3068+ .vivid-stripe {
3069+ flex: none;
3070+ width: 170px;
3071+ }
3072+
3073+ .hex-note {
3074+ flex-basis: 100%;
3075+ }
3076+
3077+ .hex-note:empty {
3078+ display: none;
3079+ }
3080+}
3081+
3082+@media (max-width: 700px) {
3083+ .colour-choices > .tune {
3084+ grid-column: 1 / -1;
3085+ margin-left: 0;
3086+ }
3087+}
3088+
3089+// A box with its note: the note beside the box's words, on one line while there is room.
3090+.checks > .check-row {
3091+ display: flex;
3092+ flex-wrap: wrap;
3093+ align-items: baseline;
3094+ column-gap: 10px;
3095+
3096+ > .hint {
3097+ margin: 0;
3098+ }
3099+}
style/_one_admin.scssmodified+120 -29
@@ -85,58 +85,79 @@ $repo: 'main:has(> section.repo-head .tab.active[href$="/settings"])';
8585 }
8686
8787
88-// Server settings: each setting is one row, its name and value, then its Set here beside them.
88+// Server settings: one setting a line. Its name, then its control on one fixed width, then its notes,
89+// so every control and every note starts on the same edge. A page is short enough to need no scroll.
8990 #{$admin} .srv-row {
90- display: flex;
91- flex-direction: row;
92- flex-wrap: wrap;
91+ display: grid;
92+ grid-template-columns: 210px 280px minmax(0, 1fr);
93+ column-gap: 16px;
9394 align-items: center;
94- justify-content: flex-start;
95- column-gap: 10px;
96- margin: 0 -18px;
97- padding: 0 18px;
95+ min-height: 52px;
96+ padding: 7px 18px;
97+ box-sizing: border-box;
9898 border-bottom: 1px solid var(--border);
9999 }
100100
101-#{$admin} .srv-row > .line {
102- flex: 0 0 auto;
103- width: auto;
104- min-height: 46px;
105- margin: 0;
106- padding: 0;
107- border: 0;
101+#{$admin} .srv-name {
102+ color: var(--text);
103+ font-size: 15px;
104+ font-weight: 500;
105+ line-height: 20px;
108106 }
109107
110-#{$admin} .srv-row > .srv-control {
111- flex: 1 1 100%;
112- padding: 10px 0;
113-}
108+#{$admin} .srv-value {
109+ display: flex;
110+ align-items: center;
111+ min-width: 0;
112+ overflow-wrap: anywhere;
113+ color: var(--text);
114+ font-size: 14px;
114115
115-#{$admin} .srv-row > details.reveal {
116- flex: 0 0 auto;
116+ > :is(input:not([type="checkbox"]), select) {
117+ width: 100%;
118+ max-width: none;
119+ }
117120 }
118121
119-// A read-only setting's notes follow its value on the same line, one sentence after another.
120-#{$admin} .srv-row > .srv-hints {
122+#{$admin} .srv-hints {
121123 display: flex;
122- flex-direction: row;
123- align-items: baseline;
124- flex: 0 1 auto;
125124 flex-wrap: wrap;
125+ align-items: baseline;
126126 column-gap: 4px;
127+ min-width: 0;
127128
128129 > .hint {
129130 margin: 0;
131+ font-size: 13px;
132+ line-height: 18px;
130133 }
131134
132135 > .hint + .hint::before {
133136 content: "· ";
134137 }
138+
139+ .act {
140+ height: auto;
141+ padding: 0;
142+ }
135143 }
136144
137-#{$admin} .srv-row > details.reveal[open] {
138- flex-basis: 100%;
139- padding-bottom: 12px;
145+// Save sits under the controls, on their edge.
146+#{$admin} .srv-save {
147+ margin: 0;
148+ padding: 14px 18px 16px calc(18px + 210px + 16px);
149+}
150+
151+@media (max-width: 700px) {
152+ #{$admin} .srv-row {
153+ grid-template-columns: minmax(0, 1fr);
154+ row-gap: 6px;
155+ padding: 10px 14px;
156+ }
157+
158+ #{$admin} .srv-save {
159+ padding-left: 14px;
160+ }
140161 }
141162
142163 // The server form takes the sheet's width, so its rows reach the same edge as the topic rules.
@@ -215,3 +236,73 @@ $repo: 'main:has(> section.repo-head .tab.active[href$="/settings"])';
215236 display: none;
216237 }
217238 }
239+
240+// Health: the verdict leads the head's line with its dot.
241+.head-sub .health-sum::before {
242+ content: "";
243+ display: inline-block;
244+ width: 8px;
245+ height: 8px;
246+ margin: 0 8px 1px 0;
247+ border-radius: 50%;
248+ background: var(--ok);
249+ vertical-align: middle;
250+}
251+
252+.head-sub .health-sum.bad::before {
253+ background: var(--bad);
254+}
255+
256+// An alert's note belongs to its line: no hairline between them, the hairline closes the pair.
257+#{$admin} .sec[role="alert"] > .line:has(+ .hint) {
258+ border-bottom: 0;
259+}
260+
261+#{$admin} .sec[role="alert"] > .line + .hint {
262+ margin-top: -8px;
263+ padding-bottom: 10px;
264+ border-bottom: 1px solid var(--border);
265+}
266+
267+// A wide window holds Storage and Services side by side under the alerts, so the page needs no scroll.
268+@media (min-width: 1000px) {
269+ .health-sheet {
270+ display: grid;
271+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
272+ align-items: start;
273+ }
274+
275+ .health-sheet > .sec[role="alert"] {
276+ grid-column: 1 / -1;
277+ }
278+
279+ .sheet.health-sheet > .sec + .sec {
280+ border-top: 0;
281+ }
282+
283+ .sheet.health-sheet > .sec[role="alert"] ~ .sec {
284+ border-top: 1px solid var(--border);
285+ }
286+
287+ .sheet.health-sheet > .sec:last-child {
288+ align-self: stretch;
289+ border-left: 1px solid var(--border);
290+ }
291+}
292+
293+// A runner's recent jobs scroll in their own pane under the tabs, so the Jobs tab fits the window.
294+// The pane reaches the sheet's edges, as its rows do.
295+#{$admin} .runner-recent {
296+ max-height: calc(100dvh - 430px);
297+ min-height: 140px;
298+ margin: 0 -18px -14px;
299+ overflow-y: auto;
300+
301+ > .line {
302+ padding: 8px 18px;
303+ }
304+
305+ > .line:last-child {
306+ border-bottom: 0;
307+ }
308+}
style/_one_ci.scssmodified+108 -0
@@ -248,3 +248,111 @@ main:has(> .ci-job) > .sheet {
248248 .ci-tl-panel-timeline .ci-job-item .ci-job-line {
249249 flex: 0 1 auto;
250250 }
251+
252+// A run's title is its commit subject: one line, cut with an ellipsis, whole on hover.
253+.head-sub .b[data-run] {
254+ display: inline-block;
255+ max-width: min(60ch, 100%);
256+ overflow: hidden;
257+ text-overflow: ellipsis;
258+ white-space: nowrap;
259+ vertical-align: bottom;
260+}
261+
262+// The timeline is drawn on 640 units with text of the page's size: at 640px its labels match the page's
263+// text, so it stops growing there instead of filling a wide window.
264+.ci-gantt {
265+ max-width: 640px;
266+}
267+
268+// The log search's match count takes room only once there is a count to show.
269+.ci-logcount:empty {
270+ display: none;
271+}
272+
273+// The timeline tab: its parts keep their own heights in the scrolling panel (the chart had shrunk to
274+// nothing), start on the sheet's inset, and every action sits on the left with the rest.
275+.ci-tl-panel-timeline {
276+ padding: 12px 18px;
277+
278+ > * {
279+ flex: none;
280+ }
281+
282+ .ci-job-head {
283+ justify-content: flex-start;
284+ margin: 12px 0 4px -10px;
285+ }
286+
287+ // A job's last log line reads as the start of its output: on the name's edge, not centred.
288+ .ci-job-last {
289+ justify-content: flex-start;
290+ align-self: stretch;
291+ padding-left: 26px;
292+ font-family: var(--mono);
293+ font-size: 13px;
294+ }
295+
296+ .ci-job-last-text {
297+ overflow: hidden;
298+ text-overflow: ellipsis;
299+ }
300+}
301+
302+// The run's commit history under the timeline: one caption line (how many commits, what a bar's
303+// height means), then the bars, each a narrow column in the CI colour of its commit, from the left.
304+.ci-tl-panel-timeline .ci-dock,
305+.ci-job .ci-dock {
306+ display: flex;
307+ flex-direction: row;
308+ flex-wrap: wrap;
309+ align-items: baseline;
310+ column-gap: 6px;
311+ height: auto;
312+ padding: 14px 0 4px;
313+
314+ > .hint {
315+ order: 2;
316+ margin: 0;
317+
318+ &::before {
319+ content: "· ";
320+ }
321+ }
322+
323+ .dock-history,
324+ .history-strip {
325+ display: contents;
326+ }
327+
328+ .history-label {
329+ order: 1;
330+ position: static;
331+ width: auto;
332+ height: auto;
333+ clip-path: none;
334+ margin: 0;
335+ font-family: var(--font);
336+ font-size: 13px;
337+ letter-spacing: 0;
338+ text-transform: none;
339+ line-height: 18px;
340+ }
341+
342+ .history-bars {
343+ order: 3;
344+ flex: 0 0 100%;
345+ justify-content: flex-start;
346+ height: 48px;
347+ margin-top: 10px;
348+ gap: 3px;
349+
350+ > a {
351+ flex: 0 0 14px;
352+ }
353+ }
354+}
355+
356+.ci-job .ci-dock {
357+ padding: 12px 18px;
358+}
style/_one_threads.scssmodified+21 -0
@@ -302,3 +302,24 @@
302302 }
303303 }
304304 }
305+
306+// A comment's own actions are one row under it: its reactions, then Edit and Delete.
307+article.thread-entry:has(> .reactions + .acts) {
308+ display: grid;
309+ grid-template-columns: auto minmax(0, 1fr);
310+ align-items: center;
311+ column-gap: 4px;
312+
313+ > * {
314+ grid-column: 1 / -1;
315+ min-width: 0;
316+ }
317+
318+ > .reactions {
319+ grid-column: 1;
320+ }
321+
322+ > .reactions + .acts {
323+ grid-column: 2;
324+ }
325+}
style/_timeline.scssmodified+7 -1
@@ -120,7 +120,13 @@ body:has(.repo-home) .site-footer {
120120 opacity: 0.42;
121121 }
122122
123- // A failure and the running commit are the only bars at full strength.
123+ // A bar has its commit's CI colour: passed is the ok colour, softer, so a failure and the running
124+ // commit stand out at full strength.
125+ > a.hs-ok {
126+ background: var(--ok);
127+ opacity: 0.5;
128+ }
129+
124130 > a.hs-bad {
125131 background: var(--bad);
126132 opacity: 1;
style/main.scssmodified+3 -2
@@ -3956,9 +3956,10 @@ span.reaction {
39563956 vertical-align: middle;
39573957 }
39583958
3959+ // Passed is the ok colour everywhere CI draws a state: the ticks, the steps and this pill.
39593960 &.ci-success {
3960- background: var(--public-bg);
3961- color: var(--public-text);
3961+ background: color-mix(in srgb, var(--ok) 14%, transparent);
3962+ color: var(--ok);
39623963 }
39633964
39643965 &.ci-queued,