@basaltkit/deploy-ui 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/client/app.js +23 -0
- package/dist/client/dom.js +2 -0
- package/dist/client/icons.js +4 -0
- package/dist/client/view-commits.js +89 -0
- package/dist/client/view-history.js +95 -8
- package/dist/client/view-plan.js +17 -0
- package/dist/client/view-run.js +10 -4
- package/dist/page.d.ts +1 -1
- package/dist/page.js +63 -0
- package/dist/server.js +19 -0
- package/dist/ssh.d.ts +6 -2
- package/dist/ssh.js +16 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -95,14 +95,16 @@ since then, nothing is sent, and the page shows the new values.
|
|
|
95
95
|
|
|
96
96
|
Per target: **check the connection**; **status** (current release, process,
|
|
97
97
|
lock, active and last run, a hold); **plan** (findings, what a run would do, the
|
|
98
|
-
questions it would ask); the **`.env` form** (secrets in password fields, never
|
|
98
|
+
questions it would ask, and the commits that will go out); the **`.env` form** (secrets in password fields, never
|
|
99
99
|
stored, emptied after sending); **deploy** — detached by default, so a closed
|
|
100
100
|
laptop lid does not stop it, or attended; the **live log**, which re-attaches
|
|
101
101
|
after a dropped connection without a gap or a duplicate (even one cut
|
|
102
102
|
mid-line); **cancel** (a second cancel, separately confirmed, stops it at
|
|
103
103
|
once; the server decides which one it is, so a cancel already sent from a
|
|
104
104
|
terminal counts); **rollback**, to the last
|
|
105
|
-
healthy release or one picked from **history** (the last 10 releases
|
|
105
|
+
healthy release or one picked from **history** (the last 10 releases, each
|
|
106
|
+
with its subject and, one click away, the commits it brought in), with the
|
|
107
|
+
commits that would leave production listed before you confirm; and
|
|
106
108
|
"Write .env only" for a first setup.
|
|
107
109
|
|
|
108
110
|
Each action is one `ssh` invocation of the app's own, lockfile-pinned
|
package/dist/client/app.js
CHANGED
|
@@ -37,6 +37,10 @@ export class App {
|
|
|
37
37
|
statusBusy = false;
|
|
38
38
|
planBusy = false;
|
|
39
39
|
stopped = false;
|
|
40
|
+
/** The rollback target each previewed rollback showed, by run id: the run says when the deploy chose another. */
|
|
41
|
+
previewedRollbacks = new Map();
|
|
42
|
+
/** The commits between two releases never change: read once per target and pair. */
|
|
43
|
+
ranges = new Map();
|
|
40
44
|
constructor(api, shell, storage) {
|
|
41
45
|
this.api = api;
|
|
42
46
|
this.shell = shell;
|
|
@@ -201,6 +205,25 @@ export class App {
|
|
|
201
205
|
if (this.current?.name === t.name)
|
|
202
206
|
this.refresh();
|
|
203
207
|
}
|
|
208
|
+
/** The commits between two releases of the current target (read-only on the server). */
|
|
209
|
+
commits(from, to) {
|
|
210
|
+
const t = this.current;
|
|
211
|
+
const key = `${t.name}\u0000${from}\u0000${to}`;
|
|
212
|
+
let reply = this.ranges.get(key);
|
|
213
|
+
if (!reply) {
|
|
214
|
+
reply = this.api.post('commits', { target: t.name, from, to });
|
|
215
|
+
// A failure is not remembered: the next click asks again.
|
|
216
|
+
reply.then((r) => { if (!r.ok)
|
|
217
|
+
this.ranges.delete(key); }, () => this.ranges.delete(key));
|
|
218
|
+
this.ranges.set(key, reply);
|
|
219
|
+
}
|
|
220
|
+
return reply;
|
|
221
|
+
}
|
|
222
|
+
/** What a rollback would take out of production, now (never cached: the releases move). */
|
|
223
|
+
rollbackPreview(to) {
|
|
224
|
+
const t = this.current;
|
|
225
|
+
return this.api.post('commits', { target: t.name, rollback: true, ...(to ? { to } : {}) });
|
|
226
|
+
}
|
|
204
227
|
/** A run to watch: a new view, attached from the seq this tab last saw (or 0). */
|
|
205
228
|
watch(runId, title, fromStart = false) {
|
|
206
229
|
if (this.run?.runId === runId && !this.run.ended && this.run.following) {
|
package/dist/client/dom.js
CHANGED
|
@@ -24,6 +24,8 @@ export function el(tag, props = {}, ...children) {
|
|
|
24
24
|
node.required = true;
|
|
25
25
|
if (props.hidden)
|
|
26
26
|
node.hidden = true;
|
|
27
|
+
if (props.colspan !== undefined)
|
|
28
|
+
node.setAttribute('colspan', String(props.colspan));
|
|
27
29
|
if (props.spellcheck !== undefined)
|
|
28
30
|
node.spellcheck = props.spellcheck;
|
|
29
31
|
for (const [key, value] of Object.entries(props.aria ?? {}))
|
package/dist/client/icons.js
CHANGED
|
@@ -25,6 +25,10 @@ const PATHS = {
|
|
|
25
25
|
refresh: 'M20 11a8 8 0 0 0-14.6-4.5M4 3v4h4M4 13a8 8 0 0 0 14.6 4.5M20 21v-4h-4',
|
|
26
26
|
inbox: 'M3 13l3-8h12l3 8v6H3zM3 13h5l1.5 2h5L16 13h5',
|
|
27
27
|
tag: 'M3 12V4h8l10 10-8 8zM7.5 8h.01',
|
|
28
|
+
chevron: 'M9 6l6 6-6 6',
|
|
29
|
+
arrow: 'M5 12h14M13 6l6 6-6 6',
|
|
30
|
+
commit: 'M12 8.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7zM3 12h5.5M15.5 12H21',
|
|
31
|
+
merge: 'M7 4v10M7 14a3 3 0 1 0 0 6 3 3 0 1 0 0-6zM17 4a3 3 0 1 0 0 6 3 3 0 1 0 0-6zM17 10c0 4-4 6-10 6',
|
|
28
32
|
};
|
|
29
33
|
const SVG = 'http://www.w3.org/2000/svg';
|
|
30
34
|
export function icon(name, className = 'icon') {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { el } from './dom.js';
|
|
2
|
+
import { icon } from './icons.js';
|
|
3
|
+
import { clean, short } from './sanitize.js';
|
|
4
|
+
/**
|
|
5
|
+
* The commit lists (RFC 0009 §7): what a run would deploy, what a release
|
|
6
|
+
* changed, what a rollback would take out. Every field is the author's text
|
|
7
|
+
* — rendered as text nodes only, cleaned again here, never a link. A list
|
|
8
|
+
* that is missing or unavailable is said so and never disables an action.
|
|
9
|
+
*/
|
|
10
|
+
/** Fixed local text for each reason: the server's wording never reaches the page. */
|
|
11
|
+
const REASONS = {
|
|
12
|
+
'skipped': 'the fetch is skipped, so a run deploys the commit already checked out',
|
|
13
|
+
'not-fetched': 'the server could not fetch the branch from its remote',
|
|
14
|
+
'no-previous': 'there is no earlier release to compare with',
|
|
15
|
+
'missing-commit': 'a commit is not in the server\'s checkout (rewritten history, or never fetched there)',
|
|
16
|
+
'shallow': 'the server\'s checkout is a shallow clone, so its history is incomplete',
|
|
17
|
+
'unrelated': 'the two commits share no history',
|
|
18
|
+
'timeout': 'git took too long on the server',
|
|
19
|
+
'too-large': 'git\'s answer was too large',
|
|
20
|
+
'malformed': 'git\'s answer could not be read',
|
|
21
|
+
'git-failed': 'git failed on the server',
|
|
22
|
+
};
|
|
23
|
+
export function reasonText(reason) {
|
|
24
|
+
return typeof reason === 'string' && Object.hasOwn(REASONS, reason) ? REASONS[reason] : 'the server gave no usable reason';
|
|
25
|
+
}
|
|
26
|
+
/** A shape check: anything from the server that is not a list of commits is "unavailable", never a crash. */
|
|
27
|
+
export function validCommits(value) {
|
|
28
|
+
if (typeof value !== 'object' || value === null)
|
|
29
|
+
return false;
|
|
30
|
+
const c = value;
|
|
31
|
+
if (c['ok'] === false)
|
|
32
|
+
return true;
|
|
33
|
+
const r = c['range'];
|
|
34
|
+
return c['ok'] === true && typeof r === 'object' && r !== null && Array.isArray(r['added']) && Array.isArray(r['removed'])
|
|
35
|
+
&& typeof r['addedTotal'] === 'number' && typeof r['removedTotal'] === 'number' && typeof r['from'] === 'string' && typeof r['to'] === 'string';
|
|
36
|
+
}
|
|
37
|
+
/** Why there is no list: a quiet note, never an error the operator must clear. */
|
|
38
|
+
export function unavailable(text) {
|
|
39
|
+
return el('div', { class: 'commits-note' }, icon('info'), el('span', {}, el('strong', {}, 'Commit list unavailable'), ` — ${text}.`));
|
|
40
|
+
}
|
|
41
|
+
/** `1 Oct 2026, 10:00` in the operator's locale; the exact time in the tooltip. */
|
|
42
|
+
function date(at) {
|
|
43
|
+
if (typeof at !== 'string')
|
|
44
|
+
return null;
|
|
45
|
+
const parsed = new Date(at);
|
|
46
|
+
if (Number.isNaN(parsed.getTime()))
|
|
47
|
+
return null;
|
|
48
|
+
return el('time', { title: clean(at) }, parsed.toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' }));
|
|
49
|
+
}
|
|
50
|
+
function commitItem(c) {
|
|
51
|
+
const subject = clean(c.subject);
|
|
52
|
+
const author = clean(c.author);
|
|
53
|
+
return el('li', { class: c.merge ? 'commit is-merge' : 'commit' }, el('span', { class: 'commit-dot', aria: { hidden: 'true' } }), el('code', { class: 'commit-sha', title: short(c.sha) }, short(c.sha).slice(0, 7)), el('span', { class: 'commit-subject', title: subject }, c.merge ? icon('merge', 'icon commit-merge') : null, subject || el('span', { class: 'muted' }, '(no subject)')), el('span', { class: 'commit-meta' }, author ? el('span', { class: 'commit-author' }, author) : null, date(c.at)));
|
|
54
|
+
}
|
|
55
|
+
/** The most commits the server sends per list (COMMITS_LIMIT): the page imports no code from the deploy package. */
|
|
56
|
+
const LIST_LIMIT = 50;
|
|
57
|
+
/** One side of a range: a heading with its sign and count, the commits newest first, and what the cap left out. */
|
|
58
|
+
export function commitGroup(tone, label, list, total) {
|
|
59
|
+
return el('section', { class: `commit-group commit-group-${tone}`, aria: { label: `${label}: ${total}` } }, el('header', { class: 'commit-group-head' }, el('span', { class: 'commit-sign', aria: { hidden: 'true' } }, tone === 'added' ? '+' : '−'), el('span', { class: 'commit-group-title' }, label), el('span', { class: 'commit-count' }, String(total))), el('ol', { class: 'commit-list' }, ...list.map(commitItem)), total > list.length ? el('p', { class: 'commit-more' }, `+ ${total - list.length} older commit${total - list.length === 1 ? '' : 's'} not shown — the server sends at most ${LIST_LIMIT} per list.`) : null);
|
|
60
|
+
}
|
|
61
|
+
/** `abc1234 → def5678`, for a card's head. */
|
|
62
|
+
export function rangeSpan(range) {
|
|
63
|
+
return el('span', { class: 'commit-span' }, el('code', {}, short(range.from).slice(0, 7)), icon('arrow'), el('code', {}, short(range.to).slice(0, 7)));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Both sides of a range, under their labels, or why there are none. An
|
|
67
|
+
* absent field (an older deploy on the server) is said plainly too.
|
|
68
|
+
*/
|
|
69
|
+
export function commitsBlock(value, labels, order = ['added', 'removed']) {
|
|
70
|
+
if (value === undefined)
|
|
71
|
+
return unavailable('the server\'s @basaltkit/deploy is older than the commit lists');
|
|
72
|
+
if (!validCommits(value))
|
|
73
|
+
return unavailable('the server\'s answer could not be read');
|
|
74
|
+
if (!value.ok)
|
|
75
|
+
return unavailable(reasonText(value.reason));
|
|
76
|
+
const r = value.range;
|
|
77
|
+
if (r.addedTotal === 0 && r.removedTotal === 0)
|
|
78
|
+
return el('div', { class: 'commits-note is-ok' }, icon('ok'), el('span', {}, labels.same));
|
|
79
|
+
const groups = {
|
|
80
|
+
added: r.addedTotal > 0 ? commitGroup('added', labels.added, r.added, r.addedTotal) : null,
|
|
81
|
+
removed: r.removedTotal > 0 ? commitGroup('removed', labels.removed, r.removed, r.removedTotal) : null,
|
|
82
|
+
};
|
|
83
|
+
return el('div', { class: 'commits' }, ...order.map((tone) => groups[tone]));
|
|
84
|
+
}
|
|
85
|
+
/** A compact list for a confirmation dialog: at most `max` commits, then how many more. */
|
|
86
|
+
export function commitSummary(tone, label, list, total, max = 8) {
|
|
87
|
+
const shown = list.slice(0, max);
|
|
88
|
+
return el('span', { class: `commit-summary commit-group-${tone}` }, el('span', { class: 'commit-summary-head' }, el('span', { class: 'commit-sign', aria: { hidden: 'true' } }, tone === 'added' ? '+' : '−'), `${label} `, el('span', { class: 'commit-count' }, String(total))), ...shown.map((c) => el('span', { class: 'commit-summary-row' }, el('code', { class: 'commit-sha' }, short(c.sha).slice(0, 7)), el('span', { class: 'commit-subject' }, clean(c.subject)))), total > shown.length ? el('span', { class: 'commit-more' }, `and ${total - shown.length} more`) : null);
|
|
89
|
+
}
|
|
@@ -2,33 +2,117 @@ import { confirmDialog } from './dialog.js';
|
|
|
2
2
|
import { button, card, el, emptyState, pageHead, pill, replace, when } from './dom.js';
|
|
3
3
|
import { icon } from './icons.js';
|
|
4
4
|
import { problem } from './reply.js';
|
|
5
|
-
import { short } from './sanitize.js';
|
|
5
|
+
import { clean, short } from './sanitize.js';
|
|
6
|
+
import { commitsBlock, commitSummary, reasonText, unavailable, validCommits } from './view-commits.js';
|
|
6
7
|
/** History: the last 10 releases, and rollback (to the last healthy release, or one picked here). */
|
|
7
8
|
export function renderHistory(app) {
|
|
8
9
|
const status = app.status;
|
|
9
10
|
const releases = status?.releases ?? [];
|
|
10
11
|
const message = el('div', { aria: { live: 'polite' } });
|
|
12
|
+
const preview = el('div', { class: 'rollback-preview', aria: { live: 'polite' } });
|
|
11
13
|
const current = releases.find((r) => r.status === 'ok');
|
|
12
14
|
const choices = releases.filter((r) => r.status === 'ok' && r !== current);
|
|
13
|
-
const select = el('select', { id: 'rollback-to' }, el('option', { value: '' }, 'the last healthy release (the deploy decides)'), ...choices.map((r) => el('option', { value: r.sha }, `${short(r.sha)} — ${when(r.at)}`)));
|
|
14
|
-
return el('section', { aria: { labelledby: 'history-title' } }, pageHead('history-title', 'History', 'The last 10 releases the server recorded, newest first.', el('button', { type: 'button', on: { click: () => { void app.refreshStatus(); } } }, icon('refresh'), 'Refresh')), !status ? emptyState('history', 'Load the status first.', 'The releases come with the status of the target.') : null, releases.length > 0 ? card('Releases', [table(releases)], { bodyClass: 'flush', actions: [el('span', { class: 'muted num' }, `${releases.length} recorded`)] }) : status ? emptyState('inbox', 'No release recorded yet.', 'The first deploy of this target will show here.') : null, status ? card('Roll back', [
|
|
15
|
+
const select = el('select', { id: 'rollback-to', on: { change: () => replace(preview) } }, el('option', { value: '' }, 'the last healthy release (the deploy decides)'), ...choices.map((r) => el('option', { value: r.sha }, `${short(r.sha)} — ${when(r.at)}`)));
|
|
16
|
+
return el('section', { aria: { labelledby: 'history-title' } }, pageHead('history-title', 'History', 'The last 10 releases the server recorded, newest first.', el('button', { type: 'button', on: { click: () => { void app.refreshStatus(); } } }, icon('refresh'), 'Refresh')), !status ? emptyState('history', 'Load the status first.', 'The releases come with the status of the target.') : null, releases.length > 0 ? card('Releases', [table(app, releases, status?.subjects)], { bodyClass: 'flush', actions: [el('span', { class: 'muted num' }, `${releases.length} recorded`)] }) : status ? emptyState('inbox', 'No release recorded yet.', 'The first deploy of this target will show here.') : null, status ? card('Roll back', [
|
|
15
17
|
el('div', { class: 'field' }, el('label', { for: 'rollback-to' }, 'Back to'), select),
|
|
16
18
|
el('p', { class: 'form-note' }, icon('alert'), 'Code only: the database is not rolled back. The commit it leaves is held: a scheduled run will not redeploy it until the branch moves on.'),
|
|
19
|
+
preview,
|
|
17
20
|
message,
|
|
18
|
-
], { foot: [
|
|
21
|
+
], { foot: [
|
|
22
|
+
button('Preview changes', () => { void showPreview(app, select.value, preview); }),
|
|
23
|
+
button('Roll back…', () => { void rollback(app, select.value, message, preview); }, { class: 'danger' }),
|
|
24
|
+
] }) : null);
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
/** The release each row is compared with: the one it was deployed over, else the next older one on record. */
|
|
27
|
+
const previousOf = (releases, index) => releases[index]?.previous || releases[index + 1]?.sha;
|
|
28
|
+
function table(app, releases, subjects) {
|
|
29
|
+
const known = typeof subjects === 'object' && subjects !== null ? subjects : {};
|
|
30
|
+
const columns = ['Commit', 'When', 'Status', 'Actor', 'Via', 'Client', 'Migrations', 'Backup', 'Note'];
|
|
31
|
+
return el('div', { class: 'table-wrap' }, el('table', { class: 'releases' }, el('thead', {}, el('tr', {}, el('th', { scope: 'col', class: 'disclosure' }, el('span', { class: 'visually-hidden' }, 'Changes')), ...columns.map((h) => el('th', { scope: 'col' }, h)))), el('tbody', {}, ...releases.flatMap((r, index) => {
|
|
32
|
+
const from = previousOf(releases, index);
|
|
33
|
+
const detail = el('td', { colspan: columns.length + 1, class: 'release-changes-cell' });
|
|
34
|
+
const detailRow = el('tr', { class: 'release-changes', hidden: true }, detail);
|
|
35
|
+
const toggle = el('button', {
|
|
36
|
+
type: 'button', class: 'disclosure-button', disabled: !from,
|
|
37
|
+
title: from ? `Commits between ${short(from).slice(0, 7)} and ${short(r.sha).slice(0, 7)}` : 'No earlier release to compare with',
|
|
38
|
+
aria: { expanded: 'false', label: from ? `Show the commits of ${short(r.sha).slice(0, 7)}` : 'No earlier release to compare with' },
|
|
39
|
+
on: { click: () => { void toggleChanges(app, from, r.sha, row, detailRow, detail, toggle); } },
|
|
40
|
+
}, icon('chevron'));
|
|
41
|
+
const subject = Object.hasOwn(known, r.sha) ? clean(known[r.sha]) : '';
|
|
42
|
+
const row = el('tr', { class: 'release-row' }, el('td', { class: 'disclosure' }, toggle), el('td', { class: 'release-commit' }, el('code', {}, short(r.sha).slice(0, 7)), subject ? el('span', { class: 'release-subject', title: subject }, subject) : null), el('td', { class: 'nowrap num' }, when(r.at)), el('td', {}, pill(r.status === 'ok' ? 'ok' : 'err', r.status)), el('td', {}, r.actor ?? r.user), el('td', { class: 'muted' }, r.via ?? ''), el('td', { class: 'mono' }, r.client ?? ''), el('td', { class: 'mono wrap' }, r.migrations.join(', ')), el('td', { class: 'mono wrap' }, r.backup ?? ''), el('td', { class: 'wrap' }, r.note ?? ''));
|
|
43
|
+
return [row, detailRow];
|
|
44
|
+
}))));
|
|
22
45
|
}
|
|
23
|
-
|
|
46
|
+
/** The server's answer to `commits`, as a block: an older deploy that does not know the command is said plainly. */
|
|
47
|
+
function commitsReply(reply, labels, order) {
|
|
48
|
+
if (reply.error?.code === 'usage' && /unknown command/.test(clean(reply.error.message)))
|
|
49
|
+
return unavailable('the server\'s @basaltkit/deploy is older than the commit lists');
|
|
50
|
+
if (!reply.ok && !reply.result)
|
|
51
|
+
return problem(reply) ?? unavailable('no answer');
|
|
52
|
+
const result = reply.result;
|
|
53
|
+
return commitsBlock(result?.commits, labels, order);
|
|
54
|
+
}
|
|
55
|
+
async function toggleChanges(app, from, to, row, detailRow, cell, toggle) {
|
|
56
|
+
const open = detailRow.hidden === true;
|
|
57
|
+
detailRow.hidden = !open;
|
|
58
|
+
row.classList.toggle('is-open', open);
|
|
59
|
+
toggle.setAttribute('aria-expanded', String(open));
|
|
60
|
+
if (!open || cell.dataset['loaded'] === 'yes')
|
|
61
|
+
return;
|
|
62
|
+
replace(cell, el('div', { class: 'commits-note' }, icon('refresh'), el('span', {}, 'Reading the commits on the server…')));
|
|
63
|
+
try {
|
|
64
|
+
const reply = await app.commits(from, to);
|
|
65
|
+
replace(cell, commitsReply(reply, { added: 'Brought in', removed: 'Taken out', same: 'The same commit as the release before: nothing changed.' }));
|
|
66
|
+
if (reply.ok)
|
|
67
|
+
cell.dataset['loaded'] = 'yes';
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
replace(cell, problem(undefined, error));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** What `rollback` would take out of production, read now (never from an older status). */
|
|
74
|
+
async function readPreview(app, to) {
|
|
75
|
+
let reply;
|
|
76
|
+
try {
|
|
77
|
+
reply = await app.rollbackPreview(to || undefined);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
return { lines: ['Commit list unavailable: the preview failed — the rollback still works.'], block: problem(undefined, error) ?? unavailable('no answer') };
|
|
81
|
+
}
|
|
82
|
+
const result = reply.result;
|
|
83
|
+
const block = commitsReply(reply, { removed: 'Leaves production', added: 'Comes back (not in the current release)', same: 'Nothing changes.' }, ['removed', 'added']);
|
|
84
|
+
const commits = result?.commits;
|
|
85
|
+
if (!validCommits(commits))
|
|
86
|
+
return { lines: ['Commit list unavailable — the rollback still works.'], block };
|
|
87
|
+
if (!commits.ok)
|
|
88
|
+
return { lines: [`Commit list unavailable: ${reasonText(commits.reason)} — the rollback still works.`], block };
|
|
89
|
+
const r = commits.range;
|
|
90
|
+
return {
|
|
91
|
+
...(typeof result?.to === 'string' ? { to: result.to } : {}),
|
|
92
|
+
block,
|
|
93
|
+
lines: [
|
|
94
|
+
r.removedTotal > 0 ? commitSummary('removed', 'Leaves production', r.removed, r.removedTotal) : 'No commit leaves production.',
|
|
95
|
+
r.addedTotal > 0 ? commitSummary('added', 'Comes back (not in the current release)', r.added, r.addedTotal, 4) : null,
|
|
96
|
+
],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
async function showPreview(app, to, area) {
|
|
100
|
+
replace(area, el('div', { class: 'commits-note' }, icon('refresh'), el('span', {}, 'Reading the commits on the server…')));
|
|
101
|
+
replace(area, (await readPreview(app, to)).block);
|
|
102
|
+
}
|
|
103
|
+
async function rollback(app, to, message, area) {
|
|
24
104
|
const t = app.current;
|
|
25
105
|
if (!t)
|
|
26
106
|
return;
|
|
107
|
+
replace(area, el('div', { class: 'commits-note' }, icon('refresh'), el('span', {}, 'Reading what would leave production…')));
|
|
108
|
+
const preview = await readPreview(app, to);
|
|
109
|
+
replace(area, preview.block);
|
|
27
110
|
const ok = await confirmDialog({
|
|
28
111
|
title: `Roll back ${t.name}?`,
|
|
29
112
|
context: `${t.ssh} · ${t.dir}${app.hello ? ` · host ${app.hello.host}` : ''}`,
|
|
30
113
|
lines: [
|
|
31
|
-
to ? `Back to ${short(to)}.` :
|
|
114
|
+
to ? `Back to ${short(to).slice(0, 7)}.` : `Back to the last healthy release${preview.to ? ` — ${short(preview.to).slice(0, 7)} now` : ''}.`,
|
|
115
|
+
...preview.lines,
|
|
32
116
|
'The commit it leaves is held until the branch moves on.',
|
|
33
117
|
],
|
|
34
118
|
confirmLabel: 'Roll back',
|
|
@@ -40,6 +124,7 @@ async function rollback(app, to, message) {
|
|
|
40
124
|
replace(message, el('p', { class: 'muted' }, 'Starting the rollback…'));
|
|
41
125
|
let reply;
|
|
42
126
|
try {
|
|
127
|
+
// Exactly what it sent before the preview existed: the deploy still decides the target when none was picked.
|
|
43
128
|
reply = await app.api.post('rollback', { target: t.name, confirm: true, confirmedTarget: t, ...(t.protected ? { confirmName: t.name } : {}), ...(to ? { to } : {}) });
|
|
44
129
|
}
|
|
45
130
|
catch (error) {
|
|
@@ -50,6 +135,8 @@ async function rollback(app, to, message) {
|
|
|
50
135
|
const result = reply.result;
|
|
51
136
|
if (reply.ok && result?.runId) {
|
|
52
137
|
replace(message);
|
|
138
|
+
if (preview.to)
|
|
139
|
+
app.previewedRollbacks.set(result.runId, preview.to);
|
|
53
140
|
app.watch(result.runId, `rollback ${result.runId}`);
|
|
54
141
|
return;
|
|
55
142
|
}
|
package/dist/client/view-plan.js
CHANGED
|
@@ -3,6 +3,7 @@ import { append, button, card, el, emptyState, pageHead, replace } from './dom.j
|
|
|
3
3
|
import { icon } from './icons.js';
|
|
4
4
|
import { banner, describe, diagnosticsBlock, problem } from './reply.js';
|
|
5
5
|
import { ApiError } from './api.js';
|
|
6
|
+
import { commitsBlock, rangeSpan, validCommits } from './view-commits.js';
|
|
6
7
|
/** Plan & deploy: what a run would do, the questions it would ask, and the `.env` form. */
|
|
7
8
|
export function renderPlan(app) {
|
|
8
9
|
const reply = app.planReply;
|
|
@@ -19,6 +20,7 @@ export function renderPlan(app) {
|
|
|
19
20
|
return root;
|
|
20
21
|
}
|
|
21
22
|
append(root, ...findings(plan.findings));
|
|
23
|
+
append(root, outgoing(plan.commits));
|
|
22
24
|
if (plan.lines.length > 0) {
|
|
23
25
|
append(root, card('What a run would do', [el('div', { class: 'table-wrap' }, el('table', { class: 'plan-lines' }, el('tbody', {}, ...plan.lines.map((line) => el('tr', {}, el('th', { scope: 'row' }, el('span', { class: 'step-chip' }, line.step)), el('td', {}, line.text))))))], { bodyClass: 'flush' }));
|
|
24
26
|
}
|
|
@@ -27,6 +29,21 @@ export function renderPlan(app) {
|
|
|
27
29
|
append(root, deployForm(app, plan.questions, plan.blocking));
|
|
28
30
|
return root;
|
|
29
31
|
}
|
|
32
|
+
/** What a run would deploy: HEAD on the server to the branch's tip on its remote. */
|
|
33
|
+
function outgoing(commits) {
|
|
34
|
+
const range = validCommits(commits) && commits.ok ? commits.range : undefined;
|
|
35
|
+
const summary = !range ? null
|
|
36
|
+
: range.relation === 'ahead' ? `${range.addedTotal} commit${range.addedTotal === 1 ? '' : 's'}`
|
|
37
|
+
: range.relation === 'diverged' ? `${range.addedTotal} new · ${range.removedTotal} only on the server`
|
|
38
|
+
: range.relation === 'behind' ? `${range.removedTotal} behind`
|
|
39
|
+
: null;
|
|
40
|
+
return card('What will go out', [
|
|
41
|
+
range?.relation === 'diverged' ? banner('warn', 'The branch was rewritten on the remote', ['A run refuses it: its merge is fast-forward only. The commits only on the server would be lost.']) : null,
|
|
42
|
+
range?.relation === 'behind' ? banner('warn', 'The remote\'s branch is behind the server', ['A run refuses it: its merge is fast-forward only.']) : null,
|
|
43
|
+
range?.held ? banner('warn', 'This commit is held by a rollback', ['A run refuses it unless you deploy anyway (--unhold).']) : null,
|
|
44
|
+
commitsBlock(commits, { added: 'Goes out', removed: 'Only on the server', same: 'Nothing new — the server already runs the tip of the branch.' }),
|
|
45
|
+
], { actions: range && range.relation !== 'same' ? [summary ? el('span', { class: 'muted' }, summary) : null, rangeSpan(range)] : [] });
|
|
46
|
+
}
|
|
30
47
|
function findings(list) {
|
|
31
48
|
if (list.length === 0)
|
|
32
49
|
return [banner('ok', 'No problem found.')];
|
package/dist/client/view-run.js
CHANGED
|
@@ -186,7 +186,7 @@ export class RunView {
|
|
|
186
186
|
case 'prompt':
|
|
187
187
|
return this.line('warn', `the deploy asks: ${event.message} (answer it in the form and run again)`);
|
|
188
188
|
case 'result':
|
|
189
|
-
this.outcome.append(resultBanner(event.command, event.data));
|
|
189
|
+
this.outcome.append(resultBanner(event.command, event.data, this.runId ? this.app.previewedRollbacks.get(this.runId) : undefined));
|
|
190
190
|
return;
|
|
191
191
|
case 'error':
|
|
192
192
|
this.lastError = event;
|
|
@@ -319,7 +319,7 @@ export class RunView {
|
|
|
319
319
|
this.outcome.append(problem(reply));
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
function resultBanner(command, data) {
|
|
322
|
+
function resultBanner(command, data, previewed) {
|
|
323
323
|
const d = (data ?? {});
|
|
324
324
|
if (command === 'run') {
|
|
325
325
|
return banner(d['status'] === 'ok' ? 'ok' : 'err', `Release ${clean(d['sha']).slice(0, 12)}: ${clean(d['status'])}`, [
|
|
@@ -328,8 +328,14 @@ function resultBanner(command, data) {
|
|
|
328
328
|
d['note'] ? clean(d['note']) : '',
|
|
329
329
|
]);
|
|
330
330
|
}
|
|
331
|
-
if (command === 'rollback')
|
|
332
|
-
|
|
331
|
+
if (command === 'rollback') {
|
|
332
|
+
const to = clean(d['to']);
|
|
333
|
+
return banner(d['status'] === 'ok' ? 'ok' : 'err', `Rolled back to ${to.slice(0, 12)}: ${clean(d['status'])}`, [
|
|
334
|
+
`${clean(d['held']).slice(0, 12)} is held`,
|
|
335
|
+
// The releases moved between the preview and the run: say which commit the deploy chose.
|
|
336
|
+
previewed && to && previewed !== to ? el('strong', {}, `The deploy chose ${to.slice(0, 12)}, not ${clean(previewed).slice(0, 12)} the preview showed: open History to see what changed.`) : '',
|
|
337
|
+
]);
|
|
338
|
+
}
|
|
333
339
|
if (command === 'env') {
|
|
334
340
|
const changes = Array.isArray(d['changes']) ? d['changes'] : [];
|
|
335
341
|
return banner('ok', `.env written (${changes.length} change${changes.length === 1 ? '' : 's'})`, changes.map((c) => `${clean(c['kind'])} ${clean(c['key'])}: ${clean(c['reason'])}`));
|
package/dist/page.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* one module script is `/client/main.js`, compiled by tsc from `src/client`.
|
|
5
5
|
*/
|
|
6
6
|
export declare const INDEX_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"referrer\" content=\"no-referrer\">\n<meta name=\"color-scheme\" content=\"light dark\">\n<title>Basalt deploy</title>\n<link rel=\"stylesheet\" href=\"/app.css\">\n<script type=\"module\" src=\"/client/main.js\"></script>\n</head>\n<body>\n<div class=\"shell\">\n<aside class=\"sidebar\">\n <h1 class=\"brand\">\n <svg class=\"brand-mark\" viewBox=\"40 40 120 120\" width=\"28\" height=\"28\" aria-hidden=\"true\" focusable=\"false\">\n <g stroke=\"#0B0E13\" stroke-width=\"3\" stroke-linejoin=\"round\">\n <polygon points=\"52.37,72.5 100,45 147.63,72.5 100,100\" fill=\"#8B9AA7\"/>\n <polygon points=\"52.37,72.5 100,100 100,155 52.37,127.5\" fill=\"#2C3843\"/>\n <polygon points=\"100,100 147.63,72.5 147.63,127.5 100,155\" fill=\"#FF5A1F\"/>\n </g>\n <line x1=\"100\" y1=\"100\" x2=\"100\" y2=\"155\" stroke=\"#FFB347\" stroke-width=\"4\" stroke-linecap=\"round\"/>\n </svg>\n <span class=\"brand-text\"><span class=\"brand-name\">Basalt</span> <span class=\"brand-sub\">Deploy</span></span>\n </h1>\n <nav id=\"nav\" class=\"nav\" aria-label=\"Screens\"></nav>\n <div class=\"sidebar-foot\">\n <p class=\"local-note\" title=\"Local only: this page talks to 127.0.0.1, which talks to your servers over your own ssh.\">\n <svg class=\"icon\" viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M6 11h12v10H6zM8 11V7a4 4 0 0 1 8 0v4\"/></svg>\n <span>Local only <span aria-hidden=\"true\">\u00B7</span> <span class=\"mono\">127.0.0.1</span></span>\n </p>\n <div id=\"session\" class=\"session\"></div>\n </div>\n</aside>\n<div class=\"main-col\">\n <div id=\"target-bar\" class=\"target-bar\" aria-live=\"polite\"></div>\n <main id=\"app\" class=\"app\">\n <p class=\"muted\">Starting\u2026</p>\n <noscript><p>This UI needs JavaScript (its own module only; nothing is loaded from elsewhere).</p></noscript>\n </main>\n</div>\n</div>\n</body>\n</html>\n";
|
|
7
|
-
export declare const APP_CSS = "/* Basalt deploy: an operations console. Graphite neutrals, one molten accent used sparingly. */\n:root {\n color-scheme: light dark;\n --font-sans: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n --font-mono: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-base: 14px; --fs-lg: 16px; --fs-xl: 20px;\n --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;\n --radius: 8px; --radius-sm: 6px; --radius-xs: 4px;\n --control-h: 32px;\n --sidebar-w: 240px;\n\n --bg: #f5f6f8;\n --surface: #ffffff;\n --surface-2: #f9fafb;\n --surface-3: #f0f2f5;\n --border: #e2e6eb;\n --border-strong: #cdd3da;\n --text: #0f141a;\n --text-2: #2c3843;\n --muted: #5b6672;\n --faint: #8a949f;\n\n --molten: #ff5a1f;\n --accent-text: #b93a0a;\n --accent-soft: #fff1ea;\n --primary-bg: #c93f0b;\n --primary-bg-hover: #b23708;\n --primary-fg: #ffffff;\n\n --ok: #157f3b; --ok-soft: #e8f5ec; --ok-line: #b7dfc4;\n --warn: #9a6200; --warn-soft: #fdf4e1; --warn-line: #f0d39a;\n --err: #c4271d; --err-soft: #fdecea; --err-line: #f3bdb8;\n --info: #44546a; --info-soft: #eef1f5; --info-line: #cfd7e1;\n --protected-bg: #b42318; --protected-fg: #ffffff;\n\n --term-bg: #0d1117; --term-border: #0d1117; --term-fg: #c9d1d9; --term-muted: #8b949e; --term-ts: #7d8590;\n --term-warn: #e3b341; --term-err: #ff7b72; --term-ok: #56d364; --term-warn-bg: rgb(227 179 65 / 0.08); --term-err-bg: rgb(255 123 114 / 0.10);\n\n --shadow-sm: 0 1px 2px rgb(15 20 26 / 0.05);\n --shadow-md: 0 1px 2px rgb(15 20 26 / 0.06), 0 4px 12px rgb(15 20 26 / 0.06);\n --shadow-lg: 0 2px 6px rgb(15 20 26 / 0.08), 0 24px 48px rgb(15 20 26 / 0.18);\n --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--molten);\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --bg: #0b0e13;\n --surface: #121820;\n --surface-2: #0f141b;\n --surface-3: #18202a;\n --border: #232c36;\n --border-strong: #2f3a46;\n --text: #e6eaef;\n --text-2: #c3cad3;\n --muted: #95a1ae;\n --faint: #6b7784;\n\n --accent-text: #ff8a5c;\n --accent-soft: rgb(255 90 31 / 0.12);\n --primary-bg: #ff5a1f;\n --primary-bg-hover: #ff7340;\n --primary-fg: #0b0e13;\n\n --ok: #3fcf79; --ok-soft: rgb(63 207 121 / 0.10); --ok-line: rgb(63 207 121 / 0.32);\n --warn: #f2b13d; --warn-soft: rgb(242 177 61 / 0.10); --warn-line: rgb(242 177 61 / 0.32);\n --err: #ff6b5e; --err-soft: rgb(255 107 94 / 0.10); --err-line: rgb(255 107 94 / 0.34);\n --info: #9aa8b8; --info-soft: rgb(154 168 184 / 0.10); --info-line: rgb(154 168 184 / 0.28);\n --protected-bg: #b42318; --protected-fg: #ffffff;\n\n --term-bg: #07090c; --term-border: #232c36;\n\n --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);\n --shadow-md: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3);\n --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.5), 0 24px 48px rgb(0 0 0 / 0.55);\n }\n}\n\n/* Base */\n*, *::before, *::after { box-sizing: border-box; }\nhtml, body { margin: 0; background: var(--bg); color: var(--text); }\nbody { font: var(--fs-base)/20px var(--font-sans); -webkit-font-smoothing: antialiased; font-feature-settings: \"cv11\", \"ss01\"; text-rendering: optimizeLegibility; }\nh1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }\nh2 { font-size: var(--fs-xl); line-height: 28px; letter-spacing: -0.015em; }\nh3 { font-size: var(--fs-base); line-height: 20px; }\np { margin: 0; }\np + p { margin-top: var(--sp-2); }\na { color: var(--accent-text); }\n.muted { color: var(--muted); }\n.mono, code, kbd, pre { font-family: var(--font-mono); font-size: 12.5px; }\ncode { background: var(--surface-3); border: 1px solid var(--border); padding: 0 5px; border-radius: var(--radius-xs); overflow-wrap: anywhere; color: var(--text-2); line-height: 18px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }\n.num, time { font-variant-numeric: tabular-nums; }\n.section-label { display: block; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.hidden { display: none !important; }\n.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }\n::selection { background: rgb(255 90 31 / 0.22); }\n\n/* Shell */\n.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px) var(--sidebar-w), transparent var(--sidebar-w)); }\n.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-4) var(--sp-3); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }\n.brand { display: flex; align-items: center; gap: 10px; padding: var(--sp-1) var(--sp-2); font-size: var(--fs-base); }\n.brand-mark { flex: none; }\n.brand-text { display: flex; flex-direction: column; line-height: 1.15; }\n.brand-name { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }\n.brand-sub { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }\n.nav { display: flex; flex-direction: column; gap: var(--sp-5); }\n.nav-target { display: grid; gap: 6px; padding: 0 var(--sp-2); }\n.nav-target .section-label { padding: 0; }\n.nav-list { display: flex; flex-direction: column; gap: 2px; }\n.nav .nav-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-weight: 500; text-align: left; justify-content: flex-start; position: relative; box-shadow: none; }\n.nav .nav-item .icon { color: var(--faint); }\n.nav .nav-item:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }\n.nav .nav-item:hover .icon { color: var(--text-2); }\n.nav .nav-item[aria-current=\"page\"] { background: var(--surface-3); color: var(--text); font-weight: 600; }\n.nav .nav-item[aria-current=\"page\"] .icon { color: var(--molten); }\n.nav .nav-item[aria-current=\"page\"]::before { content: \"\"; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--molten); }\n.sidebar-foot { margin-top: auto; display: grid; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2) 0; border-top: 1px solid var(--border); }\n.local-note { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }\n.local-note .mono { font-size: var(--fs-sm); }\n.session:empty { display: none; }\n.session button { width: 100%; justify-content: flex-start; }\n\n.main-col { min-width: 0; display: flex; flex-direction: column; }\n.app { width: 100%; max-width: 1200px; padding: var(--sp-5) var(--sp-6) var(--sp-7); }\n.app > section > * + * { margin-top: var(--sp-4); }\n\n/* Context strip: which target every screen acts on */\n.target-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-3); min-height: 52px; padding: 10px var(--sp-6); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); font-size: var(--fs-md); }\n.target-bar:empty { display: none; }\n.target-bar.is-protected { box-shadow: inset 0 3px 0 var(--protected-bg); }\n.ctx-target { display: inline-flex; align-items: center; gap: var(--sp-2); }\n.ctx-name { font-size: var(--fs-base); font-weight: 600; letter-spacing: -0.01em; }\n.ctx-sep { display: inline-block; width: 1px; height: 16px; background: var(--border-strong); font-size: 0; line-height: 0; overflow: hidden; color: transparent; }\n.ctx-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); min-width: 0; }\n.ctx-item .icon { color: var(--faint); flex: none; }\n.ctx-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.ctx-val { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }\n.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.05em; line-height: 1; white-space: nowrap; }\n.badge .icon { width: 12px; height: 12px; }\n.badge-protected { background: var(--protected-bg); color: var(--protected-fg); box-shadow: 0 0 0 3px rgb(180 35 24 / 0.16); }\n.badge-neutral { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }\n\n/* Page header */\n.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-3) var(--sp-4); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }\n.app > section > .page-head + * { margin-top: 0; }\n.page-title { min-width: 0; display: grid; gap: var(--sp-1); }\n.page-title h2 { overflow-wrap: anywhere; }\n.page-title h2.mono-title { font-family: var(--font-mono); font-size: 18px; letter-spacing: -0.01em; font-weight: 600; }\n.page-sub { color: var(--muted); max-width: 72ch; }\n.page-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }\n\n/* Buttons */\nbutton, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h); padding: 0 12px; font: 500 var(--fs-base)/1 var(--font-sans); white-space: nowrap; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease; }\nbutton:hover { background: var(--surface-3); border-color: var(--border-strong); }\nbutton:active { transform: translateY(0.5px); }\nbutton:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }\nbutton .icon { flex: none; }\nbutton.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); font-weight: 600; box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / 0.12); }\nbutton.primary:hover { background: var(--primary-bg-hover); border-color: var(--primary-bg-hover); }\nbutton.danger { color: var(--err); border-color: var(--err-line); background: var(--surface); }\nbutton.danger:hover { background: var(--err-soft); border-color: var(--err); }\ndialog.is-danger button.danger, button.danger.solid { background: var(--err); border-color: var(--err); color: #ffffff; font-weight: 600; }\ndialog.is-danger button.danger:hover, button.danger.solid:hover { filter: brightness(0.94); }\n@media (prefers-color-scheme: dark) { dialog.is-danger button.danger, button.danger.solid { background: #d92d20; border-color: #d92d20; } }\nbutton.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }\nbutton.ghost:hover { background: var(--surface-3); color: var(--text); }\nbutton.ghost.danger { color: var(--err); }\nbutton.ghost.danger:hover { background: var(--err-soft); }\nbutton.sm { height: 28px; padding: 0 10px; font-size: var(--fs-md); }\nbutton:disabled, button:disabled:hover { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }\n.row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }\n.actions-end { justify-content: flex-end; }\n\n/* Cards */\n.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }\n.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border); }\n.card-head h3 { font-size: var(--fs-base); }\n.card-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }\n.card-body { padding: var(--sp-4); min-width: 0; }\n.card-body > * + * { margin-top: var(--sp-3); }\n.card-body.flush { padding: 0; }\n.card-foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; align-items: center; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }\n.card.accent { border-color: var(--accent-line, var(--border)); box-shadow: var(--shadow-sm), inset 3px 0 0 var(--molten); }\n.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }\n.lead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }\n.lead .mono { font-size: 13px; color: var(--text); }\n\n/* Key/value */\n.kv { display: grid; gap: 0; }\ndl { margin: 0; }\n.kv-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--sp-3); padding: 7px 0; border-top: 1px solid var(--border); align-items: baseline; }\n.kv-row:first-child { border-top: 0; padding-top: 0; }\n.kv-row:last-child { padding-bottom: 0; }\n.kv dt { color: var(--muted); font-size: var(--fs-md); }\n.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }\n\n/* Pills and badges */\n.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid; vertical-align: middle; }\n.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n.pill-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }\n.pill-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }\n.pill-err { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }\n.pill-info { color: var(--info); background: var(--info-soft); border-color: var(--info-line); }\n.pill-skip { color: var(--muted); background: var(--surface-3); border-color: var(--border); }\n.pill-run { color: var(--accent-text); background: var(--accent-soft); border-color: rgb(255 90 31 / 0.35); }\n.pill-run .dot { animation: pulse 1.4s ease-in-out infinite; }\n.status-ok { color: var(--ok); }\n.status-warn { color: var(--warn); }\n.status-err { color: var(--err); }\n\n/* Tables */\n.table-wrap { overflow-x: auto; max-width: 100%; }\n.card > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }\ntable { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-base); }\nth, td { text-align: left; padding: 10px var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; }\nthead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }\ntbody tr:last-child > * { border-bottom: 0; }\ntbody tr:hover > * { background: var(--surface-2); }\ntd.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }\ntd.nowrap, th.nowrap { white-space: nowrap; }\ntd.wrap { overflow-wrap: anywhere; min-width: 20ch; }\ntd.mono { color: var(--text-2); }\ntd .row { flex-wrap: nowrap; justify-content: flex-end; }\n.plan-lines th { width: 1%; white-space: nowrap; font-weight: 500; }\n.plan-lines tbody th { background: transparent; }\n.step-chip { display: inline-block; padding: 1px 7px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }\n.plan-lines td { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }\n\n/* Forms */\n.field { display: grid; gap: 6px; }\n.field + .field { margin-top: var(--sp-4); }\n.field > label { font-size: var(--fs-md); font-weight: 600; color: var(--text); }\n.field-key { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }\n.field-help, .field > .muted { font-size: var(--fs-sm); color: var(--muted); }\n.field-error { color: var(--err); font-size: var(--fs-sm); }\n.field-error:empty { display: none; }\n.required { color: var(--err); }\ninput[type=\"text\"], input[type=\"password\"], input[type=\"number\"], select { font: var(--fs-base)/1 var(--font-sans); height: var(--control-h); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); width: 100%; max-width: 32rem; box-shadow: var(--shadow-sm); transition: border-color 120ms ease, box-shadow 120ms ease; }\ninput[type=\"password\"], input#confirm-name, .field input[spellcheck=\"false\"][type=\"text\"] { font-family: var(--font-mono); font-size: 13px; }\ninput:hover, select:hover { border-color: var(--faint); }\ninput:focus-visible, select:focus-visible { border-color: var(--molten); }\ninput[aria-invalid=\"true\"] { border-color: var(--err); }\nselect { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }\ninput[type=\"checkbox\"] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary-bg); flex: none; }\n.check > label, label.check { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: 500; font-size: var(--fs-base); line-height: 20px; cursor: pointer; }\n.check input[type=\"checkbox\"] { margin-top: 2px; }\n.form-section + .form-section { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--border); }\n.form-note { font-size: var(--fs-md); color: var(--muted); display: flex; gap: var(--sp-2); align-items: flex-start; }\n.form-note .icon { margin-top: 2px; color: var(--faint); flex: none; }\n\n.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }\n.form-grid > .field + .field { margin-top: 0; }\n.form-grid input[type=\"text\"], .form-grid input[type=\"number\"] { max-width: none; }\n.span-2 { grid-column: 1 / -1; }\n.target-name { font-weight: 600; }\n.card-body > [aria-live]:empty { display: none; }\n\n/* Disclosures */\ndetails > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-md); font-weight: 500; width: fit-content; border-radius: var(--radius-xs); list-style-position: inside; }\ndetails > summary:hover { color: var(--text); }\ndetails[open] > summary { margin-bottom: var(--sp-2); }\n.advanced { margin-top: var(--sp-3); }\n.form-section > .advanced:first-child { margin-top: 0; }\n.form-section + .form-section:has(> .advanced:first-child) { padding-top: var(--sp-4); margin-top: var(--sp-4); }\n.advanced[open] { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }\n.diagnostics { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 18px; margin: 0; padding: 10px var(--sp-3); background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); max-height: 40vh; overflow-y: auto; }\n\n/* Banners */\n.banner { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--info-line); border-left-width: 3px; border-radius: var(--radius); background: var(--info-soft); color: var(--text); }\n.banner-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--info); }\n.banner-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }\n.banner-body > p { margin-top: 4px; color: var(--text-2); }\n.banner-body > details { margin-top: var(--sp-2); }\n.banner-title { font-weight: 600; }\n.banner-code { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }\n.banner.ok { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-soft); }\n.banner.ok .banner-icon { color: var(--ok); }\n.banner.warn { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-soft); }\n.banner.warn .banner-icon { color: var(--warn); }\n.banner.err { border-color: var(--err-line); border-left-color: var(--err); background: var(--err-soft); }\n.banner.err .banner-icon { color: var(--err); }\n.banner + .banner { margin-top: var(--sp-2); }\n\n/* Findings */\n.findings { list-style: none; margin: 0; padding: 0; }\n.finding { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-3); row-gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); align-items: baseline; }\n.finding:first-child { border-top: 0; }\n.finding-msg { min-width: 0; overflow-wrap: anywhere; }\n.finding-id { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); margin-right: 6px; }\n.sev { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; height: 20px; padding: 0 7px; border-radius: var(--radius-xs); font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid; }\n.sev-error { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }\n.sev-warning { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }\n.fix { grid-column: 2; display: flex; align-items: baseline; gap: var(--sp-2); padding: 6px 10px; background: var(--surface-3); border: 1px solid var(--border); border-left: 2px solid var(--faint); border-radius: var(--radius-xs); min-width: 0; }\n.fix-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); flex: none; }\n.fix code { background: none; border: 0; padding: 0; user-select: all; }\n\n/* Empty states */\n.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: var(--sp-7) var(--sp-4); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }\n.empty-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); color: var(--muted); margin-bottom: var(--sp-2); }\n.empty-icon .icon { width: 20px; height: 20px; }\n.empty-title { font-weight: 600; font-size: var(--fs-lg); line-height: 24px; }\n.empty-text { color: var(--muted); max-width: 52ch; }\n.empty .row { margin-top: var(--sp-3); justify-content: center; }\n.stopped { max-width: 560px; margin: var(--sp-7) 0 0; }\n.stopped .banner { margin-top: var(--sp-4); text-align: left; }\n\n/* Dialogs */\ndialog { padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); width: min(32rem, calc(100vw - 32px)); max-width: none; box-shadow: var(--shadow-lg); }\ndialog::backdrop { background: rgb(11 14 19 / 0.55); backdrop-filter: blur(2px); }\ndialog[open] { animation: rise 160ms ease-out; }\n.dialog-head { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 20px 20px 0; }\n.dialog-head h2 { font-size: var(--fs-lg); line-height: 24px; overflow-wrap: anywhere; }\n.dialog-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--accent-soft); color: var(--accent-text); }\n.dialog-icon .icon { width: 18px; height: 18px; }\ndialog.is-danger { border-top: 3px solid var(--err); }\ndialog.is-danger .dialog-icon { background: var(--err-soft); color: var(--err); }\n.dialog-body { padding: var(--sp-3) 20px 20px 64px; color: var(--text-2); overflow-wrap: anywhere; }\n.dialog-body > p + p { margin-top: var(--sp-2); }\n.dialog-context { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 6px 10px; }\n.dialog-protected { display: flex; align-items: center; gap: var(--sp-2); color: var(--err); font-weight: 500; }\n.dialog-body .field { margin-top: var(--sp-4); }\n.dialog-body .field > label { font-weight: 500; color: var(--text-2); }\n.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 12px 12px; }\n\n/* Run: the step timeline */\n.run-state { display: flex; align-items: center; gap: var(--sp-2); width: fit-content; max-width: 100%; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: var(--fs-md); box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }\n.run-state::before { content: \"\"; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }\n.run-state.is-live::before { background: var(--molten); animation: pulse 1.4s ease-in-out infinite; }\n.run-state.is-ok::before { background: var(--ok); }\n.run-state.is-err::before { background: var(--err); }\n.run-state:empty { display: none; }\n.run-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }\n.run-outcome:empty, .run-findings:empty { display: none; }\n.steps { list-style: none; padding: 0; margin: 0; }\n.steps:empty::before { content: \"Waiting for the first step\u2026\"; display: block; color: var(--muted); font-size: var(--fs-md); }\n.step { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; min-height: 32px; padding: 6px 0; }\n.step:not(:last-child)::after { content: \"\"; position: absolute; left: 9.5px; top: 28px; bottom: -6px; width: 1px; background: var(--border-strong); }\n.step.is-ok:not(:last-child)::after { background: var(--ok); opacity: 0.45; }\n.step-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); }\n.step.is-ok .step-icon { background: var(--ok); border-color: var(--ok); color: var(--surface); }\n.step.is-failed .step-icon { background: var(--err); border-color: var(--err); color: var(--surface); }\n.step.is-skipped .step-icon { background: var(--surface-3); border-color: var(--border-strong); color: var(--muted); }\n.step.is-running .step-icon { color: transparent; border-color: var(--molten); border-right-color: transparent; animation: spin 0.9s linear infinite; }\n.step.is-aborted .step-icon { color: transparent; border-style: dashed; border-color: var(--warn); }\n.step.is-aborted .step-icon::after { content: \"\"; position: absolute; inset: 5px; border-radius: 2px; background: var(--warn); }\n.step-title { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }\n.step.is-running .step-title { font-weight: 600; }\n.step.is-skipped .step-title { color: var(--muted); }\n.step-meta { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }\n.step-status { text-transform: lowercase; }\n.step.is-failed .step-status { color: var(--err); font-weight: 600; }\n.step.is-running .step-status { color: var(--accent-text); font-weight: 600; }\n.step.is-aborted .step-status { color: var(--warn); font-weight: 600; }\n.step-dur { font-family: var(--font-mono); font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; color: var(--text-2); }\n\n/* Run: the log console (a terminal in both themes) */\n.console { background: var(--term-bg); border: 1px solid var(--term-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); min-width: 0; }\n.console-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); height: 40px; padding: 0 var(--sp-4); border-bottom: 1px solid rgb(255 255 255 / 0.08); color: var(--term-muted); }\n.console-head h3 { color: #e6edf3; font-size: var(--fs-md); display: flex; align-items: center; gap: var(--sp-2); }\n.console-head .icon { color: var(--term-muted); }\n.console-meta { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--term-muted); }\n.log { list-style: none; margin: 0; padding: 10px 0; max-height: 60vh; min-height: 120px; overflow-y: auto; color: var(--term-fg); font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #30363d transparent; }\n.log li { position: relative; padding: 0 var(--sp-4) 0 calc(var(--sp-4) + 10ch); }\n.log li::before { content: attr(data-ts); position: absolute; left: var(--sp-4); width: 9ch; color: var(--term-ts); font-variant-numeric: tabular-nums; }\n.log li:hover { background: rgb(255 255 255 / 0.03); }\n.log .src { color: var(--term-muted); }\n.log li.src { font-style: italic; }\n.log li.warn { color: var(--term-warn); background: var(--term-warn-bg); box-shadow: inset 2px 0 0 var(--term-warn); }\n.log li.error { color: var(--term-err); background: var(--term-err-bg); box-shadow: inset 2px 0 0 var(--term-err); }\n.log li.ok { color: var(--term-ok); }\n.log:empty::after { content: \"No output yet.\"; display: block; padding: 0 var(--sp-4); color: var(--term-muted); }\n\n@keyframes spin { to { transform: rotate(360deg); } }\n@keyframes pulse { 50% { opacity: 0.35; } }\n@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(0.99); } }\n\n/* Responsive: below 900px the sidebar becomes a top bar */\n@media (max-width: 900px) {\n .shell { grid-template-columns: minmax(0, 1fr); background: none; }\n .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }\n .brand { padding: 0; order: 1; }\n .sidebar-foot { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: var(--sp-3); }\n .session button { width: auto; }\n .nav { order: 3; width: 100%; flex-direction: row; align-items: center; gap: var(--sp-3); min-width: 0; }\n .nav-target { padding: 0; display: flex; align-items: center; gap: var(--sp-2); flex: none; }\n .nav-target select { width: 10.5rem; }\n .nav-list { flex-direction: row; gap: 2px; overflow-x: auto; min-width: 0; scrollbar-width: none; }\n .nav .nav-item { width: auto; flex: none; }\n .nav .nav-item[aria-current=\"page\"]::before { left: 10px; right: 10px; top: auto; bottom: -12px; width: auto; height: 2px; border-radius: 2px 2px 0 0; }\n .target-bar { position: static; padding: 10px var(--sp-4); }\n .app { padding: var(--sp-5) var(--sp-4) var(--sp-7); }\n .run-grid { grid-template-columns: minmax(0, 1fr); }\n}\n@media (max-width: 640px) {\n .form-grid { grid-template-columns: minmax(0, 1fr); }\n .local-note > span { display: none; }\n .nav { flex-wrap: wrap; }\n .nav-target { width: 100%; }\n .nav-target select { width: 100%; max-width: none; }\n .nav-list { width: 100%; margin: 0 -4px; }\n .nav .nav-item[aria-current=\"page\"]::before { display: none; }\n .nav-list { gap: 0; justify-content: space-between; }\n .nav .nav-item { padding: 0 8px; font-size: var(--fs-md); height: 32px; }\n .nav .nav-item .icon { display: none; }\n .grid-2 { grid-template-columns: minmax(0, 1fr); }\n .kv-row { grid-template-columns: 96px minmax(0, 1fr); }\n .page-head { margin-bottom: var(--sp-4); }\n h2 { font-size: 18px; line-height: 24px; }\n th, td { padding: 8px var(--sp-3); }\n .card-head, .card-body { padding-left: var(--sp-3); padding-right: var(--sp-3); }\n .finding { grid-template-columns: minmax(0, 1fr); padding: var(--sp-3); }\n .fix { grid-column: 1; }\n .dialog-body { padding-left: 20px; }\n .log li { padding-left: var(--sp-3); }\n .log li::before { display: none; }\n .target-bar .ctx-sep { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }\n .step.is-running .step-icon { border-right-color: var(--molten); border-style: dotted; }\n}\n";
|
|
7
|
+
export declare const APP_CSS = "/* Basalt deploy: an operations console. Graphite neutrals, one molten accent used sparingly. */\n:root {\n color-scheme: light dark;\n --font-sans: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n --font-mono: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-base: 14px; --fs-lg: 16px; --fs-xl: 20px;\n --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;\n --radius: 8px; --radius-sm: 6px; --radius-xs: 4px;\n --control-h: 32px;\n --sidebar-w: 240px;\n\n --bg: #f5f6f8;\n --surface: #ffffff;\n --surface-2: #f9fafb;\n --surface-3: #f0f2f5;\n --border: #e2e6eb;\n --border-strong: #cdd3da;\n --text: #0f141a;\n --text-2: #2c3843;\n --muted: #5b6672;\n --faint: #8a949f;\n\n --molten: #ff5a1f;\n --accent-text: #b93a0a;\n --accent-soft: #fff1ea;\n --primary-bg: #c93f0b;\n --primary-bg-hover: #b23708;\n --primary-fg: #ffffff;\n\n --ok: #157f3b; --ok-soft: #e8f5ec; --ok-line: #b7dfc4;\n --warn: #9a6200; --warn-soft: #fdf4e1; --warn-line: #f0d39a;\n --err: #c4271d; --err-soft: #fdecea; --err-line: #f3bdb8;\n --info: #44546a; --info-soft: #eef1f5; --info-line: #cfd7e1;\n --protected-bg: #b42318; --protected-fg: #ffffff;\n\n --term-bg: #0d1117; --term-border: #0d1117; --term-fg: #c9d1d9; --term-muted: #8b949e; --term-ts: #7d8590;\n --term-warn: #e3b341; --term-err: #ff7b72; --term-ok: #56d364; --term-warn-bg: rgb(227 179 65 / 0.08); --term-err-bg: rgb(255 123 114 / 0.10);\n\n --shadow-sm: 0 1px 2px rgb(15 20 26 / 0.05);\n --shadow-md: 0 1px 2px rgb(15 20 26 / 0.06), 0 4px 12px rgb(15 20 26 / 0.06);\n --shadow-lg: 0 2px 6px rgb(15 20 26 / 0.08), 0 24px 48px rgb(15 20 26 / 0.18);\n --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--molten);\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --bg: #0b0e13;\n --surface: #121820;\n --surface-2: #0f141b;\n --surface-3: #18202a;\n --border: #232c36;\n --border-strong: #2f3a46;\n --text: #e6eaef;\n --text-2: #c3cad3;\n --muted: #95a1ae;\n --faint: #6b7784;\n\n --accent-text: #ff8a5c;\n --accent-soft: rgb(255 90 31 / 0.12);\n --primary-bg: #ff5a1f;\n --primary-bg-hover: #ff7340;\n --primary-fg: #0b0e13;\n\n --ok: #3fcf79; --ok-soft: rgb(63 207 121 / 0.10); --ok-line: rgb(63 207 121 / 0.32);\n --warn: #f2b13d; --warn-soft: rgb(242 177 61 / 0.10); --warn-line: rgb(242 177 61 / 0.32);\n --err: #ff6b5e; --err-soft: rgb(255 107 94 / 0.10); --err-line: rgb(255 107 94 / 0.34);\n --info: #9aa8b8; --info-soft: rgb(154 168 184 / 0.10); --info-line: rgb(154 168 184 / 0.28);\n --protected-bg: #b42318; --protected-fg: #ffffff;\n\n --term-bg: #07090c; --term-border: #232c36;\n\n --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);\n --shadow-md: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3);\n --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.5), 0 24px 48px rgb(0 0 0 / 0.55);\n }\n}\n\n/* Base */\n*, *::before, *::after { box-sizing: border-box; }\nhtml, body { margin: 0; background: var(--bg); color: var(--text); }\nbody { font: var(--fs-base)/20px var(--font-sans); -webkit-font-smoothing: antialiased; font-feature-settings: \"cv11\", \"ss01\"; text-rendering: optimizeLegibility; }\nh1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }\nh2 { font-size: var(--fs-xl); line-height: 28px; letter-spacing: -0.015em; }\nh3 { font-size: var(--fs-base); line-height: 20px; }\np { margin: 0; }\np + p { margin-top: var(--sp-2); }\na { color: var(--accent-text); }\n.muted { color: var(--muted); }\n.mono, code, kbd, pre { font-family: var(--font-mono); font-size: 12.5px; }\ncode { background: var(--surface-3); border: 1px solid var(--border); padding: 0 5px; border-radius: var(--radius-xs); overflow-wrap: anywhere; color: var(--text-2); line-height: 18px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }\n.num, time { font-variant-numeric: tabular-nums; }\n.section-label { display: block; font-size: var(--fs-xs); line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.hidden { display: none !important; }\n.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }\n::selection { background: rgb(255 90 31 / 0.22); }\n\n/* Shell */\n.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px) var(--sidebar-w), transparent var(--sidebar-w)); }\n.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-4) var(--sp-3); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }\n.brand { display: flex; align-items: center; gap: 10px; padding: var(--sp-1) var(--sp-2); font-size: var(--fs-base); }\n.brand-mark { flex: none; }\n.brand-text { display: flex; flex-direction: column; line-height: 1.15; }\n.brand-name { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }\n.brand-sub { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }\n.nav { display: flex; flex-direction: column; gap: var(--sp-5); }\n.nav-target { display: grid; gap: 6px; padding: 0 var(--sp-2); }\n.nav-target .section-label { padding: 0; }\n.nav-list { display: flex; flex-direction: column; gap: 2px; }\n.nav .nav-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-weight: 500; text-align: left; justify-content: flex-start; position: relative; box-shadow: none; }\n.nav .nav-item .icon { color: var(--faint); }\n.nav .nav-item:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }\n.nav .nav-item:hover .icon { color: var(--text-2); }\n.nav .nav-item[aria-current=\"page\"] { background: var(--surface-3); color: var(--text); font-weight: 600; }\n.nav .nav-item[aria-current=\"page\"] .icon { color: var(--molten); }\n.nav .nav-item[aria-current=\"page\"]::before { content: \"\"; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--molten); }\n.sidebar-foot { margin-top: auto; display: grid; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2) 0; border-top: 1px solid var(--border); }\n.local-note { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }\n.local-note .mono { font-size: var(--fs-sm); }\n.session:empty { display: none; }\n.session button { width: 100%; justify-content: flex-start; }\n\n.main-col { min-width: 0; display: flex; flex-direction: column; }\n.app { width: 100%; max-width: 1200px; padding: var(--sp-5) var(--sp-6) var(--sp-7); }\n.app > section > * + * { margin-top: var(--sp-4); }\n\n/* Context strip: which target every screen acts on */\n.target-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-3); min-height: 52px; padding: 10px var(--sp-6); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); font-size: var(--fs-md); }\n.target-bar:empty { display: none; }\n.target-bar.is-protected { box-shadow: inset 0 3px 0 var(--protected-bg); }\n.ctx-target { display: inline-flex; align-items: center; gap: var(--sp-2); }\n.ctx-name { font-size: var(--fs-base); font-weight: 600; letter-spacing: -0.01em; }\n.ctx-sep { display: inline-block; width: 1px; height: 16px; background: var(--border-strong); font-size: 0; line-height: 0; overflow: hidden; color: transparent; }\n.ctx-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); min-width: 0; }\n.ctx-item .icon { color: var(--faint); flex: none; }\n.ctx-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.ctx-val { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }\n.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.05em; line-height: 1; white-space: nowrap; }\n.badge .icon { width: 12px; height: 12px; }\n.badge-protected { background: var(--protected-bg); color: var(--protected-fg); box-shadow: 0 0 0 3px rgb(180 35 24 / 0.16); }\n.badge-neutral { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }\n\n/* Page header */\n.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-3) var(--sp-4); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }\n.app > section > .page-head + * { margin-top: 0; }\n.page-title { min-width: 0; display: grid; gap: var(--sp-1); }\n.page-title h2 { overflow-wrap: anywhere; }\n.page-title h2.mono-title { font-family: var(--font-mono); font-size: 18px; letter-spacing: -0.01em; font-weight: 600; }\n.page-sub { color: var(--muted); max-width: 72ch; }\n.page-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }\n\n/* Buttons */\nbutton, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h); padding: 0 12px; font: 500 var(--fs-base)/1 var(--font-sans); white-space: nowrap; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease; }\nbutton:hover { background: var(--surface-3); border-color: var(--border-strong); }\nbutton:active { transform: translateY(0.5px); }\nbutton:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }\nbutton .icon { flex: none; }\nbutton.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); font-weight: 600; box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / 0.12); }\nbutton.primary:hover { background: var(--primary-bg-hover); border-color: var(--primary-bg-hover); }\nbutton.danger { color: var(--err); border-color: var(--err-line); background: var(--surface); }\nbutton.danger:hover { background: var(--err-soft); border-color: var(--err); }\ndialog.is-danger button.danger, button.danger.solid { background: var(--err); border-color: var(--err); color: #ffffff; font-weight: 600; }\ndialog.is-danger button.danger:hover, button.danger.solid:hover { filter: brightness(0.94); }\n@media (prefers-color-scheme: dark) { dialog.is-danger button.danger, button.danger.solid { background: #d92d20; border-color: #d92d20; } }\nbutton.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }\nbutton.ghost:hover { background: var(--surface-3); color: var(--text); }\nbutton.ghost.danger { color: var(--err); }\nbutton.ghost.danger:hover { background: var(--err-soft); }\nbutton.sm { height: 28px; padding: 0 10px; font-size: var(--fs-md); }\nbutton:disabled, button:disabled:hover { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }\n.row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }\n.actions-end { justify-content: flex-end; }\n\n/* Cards */\n.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }\n.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--border); }\n.card-head h3 { font-size: var(--fs-base); }\n.card-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }\n.card-body { padding: var(--sp-4); min-width: 0; }\n.card-body > * + * { margin-top: var(--sp-3); }\n.card-body.flush { padding: 0; }\n.card-foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; align-items: center; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }\n.card.accent { border-color: var(--accent-line, var(--border)); box-shadow: var(--shadow-sm), inset 3px 0 0 var(--molten); }\n.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }\n.lead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }\n.lead .mono { font-size: 13px; color: var(--text); }\n\n/* Key/value */\n.kv { display: grid; gap: 0; }\ndl { margin: 0; }\n.kv-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--sp-3); padding: 7px 0; border-top: 1px solid var(--border); align-items: baseline; }\n.kv-row:first-child { border-top: 0; padding-top: 0; }\n.kv-row:last-child { padding-bottom: 0; }\n.kv dt { color: var(--muted); font-size: var(--fs-md); }\n.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }\n\n/* Pills and badges */\n.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid; vertical-align: middle; }\n.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n.pill-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }\n.pill-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }\n.pill-err { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }\n.pill-info { color: var(--info); background: var(--info-soft); border-color: var(--info-line); }\n.pill-skip { color: var(--muted); background: var(--surface-3); border-color: var(--border); }\n.pill-run { color: var(--accent-text); background: var(--accent-soft); border-color: rgb(255 90 31 / 0.35); }\n.pill-run .dot { animation: pulse 1.4s ease-in-out infinite; }\n.status-ok { color: var(--ok); }\n.status-warn { color: var(--warn); }\n.status-err { color: var(--err); }\n\n/* Tables */\n.table-wrap { overflow-x: auto; max-width: 100%; }\n.card > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }\ntable { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-base); }\nth, td { text-align: left; padding: 10px var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; }\nthead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; white-space: nowrap; }\ntbody tr:last-child > * { border-bottom: 0; }\ntbody tr:hover > * { background: var(--surface-2); }\ntd.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }\ntd.nowrap, th.nowrap { white-space: nowrap; }\ntd.wrap { overflow-wrap: anywhere; min-width: 20ch; }\ntd.mono { color: var(--text-2); }\ntd .row { flex-wrap: nowrap; justify-content: flex-end; }\n.plan-lines th { width: 1%; white-space: nowrap; font-weight: 500; }\n.plan-lines tbody th { background: transparent; }\n.step-chip { display: inline-block; padding: 1px 7px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }\n.plan-lines td { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }\n\n/* Commits (plan, history, rollback): a timeline per side, author text as plain text */\n.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n.commits { display: grid; gap: var(--sp-4); }\n.commits-note { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 10px var(--sp-3); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: var(--fs-md); }\n.commits-note .icon { flex: none; margin-top: 2px; color: var(--faint); }\n.commits-note strong { color: var(--text-2); font-weight: 600; }\n.commits-note.is-ok { border-style: solid; border-color: var(--ok-line); background: var(--ok-soft); color: var(--text-2); }\n.commits-note.is-ok .icon { color: var(--ok); }\n.commit-group { --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-line: var(--ok-line); min-width: 0; }\n.commit-group-removed { --tone: var(--err); --tone-soft: var(--err-soft); --tone-line: var(--err-line); }\n.commit-group-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }\n.commit-group-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }\n.commit-sign { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: var(--radius-xs); background: var(--tone-soft); border: 1px solid var(--tone-line); color: var(--tone); font: 600 13px/1 var(--font-mono); flex: none; }\n.commit-count { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }\n.commit-list { list-style: none; margin: 0; padding: 0; position: relative; }\n.commit-list::before { content: \"\"; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--tone-line); }\n.commit { position: relative; display: grid; grid-template-columns: 18px auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 6px var(--sp-2) 6px 0; border-radius: var(--radius-sm); }\n.commit:hover { background: var(--surface-2); }\n.commit-dot { justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--surface); position: relative; z-index: 1; }\n.commit.is-merge .commit-dot { background: var(--surface); border: 2px solid var(--tone); }\n.commit-sha { padding: 1px 6px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-sm); }\n.commit-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }\n.commit.is-merge .commit-subject { color: var(--muted); }\n.commit-merge { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; color: var(--faint); }\n.commit-meta { display: flex; gap: var(--sp-2); align-items: baseline; justify-content: flex-end; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }\n.commit-author { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }\n.commit-more { margin: var(--sp-1) 0 0 30px; color: var(--muted); font-size: var(--fs-sm); }\n.commit-span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }\n.commit-span code { color: var(--text-2); }\n.commit-span .icon { width: 14px; height: 14px; }\n.card-actions .muted { font-size: var(--fs-md); }\n@media (max-width: 720px) {\n .commit { grid-template-columns: 18px auto minmax(0, 1fr); row-gap: 2px; align-items: start; }\n .commit-dot { margin-top: 5px; }\n .commit-subject { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }\n .commit-meta { grid-column: 3; justify-content: flex-start; }\n .release-changes > td { padding-left: var(--sp-4); }\n .release-changes-cell > * { max-width: calc(100vw - 64px); }\n}\n/* History: a chevron opens a release's commits under its row */\n.releases td.disclosure, .releases th.disclosure { width: 1%; padding-right: 0; }\n.disclosure-button { width: 26px; height: 26px; padding: 0; border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }\n.disclosure-button:hover { background: var(--surface-3); color: var(--text); }\n.disclosure-button .icon { transition: transform 150ms ease; }\n.disclosure-button[aria-expanded=\"true\"] .icon { transform: rotate(90deg); color: var(--molten); }\n.releases td.release-commit { min-width: 28ch; max-width: 40ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.release-commit code { margin-right: var(--sp-2); }\n.release-subject { color: var(--text); }\n.release-row.is-open > * { background: var(--surface-2); border-bottom-color: transparent; }\n.release-changes > td { padding: var(--sp-2) var(--sp-4) var(--sp-4) 52px; background: var(--surface-2); }\n.release-changes:hover > * { background: var(--surface-2); }\n/* The cell spans a table wider than the card: the list stays within what is on screen. */\n.release-changes-cell > * { max-width: min(52rem, calc(100vw - var(--sidebar-w) - 160px)); }\n.rollback-preview:empty { display: none; }\n/* The confirmation dialog's compact list */\n.commit-summary { display: grid; gap: 4px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--tone-line); border-left: 3px solid var(--tone); border-radius: var(--radius-sm); background: var(--tone-soft); --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-line: var(--ok-line); }\n.commit-summary.commit-group-removed { --tone: var(--err); --tone-soft: var(--err-soft); --tone-line: var(--err-line); }\n.commit-summary-head { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--text); margin-bottom: 2px; }\n.commit-summary-row { display: flex; gap: var(--sp-2); min-width: 0; font-size: var(--fs-md); }\n.commit-summary-row .commit-subject { color: var(--text-2); }\n.commit-summary .commit-sha { background: var(--surface); }\n.commit-summary .commit-more { margin: 0; }\n\n/* Forms */\n.field { display: grid; gap: 6px; }\n.field + .field { margin-top: var(--sp-4); }\n.field > label { font-size: var(--fs-md); font-weight: 600; color: var(--text); }\n.field-key { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }\n.field-help, .field > .muted { font-size: var(--fs-sm); color: var(--muted); }\n.field-error { color: var(--err); font-size: var(--fs-sm); }\n.field-error:empty { display: none; }\n.required { color: var(--err); }\ninput[type=\"text\"], input[type=\"password\"], input[type=\"number\"], select { font: var(--fs-base)/1 var(--font-sans); height: var(--control-h); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); width: 100%; max-width: 32rem; box-shadow: var(--shadow-sm); transition: border-color 120ms ease, box-shadow 120ms ease; }\ninput[type=\"password\"], input#confirm-name, .field input[spellcheck=\"false\"][type=\"text\"] { font-family: var(--font-mono); font-size: 13px; }\ninput:hover, select:hover { border-color: var(--faint); }\ninput:focus-visible, select:focus-visible { border-color: var(--molten); }\ninput[aria-invalid=\"true\"] { border-color: var(--err); }\nselect { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }\ninput[type=\"checkbox\"] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary-bg); flex: none; }\n.check > label, label.check { display: flex; align-items: flex-start; gap: var(--sp-2); font-weight: 500; font-size: var(--fs-base); line-height: 20px; cursor: pointer; }\n.check input[type=\"checkbox\"] { margin-top: 2px; }\n.form-section + .form-section { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--border); }\n.form-note { font-size: var(--fs-md); color: var(--muted); display: flex; gap: var(--sp-2); align-items: flex-start; }\n.form-note .icon { margin-top: 2px; color: var(--faint); flex: none; }\n\n.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }\n.form-grid > .field + .field { margin-top: 0; }\n.form-grid input[type=\"text\"], .form-grid input[type=\"number\"] { max-width: none; }\n.span-2 { grid-column: 1 / -1; }\n.target-name { font-weight: 600; }\n.card-body > [aria-live]:empty { display: none; }\n\n/* Disclosures */\ndetails > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-md); font-weight: 500; width: fit-content; border-radius: var(--radius-xs); list-style-position: inside; }\ndetails > summary:hover { color: var(--text); }\ndetails[open] > summary { margin-bottom: var(--sp-2); }\n.advanced { margin-top: var(--sp-3); }\n.form-section > .advanced:first-child { margin-top: 0; }\n.form-section + .form-section:has(> .advanced:first-child) { padding-top: var(--sp-4); margin-top: var(--sp-4); }\n.advanced[open] { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }\n.diagnostics { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 18px; margin: 0; padding: 10px var(--sp-3); background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); max-height: 40vh; overflow-y: auto; }\n\n/* Banners */\n.banner { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--info-line); border-left-width: 3px; border-radius: var(--radius); background: var(--info-soft); color: var(--text); }\n.banner-icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--info); }\n.banner-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }\n.banner-body > p { margin-top: 4px; color: var(--text-2); }\n.banner-body > details { margin-top: var(--sp-2); }\n.banner-title { font-weight: 600; }\n.banner-code { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }\n.banner.ok { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-soft); }\n.banner.ok .banner-icon { color: var(--ok); }\n.banner.warn { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-soft); }\n.banner.warn .banner-icon { color: var(--warn); }\n.banner.err { border-color: var(--err-line); border-left-color: var(--err); background: var(--err-soft); }\n.banner.err .banner-icon { color: var(--err); }\n.banner + .banner { margin-top: var(--sp-2); }\n\n/* Findings */\n.findings { list-style: none; margin: 0; padding: 0; }\n.finding { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-3); row-gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); align-items: baseline; }\n.finding:first-child { border-top: 0; }\n.finding-msg { min-width: 0; overflow-wrap: anywhere; }\n.finding-id { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); margin-right: 6px; }\n.sev { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; height: 20px; padding: 0 7px; border-radius: var(--radius-xs); font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid; }\n.sev-error { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }\n.sev-warning { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }\n.fix { grid-column: 2; display: flex; align-items: baseline; gap: var(--sp-2); padding: 6px 10px; background: var(--surface-3); border: 1px solid var(--border); border-left: 2px solid var(--faint); border-radius: var(--radius-xs); min-width: 0; }\n.fix-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); flex: none; }\n.fix code { background: none; border: 0; padding: 0; user-select: all; }\n\n/* Empty states */\n.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: var(--sp-7) var(--sp-4); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }\n.empty-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border); color: var(--muted); margin-bottom: var(--sp-2); }\n.empty-icon .icon { width: 20px; height: 20px; }\n.empty-title { font-weight: 600; font-size: var(--fs-lg); line-height: 24px; }\n.empty-text { color: var(--muted); max-width: 52ch; }\n.empty .row { margin-top: var(--sp-3); justify-content: center; }\n.stopped { max-width: 560px; margin: var(--sp-7) 0 0; }\n.stopped .banner { margin-top: var(--sp-4); text-align: left; }\n\n/* Dialogs */\ndialog { padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); width: min(32rem, calc(100vw - 32px)); max-width: none; box-shadow: var(--shadow-lg); }\ndialog::backdrop { background: rgb(11 14 19 / 0.55); backdrop-filter: blur(2px); }\ndialog[open] { animation: rise 160ms ease-out; }\n.dialog-head { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 20px 20px 0; }\n.dialog-head h2 { font-size: var(--fs-lg); line-height: 24px; overflow-wrap: anywhere; }\n.dialog-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--accent-soft); color: var(--accent-text); }\n.dialog-icon .icon { width: 18px; height: 18px; }\ndialog.is-danger { border-top: 3px solid var(--err); }\ndialog.is-danger .dialog-icon { background: var(--err-soft); color: var(--err); }\n.dialog-body { padding: var(--sp-3) 20px 20px 64px; color: var(--text-2); overflow-wrap: anywhere; }\n.dialog-body > p + p { margin-top: var(--sp-2); }\n.dialog-context { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 6px 10px; }\n.dialog-protected { display: flex; align-items: center; gap: var(--sp-2); color: var(--err); font-weight: 500; }\n.dialog-body .field { margin-top: var(--sp-4); }\n.dialog-body .field > label { font-weight: 500; color: var(--text-2); }\n.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 12px 12px; }\n\n/* Run: the step timeline */\n.run-state { display: flex; align-items: center; gap: var(--sp-2); width: fit-content; max-width: 100%; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: var(--fs-md); box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }\n.run-state::before { content: \"\"; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }\n.run-state.is-live::before { background: var(--molten); animation: pulse 1.4s ease-in-out infinite; }\n.run-state.is-ok::before { background: var(--ok); }\n.run-state.is-err::before { background: var(--err); }\n.run-state:empty { display: none; }\n.run-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }\n.run-outcome:empty, .run-findings:empty { display: none; }\n.steps { list-style: none; padding: 0; margin: 0; }\n.steps:empty::before { content: \"Waiting for the first step\u2026\"; display: block; color: var(--muted); font-size: var(--fs-md); }\n.step { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; min-height: 32px; padding: 6px 0; }\n.step:not(:last-child)::after { content: \"\"; position: absolute; left: 9.5px; top: 28px; bottom: -6px; width: 1px; background: var(--border-strong); }\n.step.is-ok:not(:last-child)::after { background: var(--ok); opacity: 0.45; }\n.step-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); }\n.step.is-ok .step-icon { background: var(--ok); border-color: var(--ok); color: var(--surface); }\n.step.is-failed .step-icon { background: var(--err); border-color: var(--err); color: var(--surface); }\n.step.is-skipped .step-icon { background: var(--surface-3); border-color: var(--border-strong); color: var(--muted); }\n.step.is-running .step-icon { color: transparent; border-color: var(--molten); border-right-color: transparent; animation: spin 0.9s linear infinite; }\n.step.is-aborted .step-icon { color: transparent; border-style: dashed; border-color: var(--warn); }\n.step.is-aborted .step-icon::after { content: \"\"; position: absolute; inset: 5px; border-radius: 2px; background: var(--warn); }\n.step-title { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }\n.step.is-running .step-title { font-weight: 600; }\n.step.is-skipped .step-title { color: var(--muted); }\n.step-meta { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }\n.step-status { text-transform: lowercase; }\n.step.is-failed .step-status { color: var(--err); font-weight: 600; }\n.step.is-running .step-status { color: var(--accent-text); font-weight: 600; }\n.step.is-aborted .step-status { color: var(--warn); font-weight: 600; }\n.step-dur { font-family: var(--font-mono); font-variant-numeric: tabular-nums; min-width: 6ch; text-align: right; color: var(--text-2); }\n\n/* Run: the log console (a terminal in both themes) */\n.console { background: var(--term-bg); border: 1px solid var(--term-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); min-width: 0; }\n.console-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); height: 40px; padding: 0 var(--sp-4); border-bottom: 1px solid rgb(255 255 255 / 0.08); color: var(--term-muted); }\n.console-head h3 { color: #e6edf3; font-size: var(--fs-md); display: flex; align-items: center; gap: var(--sp-2); }\n.console-head .icon { color: var(--term-muted); }\n.console-meta { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--term-muted); }\n.log { list-style: none; margin: 0; padding: 10px 0; max-height: 60vh; min-height: 120px; overflow-y: auto; color: var(--term-fg); font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #30363d transparent; }\n.log li { position: relative; padding: 0 var(--sp-4) 0 calc(var(--sp-4) + 10ch); }\n.log li::before { content: attr(data-ts); position: absolute; left: var(--sp-4); width: 9ch; color: var(--term-ts); font-variant-numeric: tabular-nums; }\n.log li:hover { background: rgb(255 255 255 / 0.03); }\n.log .src { color: var(--term-muted); }\n.log li.src { font-style: italic; }\n.log li.warn { color: var(--term-warn); background: var(--term-warn-bg); box-shadow: inset 2px 0 0 var(--term-warn); }\n.log li.error { color: var(--term-err); background: var(--term-err-bg); box-shadow: inset 2px 0 0 var(--term-err); }\n.log li.ok { color: var(--term-ok); }\n.log:empty::after { content: \"No output yet.\"; display: block; padding: 0 var(--sp-4); color: var(--term-muted); }\n\n@keyframes spin { to { transform: rotate(360deg); } }\n@keyframes pulse { 50% { opacity: 0.35; } }\n@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(0.99); } }\n\n/* Responsive: below 900px the sidebar becomes a top bar */\n@media (max-width: 900px) {\n .shell { grid-template-columns: minmax(0, 1fr); background: none; }\n .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }\n .brand { padding: 0; order: 1; }\n .sidebar-foot { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: var(--sp-3); }\n .session button { width: auto; }\n .nav { order: 3; width: 100%; flex-direction: row; align-items: center; gap: var(--sp-3); min-width: 0; }\n .nav-target { padding: 0; display: flex; align-items: center; gap: var(--sp-2); flex: none; }\n .nav-target select { width: 10.5rem; }\n .nav-list { flex-direction: row; gap: 2px; overflow-x: auto; min-width: 0; scrollbar-width: none; }\n .nav .nav-item { width: auto; flex: none; }\n .nav .nav-item[aria-current=\"page\"]::before { left: 10px; right: 10px; top: auto; bottom: -12px; width: auto; height: 2px; border-radius: 2px 2px 0 0; }\n .target-bar { position: static; padding: 10px var(--sp-4); }\n .app { padding: var(--sp-5) var(--sp-4) var(--sp-7); }\n .run-grid { grid-template-columns: minmax(0, 1fr); }\n}\n@media (max-width: 640px) {\n .form-grid { grid-template-columns: minmax(0, 1fr); }\n .local-note > span { display: none; }\n .nav { flex-wrap: wrap; }\n .nav-target { width: 100%; }\n .nav-target select { width: 100%; max-width: none; }\n .nav-list { width: 100%; margin: 0 -4px; }\n .nav .nav-item[aria-current=\"page\"]::before { display: none; }\n .nav-list { gap: 0; justify-content: space-between; }\n .nav .nav-item { padding: 0 8px; font-size: var(--fs-md); height: 32px; }\n .nav .nav-item .icon { display: none; }\n .grid-2 { grid-template-columns: minmax(0, 1fr); }\n .kv-row { grid-template-columns: 96px minmax(0, 1fr); }\n .page-head { margin-bottom: var(--sp-4); }\n h2 { font-size: 18px; line-height: 24px; }\n th, td { padding: 8px var(--sp-3); }\n .card-head, .card-body { padding-left: var(--sp-3); padding-right: var(--sp-3); }\n .finding { grid-template-columns: minmax(0, 1fr); padding: var(--sp-3); }\n .fix { grid-column: 1; }\n .dialog-body { padding-left: 20px; }\n .log li { padding-left: var(--sp-3); }\n .log li::before { display: none; }\n .target-bar .ctx-sep { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }\n .step.is-running .step-icon { border-right-color: var(--molten); border-style: dotted; }\n}\n";
|
package/dist/page.js
CHANGED
|
@@ -274,6 +274,69 @@ td .row { flex-wrap: nowrap; justify-content: flex-end; }
|
|
|
274
274
|
.step-chip { display: inline-block; padding: 1px 7px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }
|
|
275
275
|
.plan-lines td { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
|
|
276
276
|
|
|
277
|
+
/* Commits (plan, history, rollback): a timeline per side, author text as plain text */
|
|
278
|
+
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
279
|
+
.commits { display: grid; gap: var(--sp-4); }
|
|
280
|
+
.commits-note { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 10px var(--sp-3); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: var(--fs-md); }
|
|
281
|
+
.commits-note .icon { flex: none; margin-top: 2px; color: var(--faint); }
|
|
282
|
+
.commits-note strong { color: var(--text-2); font-weight: 600; }
|
|
283
|
+
.commits-note.is-ok { border-style: solid; border-color: var(--ok-line); background: var(--ok-soft); color: var(--text-2); }
|
|
284
|
+
.commits-note.is-ok .icon { color: var(--ok); }
|
|
285
|
+
.commit-group { --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-line: var(--ok-line); min-width: 0; }
|
|
286
|
+
.commit-group-removed { --tone: var(--err); --tone-soft: var(--err-soft); --tone-line: var(--err-line); }
|
|
287
|
+
.commit-group-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
|
|
288
|
+
.commit-group-title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
|
|
289
|
+
.commit-sign { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: var(--radius-xs); background: var(--tone-soft); border: 1px solid var(--tone-line); color: var(--tone); font: 600 13px/1 var(--font-mono); flex: none; }
|
|
290
|
+
.commit-count { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
291
|
+
.commit-list { list-style: none; margin: 0; padding: 0; position: relative; }
|
|
292
|
+
.commit-list::before { content: ""; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--tone-line); }
|
|
293
|
+
.commit { position: relative; display: grid; grid-template-columns: 18px auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); padding: 6px var(--sp-2) 6px 0; border-radius: var(--radius-sm); }
|
|
294
|
+
.commit:hover { background: var(--surface-2); }
|
|
295
|
+
.commit-dot { justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--surface); position: relative; z-index: 1; }
|
|
296
|
+
.commit.is-merge .commit-dot { background: var(--surface); border: 2px solid var(--tone); }
|
|
297
|
+
.commit-sha { padding: 1px 6px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-sm); }
|
|
298
|
+
.commit-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
|
|
299
|
+
.commit.is-merge .commit-subject { color: var(--muted); }
|
|
300
|
+
.commit-merge { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; color: var(--faint); }
|
|
301
|
+
.commit-meta { display: flex; gap: var(--sp-2); align-items: baseline; justify-content: flex-end; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
302
|
+
.commit-author { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
|
|
303
|
+
.commit-more { margin: var(--sp-1) 0 0 30px; color: var(--muted); font-size: var(--fs-sm); }
|
|
304
|
+
.commit-span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
|
|
305
|
+
.commit-span code { color: var(--text-2); }
|
|
306
|
+
.commit-span .icon { width: 14px; height: 14px; }
|
|
307
|
+
.card-actions .muted { font-size: var(--fs-md); }
|
|
308
|
+
@media (max-width: 720px) {
|
|
309
|
+
.commit { grid-template-columns: 18px auto minmax(0, 1fr); row-gap: 2px; align-items: start; }
|
|
310
|
+
.commit-dot { margin-top: 5px; }
|
|
311
|
+
.commit-subject { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
312
|
+
.commit-meta { grid-column: 3; justify-content: flex-start; }
|
|
313
|
+
.release-changes > td { padding-left: var(--sp-4); }
|
|
314
|
+
.release-changes-cell > * { max-width: calc(100vw - 64px); }
|
|
315
|
+
}
|
|
316
|
+
/* History: a chevron opens a release's commits under its row */
|
|
317
|
+
.releases td.disclosure, .releases th.disclosure { width: 1%; padding-right: 0; }
|
|
318
|
+
.disclosure-button { width: 26px; height: 26px; padding: 0; border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
|
|
319
|
+
.disclosure-button:hover { background: var(--surface-3); color: var(--text); }
|
|
320
|
+
.disclosure-button .icon { transition: transform 150ms ease; }
|
|
321
|
+
.disclosure-button[aria-expanded="true"] .icon { transform: rotate(90deg); color: var(--molten); }
|
|
322
|
+
.releases td.release-commit { min-width: 28ch; max-width: 40ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
323
|
+
.release-commit code { margin-right: var(--sp-2); }
|
|
324
|
+
.release-subject { color: var(--text); }
|
|
325
|
+
.release-row.is-open > * { background: var(--surface-2); border-bottom-color: transparent; }
|
|
326
|
+
.release-changes > td { padding: var(--sp-2) var(--sp-4) var(--sp-4) 52px; background: var(--surface-2); }
|
|
327
|
+
.release-changes:hover > * { background: var(--surface-2); }
|
|
328
|
+
/* The cell spans a table wider than the card: the list stays within what is on screen. */
|
|
329
|
+
.release-changes-cell > * { max-width: min(52rem, calc(100vw - var(--sidebar-w) - 160px)); }
|
|
330
|
+
.rollback-preview:empty { display: none; }
|
|
331
|
+
/* The confirmation dialog's compact list */
|
|
332
|
+
.commit-summary { display: grid; gap: 4px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--tone-line); border-left: 3px solid var(--tone); border-radius: var(--radius-sm); background: var(--tone-soft); --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-line: var(--ok-line); }
|
|
333
|
+
.commit-summary.commit-group-removed { --tone: var(--err); --tone-soft: var(--err-soft); --tone-line: var(--err-line); }
|
|
334
|
+
.commit-summary-head { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--text); margin-bottom: 2px; }
|
|
335
|
+
.commit-summary-row { display: flex; gap: var(--sp-2); min-width: 0; font-size: var(--fs-md); }
|
|
336
|
+
.commit-summary-row .commit-subject { color: var(--text-2); }
|
|
337
|
+
.commit-summary .commit-sha { background: var(--surface); }
|
|
338
|
+
.commit-summary .commit-more { margin: 0; }
|
|
339
|
+
|
|
277
340
|
/* Forms */
|
|
278
341
|
.field { display: grid; gap: 6px; }
|
|
279
342
|
.field + .field { margin-top: var(--sp-4); }
|
package/dist/server.js
CHANGED
|
@@ -435,6 +435,25 @@ export async function startUiServer(options) {
|
|
|
435
435
|
const { target: t, actor } = await target(body);
|
|
436
436
|
return json(res, 200, await collect(t, actor, { command: 'status' }, timeouts.status));
|
|
437
437
|
}
|
|
438
|
+
case 'commits': {
|
|
439
|
+
// Read-only on the server (no lock): the history's changes and the rollback preview.
|
|
440
|
+
const { target: t, actor } = await target(body);
|
|
441
|
+
const sha = (name) => {
|
|
442
|
+
const value = body[name];
|
|
443
|
+
if (value !== undefined && (typeof value !== 'string' || !SHA.test(value)))
|
|
444
|
+
throw new HttpError(400, `${name}: a commit sha (7 to 40 lowercase hex)`);
|
|
445
|
+
return value;
|
|
446
|
+
};
|
|
447
|
+
const from = sha('from');
|
|
448
|
+
const to = sha('to');
|
|
449
|
+
if (body['rollback'] !== undefined && body['rollback'] !== true)
|
|
450
|
+
throw new HttpError(400, 'rollback: true or absent');
|
|
451
|
+
const preview = body['rollback'] === true;
|
|
452
|
+
if (preview ? from !== undefined : from === undefined || to === undefined)
|
|
453
|
+
throw new HttpError(400, 'commits: from and to, or rollback (with an optional to)');
|
|
454
|
+
const spec = { command: 'commits', ...(preview ? { rollbackPreview: true } : {}), ...(from === undefined ? {} : { from }), ...(to === undefined ? {} : { to }) };
|
|
455
|
+
return json(res, 200, await collect(t, actor, spec, timeouts.status));
|
|
456
|
+
}
|
|
438
457
|
case 'plan': {
|
|
439
458
|
const { target: t, actor } = await target(body);
|
|
440
459
|
const reply = await collect(t, actor, { command: 'plan' }, timeouts.plan);
|
package/dist/ssh.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { type Target } from './targets.js';
|
|
|
10
10
|
export declare const SSH_OPTIONS: readonly ['BatchMode=yes', 'StrictHostKeyChecking=yes', 'ConnectTimeout=10', 'ServerAliveInterval=15', 'ServerAliveCountMax=3', 'ForwardAgent=no', 'ForwardX11=no', 'ClearAllForwardings=yes', 'PermitLocalCommand=no', 'RequestTTY=no', 'LogLevel=ERROR'];
|
|
11
11
|
/** The app's lockfile-pinned copy of the deploy, the invocation the CLI documents — never npx. */
|
|
12
12
|
export declare const DEPLOY_BIN = "node_modules/@basaltkit/deploy/dist/bin.js";
|
|
13
|
-
export declare const REMOTE_COMMANDS: readonly ['status', 'plan', 'env', 'run', 'rollback', 'attach', 'cancel'];
|
|
13
|
+
export declare const REMOTE_COMMANDS: readonly ['status', 'plan', 'env', 'run', 'rollback', 'commits', 'attach', 'cancel'];
|
|
14
14
|
export type RemoteCommand = typeof REMOTE_COMMANDS[number];
|
|
15
15
|
/** The commands that change the server (one at a time per target). */
|
|
16
16
|
export declare const MUTATING: ReadonlySet<RemoteCommand>;
|
|
@@ -26,8 +26,12 @@ export interface RemoteSpec {
|
|
|
26
26
|
detach?: boolean;
|
|
27
27
|
/** run. */
|
|
28
28
|
unhold?: boolean;
|
|
29
|
-
/** rollback. */
|
|
29
|
+
/** rollback; commits (with `from`, or with `rollbackPreview`). */
|
|
30
30
|
to?: string;
|
|
31
|
+
/** commits: the older commit of a range. */
|
|
32
|
+
from?: string;
|
|
33
|
+
/** commits: what a rollback (to `to`, or to the one it would choose) would take out of production. */
|
|
34
|
+
rollbackPreview?: boolean;
|
|
31
35
|
/** attach. */
|
|
32
36
|
fromSeq?: number;
|
|
33
37
|
/** attach. */
|
package/dist/ssh.js
CHANGED
|
@@ -25,7 +25,7 @@ export const SSH_OPTIONS = [
|
|
|
25
25
|
];
|
|
26
26
|
/** The app's lockfile-pinned copy of the deploy, the invocation the CLI documents — never npx. */
|
|
27
27
|
export const DEPLOY_BIN = 'node_modules/@basaltkit/deploy/dist/bin.js';
|
|
28
|
-
export const REMOTE_COMMANDS = ['status', 'plan', 'env', 'run', 'rollback', 'attach', 'cancel'];
|
|
28
|
+
export const REMOTE_COMMANDS = ['status', 'plan', 'env', 'run', 'rollback', 'commits', 'attach', 'cancel'];
|
|
29
29
|
/** The commands that change the server (one at a time per target). */
|
|
30
30
|
export const MUTATING = new Set(['env', 'run', 'rollback', 'cancel']);
|
|
31
31
|
export const SHA = /^[0-9a-f]{7,40}$/;
|
|
@@ -71,8 +71,22 @@ export function remoteCommand(target, spec, actor) {
|
|
|
71
71
|
refuse('--unhold off run');
|
|
72
72
|
words.push('--unhold');
|
|
73
73
|
}
|
|
74
|
+
if (spec.command === 'commits') {
|
|
75
|
+
// Two shas, or the rollback preview: never anything else.
|
|
76
|
+
if (spec.rollbackPreview ? spec.from !== undefined : spec.from === undefined || spec.to === undefined)
|
|
77
|
+
refuse('the commits range');
|
|
78
|
+
if (spec.rollbackPreview)
|
|
79
|
+
words.push('--rollback');
|
|
80
|
+
if (spec.from !== undefined) {
|
|
81
|
+
if (!SHA.test(spec.from))
|
|
82
|
+
refuse('the commits range');
|
|
83
|
+
words.push(`--from=${spec.from}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else if (spec.from !== undefined || spec.rollbackPreview)
|
|
87
|
+
refuse('a commits range off commits');
|
|
74
88
|
if (spec.to !== undefined) {
|
|
75
|
-
if (spec.command !== 'rollback' || !SHA.test(spec.to))
|
|
89
|
+
if ((spec.command !== 'rollback' && spec.command !== 'commits') || !SHA.test(spec.to))
|
|
76
90
|
refuse('the rollback commit');
|
|
77
91
|
words.push(`--to=${spec.to}`);
|
|
78
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basaltkit/deploy-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22.5.0"
|
|
6
6
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@basaltkit/deploy": "^0.
|
|
24
|
+
"@basaltkit/deploy": "^0.8.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^26.6.5",
|