diff --git a/AGENTS.md b/AGENTS.md index 1e81e1a..f922dc4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript - `src/data/profile.ts` — name, title, bio, links - `src/data/skills.ts` — skill groups → skills -- `src/data/experience.ts` — work history entries +- `src/data/experience.ts` — work history entries; optional `variant: 'current' | 'gap'` selects the timeline decoration (live node / career break) - `src/data/projects.ts` — project cards with categories - `src/data/resume.ts` — resume availability, supported languages, URL generation @@ -70,7 +70,7 @@ src/ components/ layout/ — Layout.tsx, Navigation.tsx, Footer.tsx sections/ — Hero, About, Expertise, Experience, Projects, Contact, HeroParticles, DownloadResume - ui/ — Badge, Button, Card, SectionHeading, SocialLinks, Tag, Typewriter, AnimatedSection, InView, RollingTextLink, BackToTop + ui/ — Badge, Button, SectionHeading, SocialLinks, Tag, Typewriter, AnimatedSection, InView, RollingTextLink, BackToTop index.ts — barrel export data/ — profile, skills, experience, projects, resume (TS modules) hooks/ — useTheme.tsx, useClickOutside.ts diff --git a/docs/design/specs/ui/spec-ui-components.md b/docs/design/specs/ui/spec-ui-components.md index e5bace1..c42ab30 100644 --- a/docs/design/specs/ui/spec-ui-components.md +++ b/docs/design/specs/ui/spec-ui-components.md @@ -81,36 +81,7 @@ Badge ## Card -### Structure - -``` -Card -├── Header (optional) -│ ├── Title -│ └── Meta -├── Body -│ └── Content -└── Footer (optional) - ├── Actions - └── Meta -``` - -### Variants - -| Variant | Border | Background | Shadow | -|---|---|---|---| -| Default | 1px border | Surface | None | -| Elevated | None | Elevated | Subtle shadow | -| Featured | 4px accent top | Surface | Subtle shadow | - -### States - -| State | Style | -|---|---| -| Default | Variant style | -| Hover | Shadow + lift 2px | -| Clickable | Cursor pointer | -| Focus | Visible outline | +**Removed 2026-10-16.** `src/components/ui/Card.tsx`, its barrel export and the `.card`, `.card:hover`, `.card-elevated`, `.card-featured` rules were deleted — no component rendered them. The cards that remain in the UI are section-specific classes styled directly in `src/App.css`: `.project-section`, `.project-card`, `.expertise-card`, `.philosophy-card`. See `spec-v3-typography.md` §4.2. --- diff --git a/docs/design/specs/ui/spec-ui-experience.md b/docs/design/specs/ui/spec-ui-experience.md index 61b2d03..9b6a312 100644 --- a/docs/design/specs/ui/spec-ui-experience.md +++ b/docs/design/specs/ui/spec-ui-experience.md @@ -12,7 +12,7 @@ Timeline hiển thị kinh nghiệm làm việc: role, company, duration/locatio ExperienceSection ├── SectionHeading ("Experience") └── ExperienceTimeline (.timeline) - ├── ExperienceEntry (×N, newest-first) — entry có `current: true` nhận thêm class `.timeline-entry-current` + ├── ExperienceEntry (×N, newest-first) — entry có `variant` nhận thêm class `.timeline-entry-${variant}` (`current` / `gap`) │ ├── TimelineMarker (.timeline-marker) │ ├── TimelineHeader (.timeline-header) │ │ ├── Title (.timeline-title) diff --git a/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md b/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md index b316585..80be2de 100644 --- a/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md +++ b/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md @@ -716,7 +716,7 @@ will show because `/resume.pdf` exists on the server. | 1 | `pnpm tsx scripts/generate-resume.ts` produces `dist/resume.pdf` | ✅ | Script at `scripts/generate-resume.ts`, alias `pnpm build:resume` | | 2 | PDF is A4 size, multi-page with correct pagination | ✅ | `@page { size: A4 }` in template, `format: 'A4'` in script | | 3 | Header contains profile photo (circular crop), name, title, contact info | ✅ | Base64 photo, profile data from `src/data/profile.ts` | -| 4 | Experience section includes all companies, roles, responsibilities, achievements | ✅ | `renderExperience()` renders exp, responsibilities, achievements with technicalWork | +| 4 | Experience section includes all companies, roles, responsibilities, achievements | ✅ | `renderExperience()` renders exp, responsibilities, achievements with technicalWork. Note (2026-10-16): the achievements branch is now a guarded no-op — `src/data/experience.ts` no longer carries `achievements`, and the map is `(exp.achievements ?? [])` because `${exp.achievements?.map(...).join('')}` used to print the literal `undefined` | | 5 | Skills section includes all skill groups | ✅ | `renderSkills()` renders all groups in 2-column grid | | 6 | All projects included (not just featured) | ✅ | `renderProjects()` iterates full `projects` array | | 7 | Sections do not split across pages | ✅ | `.avoid-break { page-break-inside: avoid }` on exp-entry, achievement, skill-group, project | diff --git a/docs/design/specs/v3/spec-v3-i18n.md b/docs/design/specs/v3/spec-v3-i18n.md index 599893e..822ba82 100644 --- a/docs/design/specs/v3/spec-v3-i18n.md +++ b/docs/design/specs/v3/spec-v3-i18n.md @@ -58,7 +58,7 @@ Add full English/Vietnamese bilingual support to the portfolio. Users can toggle |------|-----------------|--------| | `profile.ts` | `bio`, `bioEn`, `tagline`, `taglineEn`, `philosophy[].title`, `titleEn`, `description`, `descriptionEn` | ✅ Ready | | `skills.ts` | `skillGroups[].title`, `titleEn` (added) | ✅ Ready | -| `experience.ts` | `title`, `titleEn`, `responsibilities`, `responsibilitiesEn`, `achievements[].title`, `titleEn`, `context`, `contextEn`, `impact`, `impactEn` | ✅ Ready | +| `experience.ts` | `title`, `titleEn`, `responsibilities`, `responsibilitiesEn` | ✅ Ready — 2026-10-16: `achievements` dropped from the data (the type keeps it for the resume generator); new `relax-gap` career-break entry; optional `variant: 'current' \| 'gap'` | | `projects.ts` | `title`, `titleEn`, `summary`, `summaryEn`, `sections[].title`, `titleEn`, `content`, `contentEn` | ✅ Ready | | `resume.ts` | `resumeLanguages: ['en', 'vi']` | ✅ Already working | @@ -76,8 +76,8 @@ All previously hardcoded strings have been migrated to `src/i18n/strings.ts`: | `About.tsx` | headings, bio | | `AboutPage.tsx` | headings, subtitle, expertise | | `Expertise.tsx` | section heading | -| `Experience.tsx` | heading, responsibilities, achievements | -| `ExperiencePage.tsx` | heading, responsibilities, achievements | +| `Experience.tsx` | heading, responsibilities; 2026-10-16: `experience.tldr` + `experience.tldrText` added for the TLDR terminal node (achievements strings no longer rendered in the SPA) | +| `ExperiencePage.tsx` | heading, responsibilities; 2026-10-16: same TLDR strings (achievements strings no longer rendered in the SPA) | | `Projects.tsx` | headings, categories, summary | | `ProjectsListPage.tsx` | heading, categories, view details | | `ProjectDetailPage.tsx` | categories, back link, headers | diff --git a/docs/design/specs/v3/spec-v3-resume-improvements.md b/docs/design/specs/v3/spec-v3-resume-improvements.md index 440fdd0..9c8c17e 100644 --- a/docs/design/specs/v3/spec-v3-resume-improvements.md +++ b/docs/design/specs/v3/spec-v3-resume-improvements.md @@ -345,8 +345,9 @@ Remove the dead replace since `{{TAGLINE}}` is also not in the template: ## Bugs Fixed | # | Issue | Fix | -+---|-------|-----| -+ 1 | `@font-face` font-family was `'Inter'` but body uses `'Source Sans 3'` — PDF would fallback to system font | Changed `scripts/generate-resume.ts:55` to `font-family: 'Source Sans 3'` | +|---|-------|-----| +| 1 | `@font-face` font-family was `'Inter'` but body uses `'Source Sans 3'` — PDF would fallback to system font | Changed `scripts/generate-resume.ts:55` to `font-family: 'Source Sans 3'` | +| 2 | `${exp.achievements?.map(...).join('')}` printed the literal text `undefined` in every PDF as soon as an entry had no `achievements` — optional chaining short-circuits the whole chain and the template literal stringifies the `undefined` result (found 2026-10-16, after `achievements` was dropped from `src/data/experience.ts`) | `scripts/generate-resume.ts:100` — now `(exp.achievements ?? []).map(...).join('')` | --- diff --git a/docs/design/specs/v3/spec-v3-theme-palette-gasatrya.md b/docs/design/specs/v3/spec-v3-theme-palette-gasatrya.md index b2e0759..e33451d 100644 --- a/docs/design/specs/v3/spec-v3-theme-palette-gasatrya.md +++ b/docs/design/specs/v3/spec-v3-theme-palette-gasatrya.md @@ -411,7 +411,7 @@ New structure: **one dark block + one light block + one media bridge** (removes - [x] `src/index.css` palette rewritten — `:root` dark default (2-51), `:root[data-theme='light']` (54-79), `@media (prefers-color-scheme: light)` bridge for `:root:not([data-theme='dark'])` (82-109); 8 new tokens + `color-scheme` - [x] Card inset highlight applied — `.card` base, `.card:hover`, `.card-elevated` — **superseded**: the whole `.card*` block was deleted as dead code in the typography pass (`spec-v3-typography.md` §4.2); `--inset-highlight` is still consumed, by `.project-section` - [x] **B13** fixed — late-found hardcoded values from the grep gate: blue focus ring `rgba(96,165,250,0.1)` → `var(--accent-soft)` (`src/App.css:1351`) -- [ ] `pnpm lint` clean — **not clean, and not from this change**: 15 errors + 9 warnings, every one in a `.tsx` file this change never touched (`react-hooks(rules-of-hooks)` on `useField` / `useFieldArray` called inside callbacks). Modified files are `src/App.css`, `src/index.css`, `index.html`, `public/favicon.svg`, `public/resume-template.html` and two spec documents +- [ ] `pnpm lint` clean — **not clean, and not from this change**: 15 errors + 9 warnings at the time, every one in a `.tsx` file this change never touched (`react-hooks(rules-of-hooks)` on `useField` / `useFieldArray` called inside callbacks). Modified files are `src/App.css`, `src/index.css`, `index.html`, `public/favicon.svg`, `public/resume-template.html` and two spec documents. Update 2026-10-16: after the achievements markup was removed from the timeline the count is **11 errors / 9 warnings** — the four that disappeared were `rules-of-hooks` findings inside that markup - [x] `pnpm exec tsc -b` passes (exit 0) - [ ] `pnpm build` end-to-end — blocked by an environment lock, not by the palette: Vite's `emptyDir` throws `EPERM` on `dist\assets` because `docker-compose.yaml:7` mounts `./dist:/usr/share/nginx/html:ro`. Proof the sources build: `pnpm exec vite build --outDir dist-verify` → 538 modules transformed, 26.15 kB CSS, no errors (temp out dir deleted) - [ ] Verified in real browser (user): `/`, `/projects`, `/projects/:id`, `/experience`, `/contact`, `/philosophy`, mobile ≤768px, both themes diff --git a/docs/design/specs/v3/spec-v3-typography.md b/docs/design/specs/v3/spec-v3-typography.md index c0a3986..a38deeb 100644 --- a/docs/design/specs/v3/spec-v3-typography.md +++ b/docs/design/specs/v3/spec-v3-typography.md @@ -92,8 +92,8 @@ Prose system (rewritten in place of the dead `.prose` block): .back-link, .section-cta { font-size: var(--text-meta); font-weight: 500; color: var(--accent); } .link-label { font-weight: 500; color: var(--text-primary); } .contact-link-sub { font-size: var(--text-meta); line-height: 1.5; color: var(--text-muted); } -.achievement-impact { font-size: var(--text-meta); line-height: var(--leading-body); color: var(--text-secondary); margin-bottom: 8px; } -.achievement-metrics { margin-bottom: 8px; } +/* .achievement-impact and .achievement-metrics were added in this pass, then deleted in the + timeline pass (2026-10-16) when the achievements markup left the SPA — see §4.4 */ .download-resume-button { justify-content: center; padding 12px 20px; color text-primary; } /* variant of .contact-link; replaces the DownloadButton inline style */ ``` @@ -105,14 +105,14 @@ Existing rules retuned to the scale: | `.timeline-title` | 20px, inherited 1.6 | 20px + `line-height: 1.3` | | `.timeline-company` | 16px, inherited 1.6 | 16px + `line-height: 1.4` | | `.timeline-responsibilities li` | 14px / 1.6 | `--text-meta` / `--leading-body` | -| `.achievement-title` | 18px / 1.6 | 18px + `line-height: 1.3` | -| `.achievement-context` | 14px / 1.6 | `--text-meta` / `--leading-body` | +| `.achievement-title` | 18px / 1.6 | 18px + `line-height: 1.3` — **later deleted** (§4.4) | +| `.achievement-context` | 14px / 1.6 | `--text-meta` / `--leading-body` — **later deleted** (§4.4) | | `.project-card-summary` | 14px / 1.6 | `--text-meta` / `--leading-body` | | `.philosophy-card h3` | 18px / 1.6 | 18px + `line-height: 1.25` | | `.philosophy-card p` | 14px / 1.7 (inherited) | `--text-meta` / `--leading-body` | | `.contact-link` | 16px / 1.6 | 16px + `line-height: 1.4` | -Deleted as dead (no component rendered any of them; verified by grepping every class name against `src/**/*.tsx`): `.card`, `.card:hover`, `.card-elevated`, `.card-featured` (and `src/components/ui/Card.tsx` plus its barrel export), `.page-header`, `.breadcrumb*`, `.form-group/label/input/textarea`, `.filter-bar`, `.filter-pill*`, `.article-card`, `.article-meta`, `.engineering-tabs`, `.engineering-tab*`, `.container-narrow`, `--max-narrow`. +Deleted as dead (no component rendered any of them; verified by grepping every class name against `src/**/*.tsx`): `.card`, `.card:hover`, `.card-elevated`, `.card-featured` (and `src/components/ui/Card.tsx` plus its barrel export), `.page-header`, `.breadcrumb*`, `.form-group/label/input/textarea`, `.filter-bar`, `.filter-pill*`, `.article-card`, `.article-meta`, `.engineering-tabs`, `.engineering-tab*`, `.container-narrow`, `--max-narrow`. The timeline pass later added `.achievement`, `.achievement-title`, `.achievement-context`, `.achievement-impact`, `.achievement-metrics`, `.achievement-techs` to this list — `.achievement-metric` is **kept**, `src/components/sections/Projects.tsx` and `src/pages/ProjectDetailPage.tsx` still render it. ### 4.3 TSX @@ -121,18 +121,29 @@ Deleted as dead (no component rendered any of them; verified by grepping every c | `src/pages/PhilosophyPage.tsx` | whole body: `aria-labelledby="philosophy-heading"` matched by ``; quotes wrapped in `
` → `
` → plain `

