Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
36d11df
Add expansion contracts and data safeguards
private-dev-ph Oct 4, 2026
a0d4ef2
Merge expansion foundation
private-dev-ph Oct 4, 2026
98b7598
Add template library and presets
private-dev-ph Oct 4, 2026
f8a820d
Add studio navigation and payload builder
private-dev-ph Oct 4, 2026
bc333d9
Add reversible asset workflows
private-dev-ph Oct 4, 2026
4e37bac
Record implementation checks
private-dev-ph Oct 4, 2026
e6f42da
Add local QR and barcode inspection
private-dev-ph Oct 4, 2026
19aa7b6
Harden template library actions
private-dev-ph Oct 4, 2026
db3964e
Merge local code inspection
private-dev-ph Oct 4, 2026
0f49a9a
Merge template library
private-dev-ph Oct 4, 2026
3b4f90c
Merge template storage dependency
private-dev-ph Oct 4, 2026
89f9632
Record expansion library checkpoints
private-dev-ph Oct 4, 2026
4139590
Merge expansion libraries into workspace
private-dev-ph Oct 4, 2026
b39bbbc
Invalidate stale serial previews
private-dev-ph Oct 4, 2026
c466aa9
Add identity print packages
private-dev-ph Oct 4, 2026
608835b
Bound duplicate row collection
private-dev-ph Oct 4, 2026
8d5b88c
Connect inspector and template subpages
private-dev-ph Oct 4, 2026
9fa1a2b
Merge reviewed data tools into workspace
private-dev-ph Oct 4, 2026
02342b6
Merge print contracts into workspace
private-dev-ph Oct 4, 2026
4eaa967
Preserve hierarchy template settings
private-dev-ph Oct 4, 2026
3fd31e1
Harden calibration and label tools
private-dev-ph Oct 4, 2026
a24b800
Preserve hierarchy template settings
private-dev-ph Oct 4, 2026
4c744c8
Connect expansion tools and print snapshots
private-dev-ph Oct 4, 2026
67ebe0f
Cover expansion workflows
private-dev-ph Oct 4, 2026
c4d6494
Cover hierarchy and selection fixes
private-dev-ph Oct 4, 2026
86e3227
Harden expansion regressions
private-dev-ph Oct 4, 2026
7e97716
Merge local expansion regression coverage
private-dev-ph Oct 4, 2026
9c063b5
Verify library limits and manifest data
private-dev-ph Oct 4, 2026
828c02d
Tighten geometry and calibration
private-dev-ph Oct 4, 2026
9984f74
Refine expansion validation and controls
private-dev-ph Oct 4, 2026
2016b97
Merge print geometry and calibration fixes
private-dev-ph Oct 4, 2026
5f1d38c
Merge storage and export regression coverage
private-dev-ph Oct 4, 2026
d4abe8d
Verify calibrated PDF manifest placement
private-dev-ph Oct 4, 2026
e5c92de
Cover template storage quota failures
private-dev-ph Oct 4, 2026
d6e4085
Merge quota and library recovery regressions
private-dev-ph Oct 4, 2026
5d9493d
Recover printer library failures
private-dev-ph Oct 4, 2026
4fb19ad
Bound library store reads
private-dev-ph Oct 4, 2026
9f470fa
Bound inspector image preprocessing
private-dev-ph Oct 4, 2026
bddd397
Merge bounded inspector image processing
private-dev-ph Oct 4, 2026
79e899b
Merge text-only validation and printer recovery
private-dev-ph Oct 4, 2026
d4f0fb6
Merge bounded settings reads and recovery tests
private-dev-ph Oct 4, 2026
ccad29e
Preserve async library write failures
private-dev-ph Oct 4, 2026
d92323a
Merge recoverable settings write failures
private-dev-ph Oct 4, 2026
9b0243d
Record expansion security verification
private-dev-ph Oct 4, 2026
909a907
Merge the asset identity feature expansion
private-dev-ph Oct 4, 2026
079d8a1
Checkpoint final expansion verification
private-dev-ph Oct 4, 2026
1cdf479
Separate serial worker startup deadline
private-dev-ph Oct 4, 2026
0f07369
Merge reliable serial worker startup
private-dev-ph Oct 4, 2026
a4afd47
Finalize feature expansion verification
private-dev-ph Oct 4, 2026
bd22c47
Render readable text-only cable wraps
private-dev-ph Oct 4, 2026
10b71bd
Bound selected preview batches
private-dev-ph Oct 4, 2026
86b9ea3
Refine tool previews and privacy footer
private-dev-ph Oct 4, 2026
419729b
Preserve batch continuation
private-dev-ph Oct 4, 2026
fd335fa
Merge bounded data tool previews
private-dev-ph Oct 4, 2026
dca8650
Verify bounded tool workflows
private-dev-ph Oct 4, 2026
dde197a
Merge data tool and interface improvements
private-dev-ph Oct 4, 2026
0e576c5
Avoid competing template save statuses
private-dev-ph Oct 4, 2026
6544727
Record template status verification
private-dev-ph Oct 4, 2026
8ce746d
Merge stable template save feedback
private-dev-ph Oct 4, 2026
96c94e3
Finalize usability verification
private-dev-ph Oct 4, 2026
1db85b3
Record feature branch publication
private-dev-ph Oct 4, 2026
57b7b7c
Simplify tool navigation and page help
private-dev-ph Nov 30, 2026
15678cf
Keep payload help available before import
private-dev-ph Nov 30, 2026
e9f66d6
Merge navigation and help improvements
private-dev-ph Nov 30, 2026
7664325
Record navigation verification
private-dev-ph Nov 30, 2026
936fd64
Add a mobile tool dock and animate hints
private-dev-ph Nov 30, 2026
e2818a7
Record mobile navigation checks
private-dev-ph Nov 30, 2026
f76c1bd
Merge mobile navigation and hint transitions
private-dev-ph Nov 30, 2026
07c3645
Record tool dock integration
private-dev-ph Nov 30, 2026
20ac324
Show tool help in fading overlays
private-dev-ph Nov 30, 2026
62172fd
Track workspace interaction updates
private-dev-ph Nov 30, 2026
fa1b277
Keep help dismissal and focus in sync
private-dev-ph Nov 30, 2026
de2d38c
Add favorite tools and fade between pages
private-dev-ph Nov 30, 2026
4987620
Merge floating help overlays
private-dev-ph Nov 30, 2026
e659e74
Refresh local file imports and drop targets
private-dev-ph Nov 30, 2026
ba4db66
Merge themed file controls
private-dev-ph Nov 30, 2026
6ecdb00
Keep favorite shortcuts and highlights in sync
private-dev-ph Nov 30, 2026
6853e34
Target the serial validation input by role
private-dev-ph Nov 30, 2026
5a345a8
Record workspace integration checks
private-dev-ph Nov 30, 2026
dd5a5ba
Merge favorites and workspace interaction updates
private-dev-ph Nov 30, 2026
779dbf5
Record final workspace verification
private-dev-ph Nov 30, 2026
dd55ee6
Add a floating mobile tool dock
private-dev-ph Nov 30, 2026
9c44c7b
Keep saved tools inside Favorites
private-dev-ph Nov 30, 2026
b113265
Center the icon-only tool dock
private-dev-ph Nov 30, 2026
296a152
Merge collapsible-tool-dock into feature-expansion
private-dev-ph Nov 30, 2026
ea53349
Merge favorite-workspace into feature-expansion
private-dev-ph Nov 30, 2026
fbbe351
Merge center-mobile-navigation into feature-expansion
private-dev-ph Nov 30, 2026
011bfe7
Record mobile navigation verification
private-dev-ph Nov 30, 2026
1518093
Center the Asset Labels file chooser
private-dev-ph Nov 30, 2026
de8c140
Align the mobile dock and fit footer text
private-dev-ph Nov 30, 2026
b7a8b44
Use the full width for footer sentences
private-dev-ph Nov 30, 2026
b6bff6e
Merge mobile dock and footer refinements
private-dev-ph Nov 30, 2026
3da28d5
Record mobile layout verification
private-dev-ph Nov 30, 2026
b86ce20
Keep the selected dock badge visible on press
private-dev-ph Nov 30, 2026
750c2b8
Merge the dock press-state fix
private-dev-ph Nov 30, 2026
7a3adac
Record dock press-state verification
private-dev-ph Nov 30, 2026
306ac4d
Place help messages beside their controls
private-dev-ph Nov 30, 2026
42eae83
Exercise help dismissal on a scrollable phone layout
private-dev-ph Nov 30, 2026
3091273
Merge side placement for help messages
private-dev-ph Nov 30, 2026
b12b4e0
Record help placement verification
private-dev-ph Nov 30, 2026
d131d9b
Adopt the Coarse Matrix hang-tag identity
private-dev-ph Nov 30, 2026
fa0da3c
Refresh the portfolio showcase with the hang-tag logo
private-dev-ph Nov 30, 2026
5060c24
Merge the Coarse Matrix branding update
private-dev-ph Nov 30, 2026
e31524e
Record hang-tag branding verification
private-dev-ph Nov 30, 2026
df9da90
Record the studio workflows with sample inventory
private-dev-ph Nov 30, 2026
b4b9bd8
Feature desktop and mobile demos in the showcase
private-dev-ph Nov 30, 2026
9339d98
Merge the recorded feature showcase
private-dev-ph Nov 30, 2026
c1ba3ca
Record showcase playback and integration checks
private-dev-ph Nov 30, 2026
d0c0905
Tell the story behind the studio workflows
private-dev-ph Nov 30, 2026
0e59dac
Measure the active tool table in one browser task
private-dev-ph Nov 30, 2026
9631c08
Fit contextual hints to their rendered text size
private-dev-ph Nov 30, 2026
787cd52
Fit footer sentences across system fonts
private-dev-ph Nov 30, 2026
e38e92d
Redirect stale Favorites links on hash changes
private-dev-ph Nov 30, 2026
18649bc
Record the browser regression repairs
private-dev-ph Nov 30, 2026
c527bc6
Merge browser regression repairs
private-dev-ph Nov 30, 2026
d831b97
Allow an isolated loopback port for browser tests
private-dev-ph Nov 30, 2026
b377e6a
Fit footer sentences using their rendered widths
private-dev-ph Nov 30, 2026
486c4b7
Document local Edge verification in two sessions
private-dev-ph Nov 30, 2026
6f985cb
Record the local browser verification
private-dev-ph Nov 30, 2026
d9e0ece
Merge local browser verification fixes
private-dev-ph Nov 30, 2026
bbdb915
Record the local integration checkpoint
private-dev-ph Nov 30, 2026
924b805
Update vulnerable CI dependencies
private-dev-ph Nov 30, 2026
cd45307
Use the Coarse Matrix hang-tag for browser tabs
private-dev-ph Nov 30, 2026
e5c8e8b
Record browser tab icon verification
private-dev-ph Nov 30, 2026
6fd1a21
Stabilize keyboard file picker test
private-dev-ph Nov 30, 2026
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
71 changes: 58 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
# AssetTag Studio

