Commit Graph
25 Commits
Author SHA1 Message Date
dong.nguyen fdbc530366 content: src/i18n/locales/vi/content/projects.json (1 path) 2026-10-24 13:49:48 +07:00
dong.nguyen 7b5bd79086 content: src/i18n/locales/en/content/projects.json (1 path) 2026-10-24 13:48:04 +07:00
dong.nguyen 5867a5e089 content: src/i18n/locales/vi/content/projects.json (1 path) 2026-10-24 13:48:03 +07:00
dong.nguyen 1bc12d23a6 feat(edit): pick a project's category in the record settings
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.
2026-10-24 13:37:42 +07:00
dong.nguyen b334348387 content: src/i18n/locales/en/content/projects.json (1 path) 2026-10-24 13:33:42 +07:00
dong.nguyen dccecd8ced content: src/i18n/locales/vi/content/projects.json (1 path) 2026-10-24 13:33:41 +07:00
dong.nguyen 9e036ff574 content: src/i18n/locales/en/content/profile.json (1 path) 2026-10-24 13:24:43 +07:00
dong.nguyen a3662a9521 refactor(ids): generate content id unions from the structure documents
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.
2026-10-24 13:16:18 +07:00
dong.nguyen 35b5f514ba content: src/i18n/locales/en/content/projects.json (2 paths) 2026-10-24 12:32:35 +07:00
dong.nguyen 3f15a2c700 content: src/i18n/locales/vi/content/projects.json (2 paths) 2026-10-24 12:32:34 +07:00
dong.nguyen 150ef90c73 fix(edit): balance id unions when a record is deleted
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.
2026-10-24 10:08:58 +07:00
dong.nguyen a0a1451272 content: src/i18n/locales/vi/content/skills.json (1 path) 2026-10-24 09:29:02 +07:00
dong.nguyen 96cb74507f content: src/i18n/locales/en/content/profile.json (2 paths) 2026-10-24 09:29:00 +07:00
dong.nguyen deb33f6ae1 content: src/i18n/locales/en/content/profile.json (1 path) 2026-10-24 09:06:31 +07:00
dong.nguyen 435d2e2c46 content: src/i18n/locales/en/content/profile.json (1 path) 2026-10-24 09:05:16 +07:00
dong.nguyen 86821befa1 content: src/i18n/locales/en/content/profile.json (3 paths) 2026-10-24 08:48:47 +07:00
dong.nguyen a1c249c504 content: src/i18n/locales/vi/content/profile.json (1 path) 2026-10-23 11:23:43 +07:00
dong.nguyen 939260e4fb feat(i18n): per-entity content, per-group UI, page manifests (spec-v4-data-organization)
- split content.json -> content/{profile,skills,experience,projects}.json and
  ui.json -> 14 feature-group files (vi+en); index.ts merges both trees and
  asserts the merge against the group lists; merged CONTENT verified
  byte-identical against pre-split baseline dumps
- src/data/pages/*.json: 8 per-route manifests + pages.ts loader +
  PageId/PageManifestClaim/PageManifest types; validate.ts rules 1-4 (unknown
  entity, unknown ui group, unresolvable field path, orphan text field,
  missing manifest) - all five rejects verified by a throwaway harness
- draft.ts: data-driven registry of the 12 writable documents (4 structure +
  8 text); describeField() names the per-entity file; smoke-draft fixtures
  follow the new registry (8/8)
- EditBar: 'appears on' page annotations computed from the manifests
- remove JsonPanel.tsx + panel labels (inline-editing task 8); docs: AGENTS.md
  Data Layer / Live Edit Mode / Component Structure, v4 spec progress tables
2026-10-23 10:55:29 +07:00
dong.nguyen dad5f3edd7 content: profile.currentInterests[4] (2 paths) 2026-10-23 09:54:18 +07:00
dong.nguyen 7e7f6a375b content: profile.currentInterests[1] (2 paths) 2026-10-23 09:51:45 +07:00
dong.nguyen caa4242100 content: profile.currentInterests[1] (3 paths) 2026-10-23 09:45:36 +07:00
dong.nguyen 0a72cd9b58 feat(edit): inline editing controls on every record surface (spec-v4-inline-editing §5 steps 1-7)
- EditableText: wrapper zone + pencil trigger (E6), inline validation errors,
  provenance tooltip + copy-chip (E7)
- TagListEditor: per-chip edit/delete/move + ghost add over all six tag
  arrays, tagline emphasis toggle
- RecordControls + AddGhost on About, AboutPage, Expertise, Experience,
  ExperiencePage, Projects, ProjectsListPage, ProjectDetailPage (incl.
  sections), PhilosophyPage; RecordSettings popover (featured, section list
  with type picker, variant, location, logo)
- id-slug rename on committed record titles (E3); per-field conflict UI in
  EditBar; chrome CSS in App.css; labels in both ui.json
- JsonPanel kept until the inline surface is verified in a real browser
  (spec progress row 8); acceptance §6 partial — build, validate:content,
  lint, smoke-draft pass 2026-10-23
2026-10-23 09:36:59 +07:00
dong.nguyen fecbd44899 refactor(i18n): move person text out of ui.json and localize structure-held strings (spec-v4 rows 18-19)
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.
2026-10-22 22:53:26 +07:00
dong.nguyen 6482c993e8 feat(edit): live edit mode with draft store, inline editing, JSON panel, save bar, branch targeting
?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.
2026-10-22 09:55:24 +07:00
dong.nguyen e6b4d83084 refactor(i18n): split content into structure JSON and per-language dictionaries
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
2026-10-22 07:29:06 +07:00