` + `
` (no outer `

`, so the injected `

` blocks are no longer nested); inline styles and the stale "Placeholder for expanded content" comment removed | | `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body` (first pass) → wrapper removed entirely (second pass): bio, `.subheading` titles and both grids are direct children of the section; bio → `.prose-lede lede-wide`; `/about` §1 section `container-content` → `container-wide` | | `src/pages/ProjectDetailPage.tsx` | back link → `.back-link`; summary → `.prose-lede`; narrative wrapped in `.prose`; four `marginBottom:'32px'` block wrappers unwound (rhythm now comes from `.prose h3`); four `

` → plain `

`; section cards → `.project-section` with plain `

` / `

` | -| `src/pages/ExperiencePage.tsx`, `src/components/sections/Experience.tsx` | impact div → `.achievement-impact`; metrics wrapper → `.achievement-metrics`; `maxWidth:'700px'` → `.page-body` | +| `src/pages/ExperiencePage.tsx`, `src/components/sections/Experience.tsx` | impact div → `.achievement-impact`; metrics wrapper → `.achievement-metrics`; `maxWidth:'700px'` → `.page-body` — **superseded 2026-10-16**: the achievements markup was removed from both files and the two classes it used were deleted (§4.4) | | `src/pages/ContactPage.tsx`, `src/components/sections/Contact.tsx` | label divs → `.link-label`; sub-labels → `.contact-link-sub`; `maxWidth:'700px'` → `.page-body` | | `src/components/sections/Projects.tsx` | "view all" link → `.section-cta` | | `src/components/sections/DownloadResume.tsx` | option label → `.link-label`; `DownloadButton` inline layout + `color` → `className="contact-link download-resume-button"` | | `src/components/ui/Card.tsx` | deleted; export removed from `src/components/index.ts` | +### 4.4 Timeline pass (2026-10-16, later) + +Two follow-up passes touched the same files. The timeline half is specified in `specs/ui/spec-ui-experience.md`; the typography-relevant parts are listed here. + +| Change | Files | +|---|---| +| Achievements dropped from the SPA timeline; `.achievement`, `.achievement-title`, `.achievement-context`, `.achievement-impact`, `.achievement-metrics`, `.achievement-techs` deleted; `.achievement-metric` kept (projects pages) | `src/pages/ExperiencePage.tsx`, `src/components/sections/Experience.tsx`, `src/App.css` | +| Timeline chrome restyled through the existing tokens only — spine drawn per node, TLDR terminal node, `.timeline-entry-current` panel + pulse, `.timeline-entry-gap` dashed spine + 10px marker; no new type sizes introduced | `src/App.css`, `src/i18n/strings.ts` | +| `.philosophy-quote p { text-align: justify }` | `src/App.css` | +| Resume generator: `${exp.achievements?.map(...).join('')}` printed the literal `undefined` once an entry had no achievements (optional chaining short-circuits the whole chain; the template literal stringifies the result) → `(exp.achievements ?? [])` | `scripts/generate-resume.ts` | + ## 5. Affected files | File | Change | |---|---| | `src/index.css` | token block (`--max-narrow` deleted, six scale tokens), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted | -| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, `.philosophy-grid` 2 → 3 columns + a new ≤1024px breakpoint, ~170 lines of dead CSS deleted | +| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, `.philosophy-grid` 2 → 3 columns + a new ≤1024px breakpoint, ~170 lines of dead CSS deleted; the timeline pass later deleted the `.achievement*` rules that lost their consumers and added the timeline chrome (§4.4) | | 8 page/section TSX files | inline type styles → classes (see §4.3) | | `src/components/ui/Card.tsx` | deleted | | `src/components/index.ts` | `Card` export removed |