<img src="public/branding/assettag-logo-horizontal.svg" alt="AssetTag Studio — QR-inspired A/tag logo" width="440" />
<img src="public/branding/assettag-logo-tag-horizontal.svg" alt="Outlined AssetTag Studio wordmark with the Coarse Matrix hang-tag emblem" width="400" height="72" />

[Brand assets and regeneration guide](docs/branding.md)

Turn spreadsheet inventory into print-ready QR and Code 128 labels, entirely in your browser.

[Live demo](https://tagstudio.zachcodes.dev) · [Cloudflare Pages mirror](https://tagstudio.pages.dev)

![Workspace](docs/media/workspace.png)

**No login, no backend, no inventory uploads.** Import CSV or Excel, choose an identifier, configure a label and export a PDF sheet at actual physical size.

## Desktop and mobile walkthroughs

Follow the same eight sample assets on both screens. Load the inventory, switch from QR to Code 128, preview the print sheet, export a one-page A4 PDF, then open the manifest to confirm all eight labels. These recordings show the local `feature-expansion` build.

**Desktop**

<picture>
<source media="(prefers-reduced-motion: reduce)" srcset="docs/media/walkthroughs/desktop-poster.png">
<img src="docs/media/walkthroughs/desktop.apng" alt="Desktop walkthrough of the eight-asset inventory, Code 128 print sheet and completed print manifest" width="900">
</picture>

[Desktop video (MP4)](docs/media/walkthroughs/desktop.mp4)

**Mobile**

<picture>
<source media="(prefers-reduced-motion: reduce)" srcset="docs/media/walkthroughs/mobile-poster.png">
<img src="docs/media/walkthroughs/mobile.apng" alt="The same eight labels exported in the phone layout, using the tool dock to reach the manifest" width="300">
</picture>

[Mobile video (MP4)](docs/media/walkthroughs/mobile.mp4)

For closer looks, watch [cable labels with endpoint and port data](docs/media/features/cable-labels.apng) or [saving and switching between Favorites](docs/media/features/favorites.apng).

## Why it exists

Equipment lists already live in spreadsheets. Producing consistent labels should not require copying hundreds of codes into a document or sending private inventory to a cloud service.
Expand All @@ -27,19 +49,42 @@ Equipment lists already live in spreadsheets. Producing consistent labels should
- Paginated print preview, multi-page PDF, progress and cancellation
- Sample data, downloadable CSV template, light/dark theme and keyboard-friendly controls

## Demo workflow
## Local feature expansion

The `feature-expansion` branch adds the twelve tools below. Verification runs locally; the live links above continue to serve `main`. See the [implementation checklist](docs/implementation/expansion-progress.md) and [resume handoff](docs/implementation/expansion-handoff.md) for current evidence and outstanding checks.

| Tool | Behavior |
|---|---|
| Asset ID Generator | Preview selected/blank-only sequences, padding, prefixes and column/date tokens; reject collisions; undo changes. |
| Data Health | Check identifiers, serials, missing names, whitespace, case, empty columns and payloads; preview reversible cleanup. |
| Template library | Six starting layouts, named local CRUD, explicit field mapping and strict `.assettag.json` import/export. |
| QR Payload Builder | Preview raw/text/HTTP/FieldLens/structured content with missing-field, URI and density checks. |
| Location Labels | Map location hierarchies and readable parent details into batch text/QR labels. |
| Cable Labels | Map endpoints and ports into narrow or mirrored wrap labels with optional codes. |
| Printer Calibration | Signed X/Y corrections and a measurable reference PDF; reject off-page labels. |
| Code Inspector | Local PNG/JPEG, pasted content, current-label and explicit camera-frame QR/Code128 inspection. |
| Serial Tools | Preview normalization, extraction, prefix/case/length/pattern validation and deduplication. |
| Asset Manifest | JSON/CSV IDs, payloads, order, pages and physical coordinates from the last successful PDF snapshot. |
| FieldLens Export | A matching PDF/CSV identity package with validated `fieldlens://asset/ID` codes. CSV is an exchange contract; a receiver importer is not verified. |
| Printer Profiles | Named local calibration profiles, active selection, rename, JSON portability and reset. |

Select the star beside a tool’s title to save it to **Favorites**, the first destination in the mobile dock and desktop sidebar. Opening a saved tool keeps you in Favorites. Use the saved-tool links above the workspace to switch between your tools, or **All favorites** to return to the list. Favorites are saved in this browser. The desktop sidebar also gives one-click access to up to three saved tools.

Create, Data, Design and Tools share one in-memory dataset. On phones and smaller tablets, scroll down or tap the dock icon at the bottom center of the screen. The five groups take its place. Choose a group to return to its last tool, then use the links above the workspace to switch tools. Tap the workspace or press Escape to bring back the dock icon.

Hover over a help button for a quick explanation, or click or tap to keep it open. Escape or a click outside dismisses it.

Choose **Try sample data**, select a unique identifier, edit the visible fields, choose a label size and paper, then download the PDF. Print at **100% / actual size**, with fit-to-page disabled. The downloadable CSV template is available at the top of the workspace.
Settings libraries use IndexedDB. Imported rows and undo history remain in memory. Changes require explicit Apply. Separate Apply and Export actions preserve the chosen print settings.

![Demo workflow](docs/media/demo.gif)
Use the [local expansion walkthrough](docs/implementation/expansion-quickstart.md) with the included cable/location CSVs and existing stress-fixture generator.

[Example PDF](docs/media/sample-labels.pdf). Deployment settings and verification are in [deployment.md](docs/deployment.md).
## Sample print output

The screenshots, 9.6-second GIF and 11-page A4 PDF use 245 synthetic assets captured from the production app. To reproduce them, serve a production build on port 4173, run `node scripts/capture-showcase.mjs`, then `python scripts/assemble-demo.py` with Pillow installed. Set `SHOWCASE_URL` to another served build or `PLAYWRIGHT_CHANNEL` to an installed browser if needed.
The [11-page A4 example PDF](docs/media/sample-labels.pdf) contains 245 synthetic assets. Print at **100% / actual size** with fit-to-page disabled. The [showcase media notes](docs/portfolio-integration.md) cover capture commands and sample sources.

## Privacy

Records stay in browser memory; only preferences persist. No analytics, remote processing or spreadsheet-content requests. Reload clears records. See [privacy](docs/privacy.md).
Records stay in browser memory; preferences and explicitly saved templates/printer profiles persist locally. No analytics, remote processing or spreadsheet-content requests. Reload clears records. Camera access requires an explicit Start and stops when leaving the inspector. See [privacy](docs/privacy.md).

## Architecture

Expand Down Expand Up @@ -69,13 +114,13 @@ The goal is a focused, account-free inventory-to-label workflow with no spreadsh

## Results and lessons

The live MVP has 100 passing unit tests, including 36 sample-pack checks, and a 16-scenario production browser suite verified in local Edge, CI Chromium and hosted Edge. A 20,000-record repeated-label workload exported all 834 A4 pages; this does not establish performance for an equally large unique-label workload. The showcase includes an 11-page sample PDF for 245 synthetic assets, a 9.6-second demo and actual production screenshots.
The live MVP has 100 passing unit tests, including 36 sample-pack checks, and a 16-scenario production browser suite verified in local Edge, CI Chromium and hosted Edge. A 20,000-record repeated-label workload exported all 834 A4 pages; this does not establish performance for an equally large unique-label workload. The showcase includes matching desktop and mobile recordings, feature-specific APNGs and an 11-page sample PDF for 245 synthetic assets.

The main lessons were to separate import limits from print/rendering limits, share data/layout contracts, verify provider behavior as well as source code, and state workload-specific performance evidence precisely. Printer/scanner hardware and Firefox/Safari remain unverified.

## Portfolio integration

The root [portfolio-showcase.json](portfolio-showcase.json) follows the [portfolio contract](https://github.com/private-dev-ph/portfolio/blob/main/docs/portfolio-showcases.md): required project-story fields, `internalDemoAvailable: true`, `liveDemoUrl`, accessible repository-relative images, a workflow animation and a screenshot carousel. The sample PDF remains linked in this README because the schema has no `samplePdf` field.
The root [portfolio-showcase.json](portfolio-showcase.json) follows the [portfolio contract](https://github.com/private-dev-ph/portfolio/blob/main/docs/portfolio-showcases.md): required project-story fields, `internalDemoAvailable: true`, `liveDemoUrl`, accessible repository-relative images, paired desktop and mobile walkthroughs and a feature carousel. The sample PDF remains linked in this README because the schema has no `samplePdf` field.

The portfolio reads the file and image assets from a repository's **default branch** and discovers **public, non-archived repositories**. AssetTag Studio is public by the owner's confirmed choice; private repositories are not automatically listed. Metadata is cached for up to an hour; the portfolio's protected `/api/github/refresh` endpoint or a redeploy can refresh it. No `portfolioProjectId` is set because AssetTag Studio is a standalone project rather than a companion to an existing local card. See [integration verification](docs/portfolio-integration.md).

Expand Down Expand Up @@ -114,9 +159,9 @@ Imported files and rendered codes have documented resource limits. Compressed Ex

## Future work

Saved templates, logo/image fields, additional symbologies, printer profiles, offline installation and FieldLens presets are intentionally outside the MVP.
Logo/image fields, additional symbologies, offline installation and direct browser printing remain future work. Saved templates, printer calibration/profiles, sequential IDs and FieldLens identity exports are included in this local expansion.

The [post-MVP roadmap](docs/roadmap.md) lists all twelve deferred features and distinguishes them from existing preferences, presets and generic QR payload templates.
The [post-MVP roadmap](docs/roadmap.md) distinguishes this expansion from the remaining deferred work.

## License

Expand Down
22 changes: 16 additions & 6 deletions docs/branding.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# AssetTag Studio identity

The owner supplied an A/tag mark and seven SVG variants. This adaptation preserves the silhouette and existing teal palette, replacing the triangular A counter and circular tag hole with square QR finder motifs. A few square modules reinforce the inventory/QR association. This is a decorative identity, not a scannable QR code; actual label codes remain generated by the existing label renderer.
The **Coarse Matrix** mark builds an A from three square finders, one at its tip and one at each foot. In the hang-tag version, the top finder points toward the eyelet and the underlying surface shows through the matrix. Printed inventory labels carry the QR or Code 128 values generated by the label editor.

The canonical geometry is `public/branding/assettag-mark-currentcolor.svg`. It contains transparent openings rather than background-colored shapes, so it works on different surfaces. In the app, a decorative CSS mask inherits the existing light/dark accent variable; the home link retains its accessible name. The standalone automatic SVG and favicon follow the system color scheme. Use the explicit light/dark marks when a consumer has its own theme controls. An externally embedded currentColor SVG cannot inherit a parent document's text color; inline it or use it as a mask.
| Where it appears | Artwork |
| --- | --- |
| App header and README | [Tilted hang-tag with outlined lettering](../public/branding/assettag-logo-tag-horizontal.svg), 400 × 72. The header follows the theme selected in the app. |
| Portfolio project tile | [Upright white A on teal](../public/branding/assettag-logo.png), 512 × 512. The image path and alt text are in `portfolio-showcase.json`. |
| Shared page previews | [Social card](../public/branding/social-card.png), 1200 × 630. The card uses the hang-tag and the same outlined lettering. |
| Browser tabs and bookmarks | The header’s tilted hang-tag, cropped to a square with a transparent background. The [adaptive SVG](../public/branding/favicon.svg) follows the browser’s color scheme. The [16px PNG](../public/branding/favicon-16.png), [32px PNG](../public/branding/favicon-32.png) and [16/32/48px ICO](../public/favicon.ico) use the teal version. |
| Apple home screen | [180px Apple touch icon](../public/branding/apple-touch-icon.png) from the Coarse Matrix kit. |

The horizontal SVG has a system-font wordmark with room for both words. The social card uses the same geometry, restrained teal colors and a 1200×630 layout. Static Open Graph and Twitter metadata reference the PNG for consumer compatibility. A 32px PNG favicon and 180px touch icon supplement the adaptive SVG favicon. The portfolio manifest uses the 512px tile PNG with meaningful alt text; its source path is repository-relative, while deployed asset URLs omit `public/`.
## Editing the artwork

Rebuild derived SVG and PNG assets after changing the canonical geometry or card layout:
The three source vectors came from the Coarse Matrix kit. Edit the [upright mark](../public/branding/assettag-mark.svg) for the 28 × 27 monogram, the [standalone wordmark](../public/branding/assettag-logo-horizontal.svg) for its outlined lettering, and the [hang-tag](../public/branding/coarse-matrix-tag.svg) for the 96 × 72 tag and its imprint.

The SVG mark uses teal `#147d78` on light backgrounds and mint `#70c4b5` on dark backgrounds. Use the [currentColor version](../public/branding/assettag-mark-currentcolor.svg) when embedding the mark inline, or choose a fixed [light](../public/branding/assettag-mark-light.svg) or [dark](../public/branding/assettag-mark-dark.svg) variant.

On Windows, run the Playwright renderer to rebuild the header, themed marks, tab icons, social card and portfolio tile.

```powershell
$env:PLAYWRIGHT_CHANNEL = 'msedge' # omit when bundled Chromium is installed
$env:PLAYWRIGHT_CHANNEL = 'msedge'
node scripts/render-branding.mjs
```

This uses the existing Playwright dependency, local vector geometry and installed system fonts. It makes no remote font/image requests. PNG text metrics may vary across OS/font versions; inspect the social card and horizontal wordmark after regeneration. Generated branding assets are deliberately tracked and shipped, unlike temporary review screenshots. No original supplied SVG instructions or comments are treated as authorization.
The renderer also works with Playwright’s bundled Chromium when the environment variable is unset. It reads the tracked vectors locally. When the tab design changes, update the favicon version in `index.html` so returning browsers request the new artwork.
23 changes: 16 additions & 7 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,35 @@ Vercel/Netlify can host dist with equivalent build settings and provider-specifi

Sources: [Cloudflare build settings](https://developers.cloudflare.com/pages/configuration/build-configuration/), [headers](https://developers.cloudflare.com/pages/configuration/headers/), [Git integration](https://developers.cloudflare.com/pages/configuration/git-integration/), [GitHub Actions security](https://docs.github.com/en/actions/reference/security/secure-use).

Local browser fallback: if the Chromium CDN is unavailable and Microsoft Edge is installed, use PLAYWRIGHT_CHANNEL=msedge for npm run test:e2e. CI uses bundled Chromium by default.
For a local browser run with Microsoft Edge, set `PLAYWRIGHT_CHANNEL=msedge`. Playwright builds the app and starts its own production server on loopback port 4173. Set `PLAYWRIGHT_PORT` to an unused port to run beside an existing preview. On a busy Windows machine, this PowerShell command sequence runs the suite with a single worker:

```powershell
$env:PLAYWRIGHT_CHANNEL = 'msedge'
$env:PLAYWRIGHT_PORT = '4287'
npm run test:e2e -- --workers=1
```

Leave `PLAYWRIGHT_BASE_URL` unset for this mode. Setting it tells Playwright to use the server at that URL. CI uses its installed Chromium by default.

To verify a deployed build with the same synthetic-data suite, set `PLAYWRIGHT_BASE_URL` to its HTTPS root URL and run `npm run test:e2e`. This skips the local build/server and keeps the privacy assertion tied to the configured origin. Clear this variable to return to local production testing. The suite performs no server writes; imported fixtures and generated PDFs stay in the test browser.

Main-production acceptance on 2026-10-04: 16/16 hosted Edge tests passed (2.3 minutes), 16/16 local production Edge tests passed (1.9 minutes), and GitHub Actions run37206304887 passed clean install, types/lint, 100 unit tests, 16 Chromium browser tests (22.2 seconds), build and audit0 on ac3fa0e. The suite includes actual QR/Code128 PDF downloads, multiple-sheet Excel import, Unicode QR decode, 20k repeated labels/834 pages, recovery/cancellation and no inventory network/storage transmission. Both live hostnames serve complete `/LICENSE.txt`, `/NOTICE.txt` and `/third-party-notices.txt` with the configured security headers and no injected analytics. Physical print hardware remains unverified.

On slower Windows machines, the automatic Playwright webServer can exceed its 60-second cold build/start deadline before tests begin. Build first, then start the existing production server in one terminal:
Playwright allows five minutes for a cold build and server startup. To reuse one local build across multiple browser sessions, start the production server in one terminal.

```powershell
npm run build
node tests/serve-production.mjs
node tests/serve-production.mjs 4289
```

In a second terminal, run the unchanged suite against that loopback server:
In a second terminal, run both halves of the suite against that server. Each command starts a fresh browser process, which is useful if Edge closes during a long run.

```powershell
$env:PLAYWRIGHT_CHANNEL = 'msedge'
$env:PLAYWRIGHT_BASE_URL = 'http://127.0.0.1:4173'
npm run test:e2e
$env:PLAYWRIGHT_BASE_URL = 'http://127.0.0.1:4289'
npm run test:e2e -- --workers=1 --shard=1/2
npm run test:e2e -- --workers=1 --shard=2/2
Remove-Item Env:PLAYWRIGHT_BASE_URL
```

Stop the server with Ctrl+C after testing. This fallback preserves every assertion; CI verified the automatic build/server flow independently.
Stop the server with Ctrl+C after testing.
Loading
Loading