Skip to content

WIP: overhaul Studio, commissions, media, accessibility, and visual QA - #6

Draft
lowestprime wants to merge 43 commits into
masterfrom
codex/sitewide-studio-ux-commission-overhaul-20260711
Draft

WIP: overhaul Studio, commissions, media, accessibility, and visual QA#6
lowestprime wants to merge 43 commits into
masterfrom
codex/sitewide-studio-ux-commission-overhaul-20260711

Conversation

@lowestprime

@lowestprime lowestprime commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds additive SQLite migrations, normalized piece-media and commerce policies, transactional media organization, and atomic reversible inline editing.
  • Reworks Studio content/media workflows, category icon management, responsive public editing, theme behavior, accessible navigation, and mounted-library profile-image selection.
  • Adds a secure resumable custom-work workflow with server-authoritative estimates, private attachments, idempotent submission, opaque project access, and a route-local proportional R3F preview with deterministic fallbacks.
  • Adds strict live-readonly and isolated snapshot-lab visual archives with protected inventory, responsive/theme/deep-state coverage, resumable manifests, bounded parallel capture/report/validation, checksums, diagnostics, and differential evidence.
  • Adds safe standalone builds plus paired SQLite/media/environment backup and staging-only restore tooling for the Synology release process.

Why

The sitewide overhaul makes Studio changes rebuild-safe and auditable, keeps customer and media operations transactional, and establishes release evidence that cannot mutate production. Client review has since rejected every overlapping, fanned, or stacked grouped-media presentation. That sitewide non-overlapping collection redesign, its browser acceptance matrix, measured GPU/archive acceleration, and final real-production archive are active required work and are not represented as complete here.

Files / areas touched

  • site/app, site/components, and site/lib for Studio, commissions, media, themes, accessibility, security, persistence, inline editing, and migrations.
  • site/scripts and Dockerfile for safe standalone output and paired runtime recovery.
  • visual-audit/ and the visual-audit Compose files for two-mode capture, reporting, validation, route-integrity diagnostics, and disposable smoke automation.
  • PLANS.md, README.md, admin.md, docs/visual-archive.md, synology-nas-deploy.md, and the architecture reference.

Validation

  • At exact commit e06e914, 65 application tests, typecheck, lint, production build, safe standalone-output checks, and 57 visual-audit tests passed.
  • Exact linux/amd64 images exist for woodsmith:candidate-e06e9140 and woodsmith-visual-audit:candidate-e06e9140, each labeled with the full e06e914 revision.
  • Exact-image live-readonly and snapshot-lab smoke runs passed with zero failures, unexpected diagnostics, server-log failures, successful unsafe requests, or run-specific residual containers/volumes. Snapshot lab additionally proved SQLite clone integrity, one controlled save with cleanup, zero residual drafts, and unchanged source data/media.
  • Current read-only NAS preflight confirms repository HEAD e06e914, SQLite quick_check=ok, the real media/data/cache mounts, direct application HTTP 200, and public https://woodmat.ch HTTP 200.
  • No hosted checks are attached to the current PR head.

Caveats / follow-up

  • Keep this pull request in draft. The client-required non-overlapping media system has not yet been implemented or selected; the rejected presentation remains in the current source.
  • GPU capability, phase profiling, deterministic CPU/CUDA equivalence, and any materially beneficial acceleration remain unproven.
  • Production still runs revision 81b35c4, not e06e914. The configured local AI sidecar currently times out from the production application.
  • Retained interrupted/failed diagnostic archives remain protected. They are superseded as release evidence but must not be deleted until a final exact-commit post-deployment archive passes.
  • Final exact images, release artifact, Tier-2 production-clone archive, paired NAS backup/staged restore, deployment, persistence, rollback, Cloudflare differential, sidecar reconciliation, and Tier-3 live public/admin archive with real production media remain required.
  • Local persistence uses node:sqlite; current logs show Node's experimental warning for that API. Public scale-up should move to Postgres, LibSQL, or another stable production database.

@lowestprime
lowestprime requested a review from Copilot July 13, 2026 22:03
@lowestprime
lowestprime marked this pull request as ready for review July 13, 2026 22:04
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This draft PR introduces a large, cross-cutting overhaul spanning Studio/media workflows, commissions security + resumability, public-site accessibility/responsiveness, deployment hardening, and a new deterministic Playwright-based “visual archive / audit” toolchain intended for NAS operations and visual QA.

Changes:

  • Adds a standalone visual-audit/ package (Playwright + Sharp) plus NAS-focused scripts/compose files to capture, compare, report, validate, and retain visual archives in live-readonly and snapshot-lab modes.
  • Hardens build/deploy safety by gating Next standalone output (rejecting bundled SQLite/backup artifacts), adding build SHA propagation, and updating NAS deployment guidance and env templates.
  • Refactors public + Studio surfaces: normalized piece media roles/links, commissions workflow + access cookies + draft APIs, improved media HTTP caching/validators, and multiple accessibility/responsive UX upgrades.

