Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
66 changes: 66 additions & 0 deletions docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14857,3 +14857,69 @@ removed sentences, ids and keys gone), `tests/start-view.test.ts`,
`tests/tools-view.test.ts`, `tests/recovery-view.test.ts`,
`tests/environment-wording.test.ts`, and in headless Chrome against the hosted and
personal previews (root decision 0178).

### F56 addendum of 2026-10-19: Trezor's video is the first thing the page shows

**Decided by Matěj (Organization Admin) on 2026-10-19, about 14:15Z, in the DEV-6631
thread, with a screenshot of an Automated Environment's Trezor without a vault showing the
video:** „tady tohle video je super. Myslím si, že úplně krásně vysvětluje, jak Bitwarden
funguje, a i v prostředích, kde je Bitwarden aktivní, si myslím, že by tohle mělo být úplně
jako první věc, kterou člověk vidí ve chvíli, kdy chce s Bitwardenem nějakým způsobem
interagovat z Launchpadu." It changes point 4 of the addendum of 2026-10-18, where the
person's press of the "?" opened the video. Now the approved video `vault-overview`
(design-system-lazurio#93) is the first thing Trezor shows wherever its words are true.

1. **Where: unchanged** (point 3 of the addendum of 2026-10-18, `vaultHelp`). The video
shows where the person is a member of the vault, or where the Environment has no
vault. Elsewhere the page shows no video, and the "?" plays its explanation as before:
- where nobody who enters is added (`vault-agents`);
- where the person is not a member, or that is not known yet;
- in a Personal Environment, whose vault is the person's own Bitwarden.

The video says that people share from their own Bitwarden, which a visitor of a shared
Team Environment cannot do (#499).
2. **How it shows.** Once the page knows that the video is true (it has read the vault's
state and the person's membership), the box `#vault-video` opens first, under the
page's heading. It shows the video's poster:
- nothing plays, and nothing but the poster loads;
- the focus stays where it is, and nothing scrolls.

The person starts it with the player's own control. The line under it
(`vaultVideoLine`) is unchanged.
3. **The "?"** beside the heading closes the video and opens it again; when it opens it,
the video plays from the start (with less motion, it waits at its poster). Escape
closes it.
4. **Closed by the person, it stays closed until the page moves on.** Reading the status
again, a change of language or the membership arriving do not reopen it. The next
visit opens it again (`helpVideoDrawing` in `src/launchpad/page-help.ts`, per visit of
a route).
5. **Unchanged:**
- The served page keeps the box hidden, so nothing flashes where the video is not
true.
- The video never plays by itself and has no sound.
- The page keeps no sentence that explains the vault.
- The guide's card plays `vault-agents` and the Personal adaptation.

| Alternative | Trade-off / disposition |
| --- | --- |
| The video in every Organization's Environment, the `vault-agents` places included | It would say that people share from their own Bitwarden where nobody is added (#499). Rejected. A variant for a shared Team Environment can come from the host's facts later |
| Muted autoplay | Motion and data the person did not ask for; `prefers-reduced-motion` would need its own path. Rejected |
| Open only until the person has seen it once | Matěj asked for the first thing on every approach to Bitwarden, and a remembered "seen" needs a store per person. Rejected for now |
| The video behind the "?" (the addendum of 2026-10-18) | What this addendum changes. Rejected |

**Honest limits.**

- **The first look.** While the membership is being asked (a few seconds on the first
look), the page shows no video. Then the box opens, and the vault's row and actions move
down once.
- **The words.** The video's words speak of an Organization's vault. A Work Environment
whose vault adds people shows it also where the vault is reached by a Lazurio sign-in
(the addendum of 2026-10-18's honest limit stands).

Verified by:
- `tests/launchpad-guide-video.test.ts`: the box served hidden at the top of the page, and
the visit rule (open where true, closed by the person until the page moves on, open
again on the next visit);
- `tests/launchpad-guide.test.ts`: where the video is true, unchanged;
- headless Chrome against the hosted preview (root decision 0178): a work Environment
with its vault and the person a member, and `no-vault`.
25 changes: 15 additions & 10 deletions docs/launchpad-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,9 @@ guide's mark and a card beside it, and the layer lets every click through.
member (no account or no master password yet, removed), and while that is not
known, the Launchpad's `vault-agents`, which promises no Bitwarden of one's own; where
the person is a member of the vault, or the Environment has no vault, the approved video
`vault-overview`, which the "?" opens in place (`page-help.ts`, `#vault-video`) with
the one line it does not say; nothing until the page read the vault's state. One
`vault-overview`, open in place as the page opens and the first thing it shows (F56's
addendum of 2026-10-19), with the one line it does not say; the "?" closes and reopens
it (`page-help.ts`, `#vault-video`); nothing until the page read the vault's state. One
agent's request has no "?";
- Settings ([F56's addendum (2) of 2026-10-18](decisions.md#f56-addendum-2-of-2026-10-18-every-section-of-settings-has-its--and-loses-its-explaining-sentences)): Začínáme
`settings-start` (only where it has the basics: not on a public Environment's demo
Expand Down Expand Up @@ -2535,8 +2536,9 @@ the fake bw of `tests/fixtures/fake-vault.ts`.
**An Environment without a vault** ([F53's addendum of
2026-10-17](decisions.md#f53-addendum-of-2026-10-17-an-environment-without-a-vault-explains-the-vault))
says why in the page's line; how a vault works in an Organization is the guide video
`vault-overview`, which the "?" beside the heading opens in place (since F56's addendum of
2026-10-18 the page no longer has the group "Jak trezor funguje").
`vault-overview`, open in place under the heading as the page opens (F56's addendum of
2026-10-19; since its addendum of 2026-10-18 the page no longer has the group "Jak trezor
funguje", and the "?" beside the heading closes and reopens the video).
The line depends on the vault's reason (`vaultPageView`'s `note`): a
public Organization's Environment, whose handover names no tailnet (`no-tailnet`), has
none on purpose, since the Organization is a public demo; any other (`no-vault`) is not
Expand Down Expand Up @@ -2663,12 +2665,15 @@ language's, paused. The pure part, `guideVideoPlayer`, decides the markup and th
`#vault-bitwarden-video` at the top of "V Codex Desktopu a ve vašem prohlížeči"
(`vault-page-panel.ts`, hidden for a personal Environment's own Bitwarden, whose steps
differ). Trezor's "?", where its words are true of the Environment's vault (an Organization's
vault the person is in, or no vault here; [the guide](#the-guide-decision-f56)), mounts
`vault-overview` in `#vault-video-player` with `open` the first time it is pressed
(`src/launchpad/page-help.ts`): the box `#vault-video` opens under the page's heading, the
press plays the video (with less motion it waits at its poster), the line under it
(`vaultVideoLine`) says what the video does not, and the "?" again, Escape or the page
moving on closes it, the focus back on the "?".
vault the person is in, or no vault here; [the guide](#the-guide-decision-f56)), is the
first thing the page shows (F56's addendum of 2026-10-19, `src/launchpad/page-help.ts`):
as the page knows the video is true, the box `#vault-video` opens under the page's heading
with `vault-overview` in `#vault-video-player` at its poster, playing nothing and moving no
focus, and the person starts it; the line under it (`vaultVideoLine`) says what the video
does not. The "?" closes it and opens it again, and then plays it (with less motion it
waits at its poster); Escape closes it, the focus back on the "?". Closed by the person, it
stays closed until the page moves on (`helpVideoDrawing`, per visit), and the next visit
opens it again.

The files are `src/launchpad/videos/<name>-<cs|en>.mp4` and their posters
`<name>-<cs|en>.webp`, embedded in the executable with `{ type: "file" }` like the shell's
Expand Down
11 changes: 6 additions & 5 deletions src/launchpad/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1479,11 +1479,12 @@ <h2 id="update-heading" class="sr-only" data-message="updateTitle">Product updat
<main id="view-vault" class="container" data-view="vault">
<section id="section-vault" aria-labelledby="page-heading">
<!-- How a vault works in an Organization (DEV-6631, design-system-lazurio#93):
the approved guide video `vault-overview`, which the "?" beside the
page's heading opens in place and plays where its words are true, with
the one line it does not say under it (decision F56's addendum of
2026-10-18, page-help.ts); hidden until then. The page itself keeps no
sentence that explains the vault. -->
the approved guide video `vault-overview`, the first thing the page shows
where its words are true: open as the page opens, at its poster, with
the one line it does not say under it; the "?" beside the page's heading
closes it and opens it again (decision F56's addenda of 2026-10-18 and
2026-10-19, page-help.ts). Hidden where it is not true and until the
page knows. The page itself keeps no sentence that explains the vault. -->
<div class="vault-video" id="vault-video" hidden>
<div class="guide-video" id="vault-video-player"></div>
<p class="group-note" id="vault-video-line" data-message="vaultVideoLine">Whoever can enter the Environment has its passwords too</p>
Expand Down
87 changes: 69 additions & 18 deletions src/launchpad/page-help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,42 @@ import type { MessageKey } from "./messages";

type Copy = Readonly<Record<MessageKey, string>>;

// A "?" that opens a guide video in place (decision F56's addendum of
// 2026-10-18): Trezor's, where the approved video of how a vault works in
// an Organization (`vault-overview`, DEV-6631, design-system-lazurio#93) is
// true of this Environment (guides.ts `vaultHelp`). The shell's guide draws
// rings and cards, not a video, and a new scene was not to be made, so the
// page plays the video itself, under its heading, with the one line under
// it that the video does not say. The person's press of the "?" starts it;
// with less motion it opens at its poster and plays when the person starts
// it. The "?" again, Escape, or the page moving on closes it, and the focus
// goes back to the "?". The player is guide-video.ts's: the browser's own,
// no sound, nothing loaded before it opens.
// A guide video in place, under its page's heading (decision F56's addenda
// of 2026-10-18 and 2026-10-19): Trezor's, where the approved video of how a
// vault works in an Organization (`vault-overview`, DEV-6631,
// design-system-lazurio#93) is true of this Environment (guides.ts
// `vaultHelp`). The shell's guide draws rings and cards, not a video, so the
// page shows the video itself, with the one line under it that the video
// does not say. It is the first thing the page shows: it stands open as the
// page opens, at its poster, playing nothing and moving no focus, and the
// person starts it. The "?" closes it and opens it again (and then plays
// it; with less motion it waits at its poster); Escape closes it. Closed by
// the person, it stays closed until the page moves on, and the next visit
// opens it again. The player is guide-video.ts's: the browser's own, no
// sound, nothing but its poster loaded before it plays.

/** Where the box stands, kept per visit of a page. */
export type HelpVideoVisit = Readonly<{
/** The page the box was last drawn on, null before the first drawing. */
page: string | null;
/** Whether the person closed it on that page. */
closed: boolean;
}>;

/** One drawing of the page: whether the box stands open, and the visit it
* leaves. It opens where the video applies (its words are true of this
* Environment); a new page starts a new visit, and within one the person's
* closing holds. */
export function helpVideoDrawing(
visit: HelpVideoVisit,
now: Readonly<{ page: string; applies: boolean }>,
): Readonly<{ open: boolean; visit: HelpVideoVisit }> {
const closed = visit.page === now.page && visit.closed;
return {
open: now.applies && !closed,
visit: { page: now.page, closed },
};
}

export function createHelpVideo(
options: Readonly<{
Expand All @@ -34,15 +59,20 @@ export function createHelpVideo(
) {
let player: Readonly<{ render(): void }> | null = null;
let invoker: HTMLElement | null = null;
let visit: HelpVideoVisit = { page: null, closed: false };

const video = () => options.slot.querySelector("video");
const still = () =>
window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;

function open(from: HTMLElement): void {
// The box open at the video's start, nothing playing and the focus where
// it was: at its poster the first time, at its first frame on a later
// visit once it played.
function show(from: HTMLElement): void {
invoker = from;
options.box.hidden = false;
from.setAttribute("aria-expanded", "true");
if (!options.box.hidden) return;
options.box.hidden = false;
if (player === null)
player = createGuideVideo(options.slot, {
name: options.name,
Expand All @@ -52,7 +82,16 @@ export function createHelpVideo(
locale: options.locale,
open: true,
});
else player.render();
else {
player.render();
const shown = video();
if (shown !== null && shown.currentTime > 0) shown.currentTime = 0;
}
}

// The person's "?": the box open, and the video playing from its start.
function open(from: HTMLElement): void {
show(from);
const shown = video();
if (shown === null) return;
shown.currentTime = 0;
Expand Down Expand Up @@ -83,19 +122,31 @@ export function createHelpVideo(
event.preventDefault();
const back = invoker;
close();
visit = { ...visit, closed: true };
if (back?.isConnected) back.focus({ preventScroll: true });
});

return Object.freeze({
/** The "?" pressed: opens the video, or closes it again. */
/** The "?" pressed: opens the video and plays it, or closes it again. */
toggle(from: HTMLElement): void {
if (options.box.hidden) open(from);
else {
if (options.box.hidden) {
open(from);
visit = { ...visit, closed: false };
} else {
close();
visit = { ...visit, closed: true };
from.focus({ preventScroll: true });
}
},
close,
/** The page drawn: `from` is the "?" where the video is true of it,
* null where it is not (the box closes); `page` names the page, so a
* new visit opens it again. */
draw(from: HTMLElement | null, page: string): void {
const drawn = helpVideoDrawing(visit, { page, applies: from !== null });
visit = drawn.visit;
if (from !== null && drawn.open) show(from);
else close();
},
/** Whether it is open now. */
get open(): boolean {
return !options.box.hidden;
Expand Down
13 changes: 8 additions & 5 deletions src/launchpad/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ function drawGuide(route: PageRoute) {
help.setAttribute("aria-label", copy.pageHelp);
help.title = copy.pageHelp;
}
if (videoHelp === null) vaultVideo.close();
// Trezor's video stands open first where its words are true (F56's
// addendum of 2026-10-19); a new page is a new visit.
vaultVideo.draw(videoHelp, JSON.stringify(route));
}
// The documentation of the Launchpad's "Guide" (the root Launchpad's
// `guideDocumentationUrl`), in the page's language.
Expand Down Expand Up @@ -1029,16 +1031,17 @@ const vaultPage = createVaultPagePanel({
if (framed) drawGuide(shell.route());
},
});
// Trezor's "?" where the approved video of how a vault works is true of
// this Environment (guides.ts `vaultHelp`): the video in place, under the
// page's heading (page-help.ts).
// Trezor's video where the approved video of how a vault works is true of
// this Environment (guides.ts `vaultHelp`): in place, under the page's
// heading, open as the page opens, its "?" closing and reopening it
// (page-help.ts).
const vaultVideoBox = document.querySelector<HTMLElement>("#vault-video");
const vaultVideoSlot = document.querySelector<HTMLElement>(
"#vault-video-player",
);
const vaultVideo =
vaultVideoBox === null || vaultVideoSlot === null
? { toggle() {}, close() {}, open: false, render() {} }
? { toggle() {}, draw() {}, open: false, render() {} }
: createHelpVideo({
box: vaultVideoBox,
slot: vaultVideoSlot,
Expand Down
Loading
Loading