Every field now renders as a 150px label column plus a control column, so the
Featured checkbox no longer inherits the 220px text-input width and its row
shares the grid with Category/Location/Logo. Project section rows become a
5-column grid with named areas (id, type, up, down, remove) that reflows to
two rows at <=520px; the close button is a 28px target and inputs/selects get
the same :focus-visible ring as the rest of the edit chrome.
Edit mode is a session, not a URL state. MaybeEditMode mounts the shell on
?edit or on the session flag; while mounted, EditModeShell re-attaches ?edit
after a route change that dropped it (replace navigation, skipped while
authenticating so it never fights a failed auth). The session initializes once
per mount - entry URL from a ref, stripEditQuery reads window.location - so
navigation neither re-authenticates, re-fetches, nor re-restores the draft.
?edit parsing, the session/branch flags and the portfolio-draft key move to a
dependency-free src/i18n/edit-session.ts so App.tsx can read the gate without
pulling the Basic-auth probe (and through it draft.ts) into the entry chunk;
edit-mode.ts is now the auth handshake alone.
Verified: tsc -b, pnpm build (entry chunk carries no probe literal,
EditModeShell stays a separate lazy chunk), pnpm lint (no new warnings),
throwaway smokes for the session semantics (17/17) and the router behaviour
behind the guard (5/5), both deleted after the run.
category had no edit control anywhere: the settings popover covered featured + sections only, the badge is display-only, and a new project silently got category 'experiment' from the draft template. ProjectSettingsPanel now renders a category select whose options are the label map of ui/projects.json (the vocabulary rule 7 checks a project against) with the project's current value appended, so opening the panel never rewrites a project whose label is missing; the write goes through setStructured('projects', '[i].category', ...), the path smoke-draft check 11 already gates.
ui.edit.label added to both languages. .record-settings-field select joins the field-control rule in App.css, which also styles the timeline variant select that had none. Out of scope by design: a category with no labels - UI documents stay read-only in v4, so its labels are a repository edit.
Docs: inline-editing spec 2.4 + component inventory + progress rows 10 (the add-button fix) and 11; spec-v5 5.4 links the picker to rule 7; AGENTS.md editable-surface bullet corrected (category is a single structure value, not a chip list). Verified: pnpm build, pnpm validate:content, pnpm lint (5 pre-existing warnings only), smoke-draft 11/11.
The project card body is a MotionLink (Projects.tsx, ProjectsListPage.tsx). The chips inside it were safe because they render through EditableText, whose edit-mode onClick does preventDefault + stopPropagation, but the ghost add button was a direct child of the anchor: its click reached the link and the card navigated instead of adding a tag. The add button now stops mousedown and does preventDefault + stopPropagation on click before writing the array - the same guards the item controls and EditableText use. Covers the technologies and the metrics add on both card surfaces.
scripts/generate-content-types.ts writes the gitignored src/types/content-ids.ts (id unions + project category values) from the four structure documents; wired as generate:ids / predev / prebuild / prepare. src/types/index.ts re-exports them type-only and keeps only the code-owned unions.
Edit mode now writes JSON only: the v4 union leg is deleted (saveIdUnions, diffIdsWithUnions, applyUnionChanges, readUnionBlock, the EditBar union card, edit.union.* labels). Validator rule 7 requires a label for every category a project uses, in both ui/projects.json documents.
Tests: smoke-draft.ts 11/11 (rename re-sluging + category-label rule replace checks 9-12); new scripts/smoke-generated-ids.ts 7/7. Verified: pnpm build (chunk names unchanged, no runtime reference to the generated module), lint with no new warnings, validate:content, resume HTML byte-identical before/after with identical documents.
Docs: spec-v5-generated-content-ids.md added; spec-v4-live-edit.md §3.1 marked superseded + §12 row 23; AGENTS.md and README.md updated.
Deleting a record in edit mode removed the structure row and its text but left the id union member in src/types/index.ts, so Record<SkillGroupId, SkillGroupText> rejected the shortened text document (TS2741) and pnpm build failed. draft.ts: readUnionBlock reads a union as its declaration span (CRLF/LF safe, never round-trips), diffIdsWithUnions reports missing and stale members against committedStructures(), applyUnionChanges rewrites only that member list in one PUT; newIdsInCommitted/patchUnionSource removed. types/index.ts drops logistics-technology. Verified: smoke-draft 12/12 (new checks 9-12), validate:content, lint (no new warnings), build.
- compose.yaml: set -a before sourcing (sourced assignments were shell-only, envsubst saw nothing) + inline nginx command (a compose entrypoint override drops the image CMD; empty $@ exit-0 restart-looped locally and on the VPS)
- compose.override.yaml: local-only auto-merged override publishing 127.0.0.1:8081 (8080 taken on the dev machine); never shipped by the pipeline
- verified locally end-to-end: stack Up, probe 200, rendered default.conf carries real values, nginx -t OK; built site + 401-protected /api/content/ served through the published port
- docs: spec D13/§4.1 entrypoint corrected, §6 port-exposure open question + docker inspect check, rows 4/9; README local-stack section; AGENTS.md inventory
Run 3 failed at the test step: nginx's official entrypoint matches NGINX_ENVSUBST_FILTER as a regex against variable names (^filter$), so the comma form GITEA_TOKEN,GITEA_CONTENTS_API matched nothing — ${…} tokens stayed in the rendered config and nginx -t failed with 'unknown "gitea_contents_api" variable'. A literal hostname in proxy_pass is resolved during the config test, so the test placeholder must be a resolvable literal IP. Both reproduced and fixed locally against the repo files: the exact test-step container now passes nginx -t (exit 0). compose.yaml + deploy-infra.yml use GITEA_TOKEN|GITEA_CONTENTS_API (quoted in the shell script) and http://127.0.0.1:1. Spec rev.8: status line, D11, §4 sketch + resolved note, rows 2/4.
Run 2026-10-23 shipped files to dong-site/workspace/dong.nguyen/cv/… on the VPS: the action builds the rsync source as "/" (entrypoint.sh) and -R mirrors that absolute path; deploy/htpasswd also landed as a directory. Each step now uses plain -avz with an explicit remote_path (dong-site/ for nginx.conf + compose.yaml, dong-site/deploy/ for htpasswd). Spec §4 sketch/notes resolved, §8 rows 2/4 record both run outcomes and the owner-side VPS cleanup before the next dispatch.
First real run 2026-10-23: burnett01/rsync-deployments passes the comma-list path input to rsync as one quoted argument — link_stat "nginx.conf,compose.yaml,deploy/htpasswd" failed, nothing shipped, live container untouched. Apply the spec §4 fallback: one rsync step per file with full remote_* config, -avzR kept. Spec: §4 sketch + inference note resolved, §6 paths-filter risk annotated, §8 rows 2/4 record the run outcome and the re-run-via-dispatch step.
Repo side of spec-v4-deploy-infra: deploy-infra.yml (paths-filtered nginx redeploy, test-before-touch, health probe); compose.yaml rename + secrets/site_config entrypoint override; site identity externalized - SITE_URL/SITE_NAME read from env (site.ts, vite site-identity plugin, index.html tokens, generated robots.txt); nginx.conf/vite dev proxy read GITEA_CONTENTS_API; .env.example; AGENTS.md + specs updated. Rev.7: site identity delivered as Gitea Actions variables (vars. context, public values) instead of secrets; upload-artifact unified to v7 across jobs.
Gitea 28 decides create-vs-update solely by the body 'sha' (blob ID): empty sha -> create (422 'already exists' on an existing file), stale sha -> 422 'does not match'. The client sent last_commit_sha, which Gitea 28 bodies ignore - every save was a CREATE, so nothing ever reached the branch. fetchDoc/putBase64 now carry the file's blob sha, save reads the new sha from FileResponse.content.sha, and save-conflict detection accepts 412 (older Gitea) or 422 with a 'does not match' message; other 422s stay a hard failure with resume. Spec 6.1 amended with dated note; AGENTS.md DraftStore line aligned.
A first tag commit on a text document that does not hold the array yet
(an older target branch, e.g. profile.currentInterests still living in
the structure document) built an object {"0": …}; the join then overrode
the structure array with it and items.map crashed on the re-render.
setPath now creates [] for [n] segments under an undefined root.
smoke-draft check 8 reproduces the old-baseline tag edit (8/8 pass).
Tag dropped every prop beyond children/accent/className, so the editing
surface EditableText attaches (ref, contentEditable, key/blur handlers)
never reached the span: tags rendered through as={Tag} — interests,
philosophy keywords, project-detail technologies — showed a pencil but
never became editable (React 19: ref is a plain prop the component must
declare). Tag is now a pass-through; visitor markup is unchanged.
Row 18: ui.about.subtitle/experience.tldrText/philosophy.quotes -> profile.subtitle/.tldr/.philosophyQuotes in content.{vi,en}.json; call sites repointed with EditableText wrap; SectionHeading subtitle prop becomes ReactNode; edit.fields labels added. Row 19: experience.company/.duration, projects.role/.metrics, profile.currentInterests/.roles, philosophy keywords move to text documents; VI carries localized dates/company labels/metrics, en overrides with originals, proper nouns and term lists identical (en omits); draft templates, JsonPanel hints, loader comments, resume TL;DR follow the new shapes. Verified: build, validate:content, lint (no new warnings), smoke-draft 7/7, per-language SSR marker smoke on affected routes, build:resume-all.
?edit entry with Basic-auth probe; DraftStore copy-on-write over live
branch documents (?ref GET / branch PUT, last_commit_sha optimistic
concurrency, three-way rebase on 412); EditableText inline editors;
JsonPanel with templates and orphan-free delete; EditBar sequential-PUT
save with conflict actions and merge hint on non-master branches.
scripts/smoke-draft.ts regression check.
Phase 1 of spec-v4-live-edit: data/i18n foundation, no visible feature.
- src/data/{profile,skills,experience,projects}.json: language-neutral
structure documents with thin typed loaders; all prose moved to
src/i18n/locales/{vi,en}/content.json; chrome strings to ui.json
- src/i18n/: dict-types, cross-document validator (runs at module load and
via pnpm validate:content), loader joining structure+text once (UI/CONTENT),
I18nProvider/useI18n mounted in App under LanguageProvider
- all 22 consumers read joined records via useI18n(); field.ts and
strings.ts deleted; *En field pairs removed from the domain types
- hero tagline renders as plain-text segments (D9); philosophy quotes as
paragraph arrays; footer display name now localizes per language (D6)
- resume generator consumes UI/CONTENT; generated resume HTML verified
byte-identical (EN+VI) before/after the migration
- AGENTS.md and v3/v3-i18n + v4 specs updated; deploy.yml concurrency group