Commit Graph
9 Commits
Author SHA1 Message Date
dong.nguyen 85f9e3429c docs(readme): local setup + production deploy via Gitea CI; refresh live-edit spec status
README replaces the Vite starter template: requirements, .env variables (SITE_URL/SITE_NAME build identity, GITEA_* edit path), all scripts with validation gate and PDF-lock gotcha, optional local nginx stack, deploy.yml/deploy-infra.yml pipeline table, one-time Gitea setup (Actions variables SITE_URL/SITE_NAME per deploy-infra rev.7, DEPLOY_* SSH secrets with the Windows key procedure, stack secrets/site_config, htpasswd edit login). spec-v4-live-edit.md: status line refreshed (content docs on master, nginx step automated repo-side, remaining owner-side items), date typo 2022->2026, section 6.3 marked superseded by deploy-infra.
2026-10-23 22:58:16 +07:00
dong.nguyen 5e9c76c62b feat(ci): deploy-infra pipeline + env-driven site identity (spec-v4-deploy-infra rev.6-7)
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.
2026-10-23 22:34:23 +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 2ac7a5dd13 fix(edit): send blob sha in Contents API PUT (Gitea 28 UpdateFile contract)
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.
2026-10-23 09:51:28 +07:00
dong.nguyen fbf75d8ffa docs(specs): v4 data-organization + inline-editing design specs (agreed 2026-10-23)
spec-v4-data-organization.md: per-entity content files, per-feature-group UI (14 groups), per-page field-level manifests incl. synthetic resume consumer, orphan-field validation rule; lands after inline-editing. spec-v4-inline-editing.md (E1-E7): delete JsonPanel, pencil-icon-trigger inline editing with field-provenance chips/tooltips (document -> pointer, clipboard copy), chip-level tag editors, ghost add/delete/move record controls, per-record settings popover, auto-generated slug ids, handle-only social links with loader-derived URLs, per-field keep-mine/keep-theirs conflict resolution. spec-v4-live-edit.md: mark JSON-panel scope superseded (5.1, 5.4, 5.8, row 14). AGENTS.md: register both specs as design-agreed-not-yet-implemented.
2026-10-23 00:52:55 +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 2c3ee8271d docs(spec-v4): record dictionary-boundary audit — 3 person-content keys in ui.json (row 18), structure-assigned string localization decision (row 19) 2026-10-22 19:00:01 +07:00
dong.nguyen 84b06d2568 docs(spec): v4 live-edit progress rows 12-17 and D10 branch targeting
Record implemented status with verification evidence; AGENTS.md gains the
Live Edit Mode section incl. target-branch behavior.
2026-10-22 09:55:27 +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