Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed — interface feedback

- **Copy** did nothing in browsers that refuse the async clipboard (the Claude
desktop browser denies its permission), and the error appeared only at the
top of the page. Copy now falls back to a selection copy; if that is refused
too, it selects the command and says to press ⌘C beside the button.
- The language list opened above the viewport on Review and later views at
widths up to 1050 px: the hidden floating summary measured 0 × 0 and was
taken as the bottom edge. Hidden summaries no longer limit the list.
- The round flag sat 2 px off-centre in its circle; the trigger now centres it.
- Language names no longer carry countries: English, Português, Français,
Deutsch and Español. Translations remain en-GB, pt-BR, fr-FR, de-DE and es-ES.
- The headline's hover colour change switched the gradient size instantly and
snapped back. Registered colour stops now glide for 900 ms in and out, and
stay still under Calm or reduced motion.

### Added — navigable stepper

- Steps 1–3 are buttons: Choose, Review, and the chosen install route (the
handoff, without downloading, or the Homebrew command). The local companion
locks earlier steps while an installation runs and enables its progress step
once a run exists.

### Added — Homebrew command route

- Review now offers a choice: the existing **Guided setup** (plan download and
Expand Down
6 changes: 4 additions & 2 deletions docs/COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ exceptions in the component stylesheet. The motion layer must not override
component radii. Comparable review panels share their inset and heading origin.

Immediate feedback, elastic surface response and spatial transitions use the
shared quick/fast/slow duration and easing tokens. Ambient breathing and checkbox
stroke drawing retain their documented expressive timing.
shared quick/fast/slow duration and easing tokens. Ambient breathing, checkbox
stroke drawing and the 900 ms headline colour glide retain their documented
expressive timing. Stepper steps are buttons; the current one carries
`aria-current="step"`.
Calm and system reduced motion override decoration. Disabled or busy actions
suppress press/hover deformation and pointer sheen. Starting an installation
sets `aria-busy`, disables duplicate activation, and clears busy state on success
Expand Down
9 changes: 5 additions & 4 deletions docs/LIQUID_INTERFACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ retains canonical English text for reversible language changes. Longer phrases
take precedence over broad interpolation templates; template slots are checked
in the Node suite. Translated descriptions also participate in search.

The shared language picker uses project-local round flags with full language
names and native-language option labels. Flags are decorative; accessible names
identify languages independently. It supports the source picker's keyboard and
focus contract. English (UK) is the default. A choice is saved only in this
The shared language picker uses project-local round flags with native language
names and no country qualifiers (English, Português, Français, Deutsch,
Español); the translations remain en-GB, pt-BR, fr-FR, de-DE and es-ES. Flags
are decorative; accessible names identify languages independently. It supports
the source picker's keyboard and focus contract. British English is the default. A choice is saved only in this
browser, under `mac-setup.locale.v1`, and applies to setup and Safety.

App names, package tokens, plan IDs, commands, raw installer output, downloaded
Expand Down
104 changes: 91 additions & 13 deletions docs/assets/app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ let session = null;
let token = "";
let pollTimer;
let commands = { brew: "", appStore: "" };
let currentView = "choose";
let runState = "none"; // none | active | finished, for the local companion
let planDownloaded = false;
let followupSignature = "";
let lastRunStatus = "";
let starting = false;
Expand Down Expand Up @@ -525,13 +528,9 @@ function setView(view, moveFocus = true) {
requestTranslation();
for (const name of ["choose", "review", "guide", "command", "progress"])
$(`${name}-view`).hidden = name !== view;
const step = view === "choose" ? 0 : view === "review" ? 1 : 2;
currentView = view;
renderInstallStep();
document.querySelectorAll(".stepper li").forEach((node, index) => {
node.classList.toggle("complete", index < step);
if (index === step) node.setAttribute("aria-current", "step");
else node.removeAttribute("aria-current");
});
renderStepper();
const titles = {
choose: [
"Make this ",
Expand Down Expand Up @@ -658,6 +657,34 @@ function renderReviewActions() {
renderInstallStep();
requestTranslation();
}
// Steps navigate like the Back buttons. A running installation locks the
// earlier steps, and the companion's progress step needs a run to show.
function renderStepper() {
const step = currentView === "choose" ? 0 : currentView === "review" ? 1 : 2;
document.querySelectorAll(".stepper li").forEach((node, index) => {
const link = node.querySelector(".step-link");
node.classList.toggle("complete", index < step);
if (index === step) link.setAttribute("aria-current", "step");
else link.removeAttribute("aria-current");
link.disabled =
index < 2
? runState === "active"
: Boolean(session) && runState === "none";
});
}
function goToStep(step) {
if (step === "choose") setView("choose");
else if (step === "review") renderReview();
else if (session) setView("progress");
else if (method === "homebrew") renderCommands();
else showGuide();
}
function showGuide() {
$("download-again").textContent = planDownloaded
? "Download again"
: "Download plan";
setView("guide");
}
function renderInstallStep() {
$("install-step-label").textContent =
!session && method === "homebrew"
Expand Down Expand Up @@ -687,6 +714,8 @@ function renderCommands() {
showCommand($("app-store-command"), result.appStoreCommand);
for (const id of ["copy-brew-command", "copy-app-store-command"])
$(id).textContent = "Copy";
for (const status of $("command-view").querySelectorAll(".copy-status"))
status.textContent = "";
$("not-included").hidden = result.notIncluded.length === 0;
$("not-included-list").replaceChildren(
...result.notIncluded.map((item) => element("li", "", item.name)),
Expand All @@ -704,19 +733,57 @@ function showCommand(node, command) {
]),
);
}
// Some browsers refuse the async clipboard (embedded browsers deny its
// permission), so fall back to a selection copy, then to a manual ⌘C.
function copyWithSelection(text) {
const focused = document.activeElement;
const buffer = element("textarea", "copy-buffer");
buffer.value = text;
buffer.readOnly = true;
buffer.tabIndex = -1;
buffer.setAttribute("aria-hidden", "true");
document.body.append(buffer);
buffer.focus({ preventScroll: true });
buffer.setSelectionRange(0, text.length);
let copied = false;
try {
copied = document.execCommand("copy");
} catch {
copied = false;
}
buffer.remove();
focused?.focus?.({ preventScroll: true });
return copied;
}
async function copyText(text) {
if (navigator.clipboard?.writeText) {
try {
await navigator.clipboard.writeText(text);
return true;
} catch {
/* Fall back below. */
}
}
return copyWithSelection(text);
}
function bindCopy(button, text) {
const box = button.closest(".command-box");
const status = element("p", "copy-status");
status.setAttribute("role", "status");
box.after(status);
button.addEventListener("click", async () => {
const value = oneLine(text());
if (!value) return;
try {
await navigator.clipboard.writeText(value);
status.textContent = "";
if (await copyText(value)) {
button.textContent = "Copied";
announce("Command copied. Paste it into Terminal and press Return.");
} catch {
showError(
"Clipboard access is unavailable. Select the command and copy it manually.",
);
} else {
getSelection().selectAllChildren(box.querySelector("code"));
status.textContent =
"This browser blocked copying. The command is selected: press ⌘C.";
}
requestTranslation();
});
}
function download(content, name, type = "application/json") {
Expand All @@ -730,6 +797,7 @@ function download(content, name, type = "application/json") {
setTimeout(() => URL.revokeObjectURL(url), 1000);
}
function exportPlan() {
planDownloaded = true;
download(
JSON.stringify(createPlan(catalog, profile, selected), null, 2) + "\n",
"mac-setup-plan.json",
Expand Down Expand Up @@ -764,7 +832,7 @@ async function startInstallation() {
return;
}
exportPlan();
setView("guide");
showGuide();
return;
}
if (!$("confirm-install").checked) {
Expand Down Expand Up @@ -807,6 +875,8 @@ async function startInstallation() {
} catch (error) {
showError(error.message);
$("continue-button").disabled = false;
runState = "none";
renderStepper();
} finally {
$("continue-button").removeAttribute("aria-busy");
starting = false;
Expand Down Expand Up @@ -952,6 +1022,8 @@ function renderRun(run) {
? "Reports describe this run, including dry-run mode."
: "Available when the run finishes.";
$("new-plan").hidden = !finished;
runState = finished ? "finished" : "active";
renderStepper();
if (lastRunStatus !== run.status) {
announce($("progress-description").textContent);
lastRunStatus = run.status;
Expand Down Expand Up @@ -1029,6 +1101,11 @@ function bindEvents() {
$("review-button").addEventListener("click", renderReview);
$("back-button").addEventListener("click", () => setView("choose"));
$("guide-back").addEventListener("click", renderReview);
for (const link of document.querySelectorAll(".step-link"))
link.addEventListener("click", () => {
if (link.getAttribute("aria-current") !== "step")
goToStep(link.dataset.step);
});
$("export-button").addEventListener("click", exportPlan);
$("download-again").addEventListener("click", exportPlan);
$("continue-button").addEventListener("click", startInstallation);
Expand Down Expand Up @@ -1127,6 +1204,7 @@ async function init() {
);
}
bindEvents();
renderStepper();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh stepper state after connecting to the companion

When opening a fresh local companion without an initial plan, this renders the stepper while session is still null, enabling the installation step. After /api/session resolves and /api/state returns idle, initialization never renders the stepper again: applyImported() only runs for an initial plan, and renderRun() only runs for a non-idle run. Clicking “Guided installation” therefore enters the uninitialized progress view even though no installation has started and no polling is scheduled. Re-render the stepper after the session handshake so the progress step remains disabled until a run exists.

Useful? React with 👍 / 👎.

renderProfiles();
renderCategories();
renderSelection();
Expand Down
6 changes: 3 additions & 3 deletions docs/assets/i18n.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import messages from "./messages.mjs";

export const LANGUAGES = [
{ id: "en-GB", name: "English (UK)", flag: "gb" },
{ id: "pt-BR", name: "Português (Brasil)", flag: "br" },
{ id: "en-GB", name: "English", flag: "gb" },
{ id: "pt-BR", name: "Português", flag: "br" },
{ id: "fr-FR", name: "Français", flag: "fr" },
{ id: "de-DE", name: "Deutsch", flag: "de" },
{ id: "es-ES", name: "Español (España)", flag: "es" },
{ id: "es-ES", name: "Español", flag: "es" },
];
const normalise = (text) => text.replace(/\s+/g, " ").trim();
const dictionaries = new Map(
Expand Down
50 changes: 37 additions & 13 deletions docs/assets/liquid.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--duration-fast: 250ms;
--duration-slow: 400ms;
--ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
--ease-title: cubic-bezier(0.45, 0, 0.25, 1);
--ease-liquid: cubic-bezier(0.2, 1.45, 0.4, 1);
--modal-open-dur: var(--duration-fast);
--modal-close-dur: var(--duration-quick);
Expand Down Expand Up @@ -223,20 +224,43 @@ html[data-theme="light"] {
).has-scroll-elasticity {
box-shadow: inset 0 var(--scroll-drift, 0px) 18px var(--tint);
}
.gradient-text {
background-size: 100% 100%;
/* Hover shifts the title colours one place along the gradient. Registered
colour stops interpolate, so the change glides in and back out; browsers
without @property simply switch colours. Resting colours are unchanged. */
@property --title-stop-1 {
syntax: "<color>";
inherits: false;
initial-value: transparent;
}
.gradient-text:hover {
background-size: 240% 100%;
animation: gradient-flow 3.6s ease-in-out infinite alternate;
@property --title-stop-2 {
syntax: "<color>";
inherits: false;
initial-value: transparent;
}
@keyframes gradient-flow {
from {
background-position: 0% 50%;
}
to {
background-position: 100% 50%;
}
@property --title-stop-3 {
syntax: "<color>";
inherits: false;
initial-value: transparent;
}
.gradient-text {
--title-stop-1: var(--title-1);
--title-stop-2: var(--title-2);
--title-stop-3: var(--title-3);
background-image: linear-gradient(
115deg,
var(--title-stop-1),
var(--title-stop-2) 49%,
var(--title-stop-3)
);
transition:
--title-stop-1 900ms var(--ease-title),
--title-stop-2 900ms var(--ease-title),
--title-stop-3 900ms var(--ease-title);
}
html:not([data-motion="reduced"]) .gradient-text:hover {
--title-stop-1: var(--title-2);
--title-stop-2: var(--title-3);
--title-stop-3: var(--title-1);
}
.primary-button::after,
.secondary-button::after,
Expand Down Expand Up @@ -411,7 +435,7 @@ html[data-motion="reduced"] .window-toolbar {
transform: none;
}
html[data-motion="reduced"] .gradient-text {
background-size: 100% 100%;
transition: none;
}
html[data-motion="reduced"] .has-liquid-light::after {
opacity: 0;
Expand Down
14 changes: 14 additions & 0 deletions docs/assets/messages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3199,4 +3199,18 @@ export default [
"Befehl kopiert. Füge ihn in Terminal ein und drücke die Eingabetaste.",
"Comando copiado. Pégalo en Terminal y pulsa Intro.",
],
[
"Download plan",
"Baixar plano",
"Télécharger le plan",
"Plan herunterladen",
"Descargar plan",
],
[
"This browser blocked copying. The command is selected: press ⌘C.",
"Este navegador bloqueou a cópia. O comando está selecionado: pressione ⌘C.",
"Ce navigateur a bloqué la copie. La commande est sélectionnée : appuyez sur ⌘C.",
"Dieser Browser hat das Kopieren blockiert. Der Befehl ist markiert: Drücke ⌘C.",
"Este navegador ha bloqueado la copia. El comando está seleccionado: pulsa ⌘C.",
],
];
13 changes: 7 additions & 6 deletions docs/assets/source-picker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,18 @@ export function createSourcePicker(
};
function positionList() {
const bounds = trigger.getBoundingClientRect();
// The floating summary limits space only while it is shown: when hidden it
// measures 0 × 0 at the top, which once sent lists above the viewport.
const summary = document.querySelector(".selection-column");
const summaryBounds = summary?.getBoundingClientRect();
const bottom =
summary && getComputedStyle(summary).position === "fixed"
? Math.min(
window.innerHeight - 16,
summary.getBoundingClientRect().top - 12,
)
summaryBounds?.height && getComputedStyle(summary).position === "fixed"
? Math.min(window.innerHeight - 16, summaryBounds.top - 12)
: window.innerHeight - 16;
const below = bottom - bounds.bottom;
const above = bounds.top - 96;
const opensAbove = below < list.scrollHeight + 8 && above > below;
const opensAbove =
below < list.scrollHeight + 8 && above > Math.max(below, 90);
list.dataset.side = opensAbove ? "above" : "below";
list.style.maxHeight = `${Math.max(90, (opensAbove ? above : below) - 12)}px`;
}
Expand Down
Loading
Loading