Reviewed changes

Copilot reviewed 112 out of 114 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
visual-audit/tsconfig.json Adds TS config for the visual-audit subproject build output.
visual-audit/src/util.ts Shared filesystem + hashing + HTML escaping + atomic JSON helpers for audit tooling.
visual-audit/src/types.ts Defines the audit manifest/inventory/capture/diagnostic schema types.
visual-audit/src/tiling.ts Implements overlapping tiling math for scroll/page capture segmentation.
visual-audit/src/tiling.test.ts Node test coverage for tiling position/range logic.
visual-audit/src/readiness.ts Adds deterministic “visual ready” settling for Playwright captures.
visual-audit/src/policy.ts Adds same-origin + unsafe-method + token-eligibility policy helpers.
visual-audit/src/policy.test.ts Tests audit policy behavior (origins, methods, eligibility).
visual-audit/src/inventory.ts Builds audit route inventories from repo routes + admin inventory API.
visual-audit/src/diff.ts Produces baseline comparisons using pixel diffs + summary JSON output.
visual-audit/src/config.ts Defines environment-driven audit configuration and validation.
visual-audit/scripts/run-snapshot-lab.sh Automates snapshot-lab run orchestration + diff/report/validate.
visual-audit/scripts/run-live-audit.sh Automates live-readonly archive run orchestration.
visual-audit/scripts/prune-audits.sh Retention pruning for visual audit archive directories.
visual-audit/scripts/prepare-snapshot-lab.sh Creates isolated snapshot-lab data/media copies + secrets.
visual-audit/scripts/prepare-live-secrets.sh Extracts/creates audit secret files with safe perms.
visual-audit/package.json Adds pinned dependencies + build/test/capture/report/validate scripts.
visual-audit/Dockerfile Containerizes the visual-audit runner with pinned Playwright base image.
docker-compose.visual-audit-live.yml Live-readonly audit runner Compose definition (secrets/tmpfs/RO).
docker-compose.visual-audit-lab.yml Snapshot-lab Compose definition (internal net + lab woodsmith service).
synology-nas-deploy.md Updates NAS build args, seed/migration notes, media validator checks, and visual archive runbook pointers.
docs/visual-archive.md Referenced by docs as the operating guide for the new visual archive (added/linked by changes).
site/scripts/safe-build.test.mjs Adds tests for safe-build temp root cleanup + forbidden output detection.
site/scripts/safe-build.mjs Adds npm run build entrypoint that enforces the standalone runtime-data gate.
site/scripts/safe-build-lib.mjs Implements the safe-build standalone output scanner + disposable roots.
site/package.json Switches build to safe-build and expands the node:test suite list.
site/next.config.ts Adds image qualities + output tracing excludes to reduce bundled runtime state.
Dockerfile Propagates build SHA into build and runtime, aligning with inventory/audit metadata.
docker-compose.synology.yml Adds VISUAL_AUDIT_TOKEN(+limits) to the production compose environment.
.env.example Documents VISUAL_AUDIT_TOKEN and record limits.
.gitignore Ignores audit artifacts, lab outputs, and secrets directory.
.dockerignore Excludes audit artifacts/design/archive/secrets from Docker build context.
site/proxy.ts Adds visual-audit read-only mutation blocking behavior via a request header.
site/lib/visual-audit.ts Adds server-side audit token reading + request authorization helper.
site/lib/visual-audit-token.ts Adds constant-time audit token matching helper.
site/lib/visual-audit-policy.ts Adds server policy for audit read-only blocking by method + header.
site/lib/visual-audit-security.test.mts Tests token matching and read-only mutation policy.
site/app/api/visual-audit/inventory/route.ts Adds admin + token-protected inventory endpoint for audit tooling.
site/lib/ui-behavior.ts Adds URL-current logic + pan/zoom clamping utilities.
site/lib/ui-behavior.test.mts Tests navigation-current and bounded zoom/pan behaviors.
site/lib/site-structure.ts Adds normalization/validation for footer + homepage services structure.
site/lib/site-structure.test.mts Tests link safety + ordering/validation for site-structure normalization.
site/lib/seed.ts Adds typed footer/home-services seed structures + updates commissions page copy.
site/lib/request-security.ts Adds origin-validation helpers intended for mutation endpoints.
site/lib/piece-model.ts Adds normalized pricing/inquiry/reviews modes + eligibility helpers.
site/lib/piece-model.test.mts Tests pricing/inquiry/review mode behavior and cart eligibility rules.
site/lib/piece-media.ts Adds normalized piece media link parsing/validation.
site/lib/piece-media.test.mts Tests piece media link normalization and rejection of unsafe inputs.
site/lib/media-http.ts Adds ETag/Last-Modified + conditional request freshness helpers.
site/lib/media-http.test.mts Tests media validators and conditional request handling.
site/lib/media-operations.ts Adds transactional batch organization plan + compensated filesystem moves and rollback helpers.
site/lib/media-reference-transaction.test.mts Tests transactional rename reference rewriting across legacy + normalized media references.
site/lib/database-migrations.test.mts Tests additive/idempotent schema migration behavior and rollback safety.
site/lib/commission-security.ts Adds opaque capability cookie access + owner key computation utilities.
site/lib/commission-workflow.test.mts Adds broad workflow tests: drafts, idempotency, quotas, grants, uploads, and seed upgrade behavior.
site/lib/inline-edit-registry.test.mts Expands tests around registry validation, URL safety, transactions, and origin policy use.
site/lib/estimator.ts Generalizes visualizer kind handling + adds limits normalization and template resolution.
site/lib/estimator.test.mts Tests estimator normalization, template coverage, and future kind defaults.
site/lib/categories.ts Adds builtin/custom icon support + ordering/visibility and sanitization integration.
site/lib/category-icons.test.mts Tests builtin icon normalization and custom SVG sanitization constraints.
site/lib/catalog.ts Switches display media selection to normalized public links and re-exports piece policy helpers.
site/components/theme-toggle.tsx Updates theme synchronization behavior and SSR initial snapshot handling.
site/components/category-icon.tsx Adds new SVG icon set + supports custom sanitized icons.
site/components/studio-category-editor.tsx Adds Studio UI for managing category icons (builtin/custom), ordering, visibility, and aliases.
site/components/site-nav-link.tsx Adds client nav link that sets aria-current + data attribute for current route.
site/components/piece-media-editor.tsx Adds role/stage/publication editing UI for normalized piece media links.
site/components/inline-editable.tsx Switches to typed inline edit resource and createElement rendering.
site/components/header-shell.tsx Improves focus behavior so auto-hiding header doesn’t cover focused content.
site/components/forms.tsx Refactors contact/commission entry to use workflow component + adds idempotency + honeypot.
site/components/commission-draft-cleanup.tsx Removes legacy local draft key after successful project creation.
site/app/layout.tsx Adds skip link + main landmark target/focus improvements.
site/app/page.tsx Updates homepage services/commission call-to-action content and removes Process rail usage.
site/app/portfolio/page.tsx Switches portfolio filter icons to new CategoryIcon API + includes “all” as a category object.
site/app/portfolio/[slug]/page.tsx Adds build-record timeline + process media carousel and gates reviews/inquiry behavior via policy helpers.
site/app/shop/page.tsx Updates shop cards to Next/Image thumbnails and new inquiry/cart gating behavior.
site/app/shop/cart/page.tsx Switches cart thumbnails to Next/Image.
site/app/contact/page.tsx Supports optional “piece inquiry” routing and surfaces errors consistently.
site/app/commissions/page.tsx Plumbs signed-in defaults into the commission/contact workflow.
site/app/commissions/status/page.tsx Converts lookup to POST flow that avoids placing email addresses in URLs.
site/app/requests/[reference]/page.tsx Uses capability cookie access checks + POST lookup renewal flow instead of URL email gating.
site/app/media/[...slug]/route.ts Adds ETag/Last-Modified revalidation support and streams via Web ReadableStream.
site/app/api/commissions/draft/route.ts Adds CRUD API for server-side commission drafts with trusted-origin enforcement.
site/app/api/render-preview/route.ts Adds origin enforcement + quota gating + normalized input handling for photorealistic renders.
site/app/api/shop/local-reservation/route.ts Tightens cart eligibility checks via pieceCanEnterCart.
README.md Updates documentation to reflect new workflows, security model, accessibility, and visual audit tooling.
PLANS.md Adds a detailed progress ledger entry for the ongoing overhaul work.
admin.md Updates dashboard manual for new inline editing behavior, media organization, and visual archive guidance.
Files not reviewed (1)
  • visual-audit/package-lock.json: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread site/app/shop/page.tsx Outdated
Comment thread site/app/shop/page.tsx Outdated
Comment thread site/app/shop/cart/page.tsx Outdated
Comment thread site/app/media/[...slug]/route.ts
Comment thread site/lib/request-security.ts Outdated
Comment thread site/components/category-icon.tsx
Comment thread site/components/theme-toggle.tsx
@lowestprime
lowestprime marked this pull request as draft July 14, 2026 06:14
@lowestprime
lowestprime marked this pull request as ready for review July 17, 2026 05:00
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@lowestprime
lowestprime marked this pull request as draft July 17, 2026 05:00
@lowestprime
lowestprime requested a review from Copilot July 17, 2026 05:04
@lowestprime
lowestprime marked this pull request as ready for review July 17, 2026 05:08
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@lowestprime
lowestprime marked this pull request as draft July 17, 2026 05:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants