feat: Phase 2 backlog — premium budget, tech-level mode, history, compare bars, dark mode - #6
Merged
Merged
Conversation
- seo: add /compare route to sitemap.xml - chore: rename convertToSpecs/matchLaptopClass .jsx -> .js (pure JS modules) - a11y/seo: demote global brand h1 to a home link so each page owns a descriptive h1 (Landing hero, Compare, NotFound, quiz + results views); add .sr-only utility and section heading for Landing features
- INF-02: add premium budget bucket (>$25k MXN); bound high to $12k-$25k and cap matching so premium models no longer leak into the high bucket; relaxed premium enforces an $18k floor - INF-01: add technical-level quiz question; technical users get the rationale expanded and all warnings, non-technical users see only critical (warning-prefixed) warnings and a collapsed rationale - tests: +11 (premium/high boundaries, relaxed floor, isTechnical flag, technical vs simple rendering); refactor Recommendation quiz-completion helper to be question-count agnostic
- F-02: persist the last 3 completed quizzes to localStorage via a new historyStore util; Landing shows recent-result cards that reopen the recommendation through ?plan=, plus a clear button. History persists across resets and is only wiped via the explicit clear action. - compare: cap the handleCompare deep-link at 3 model ids at the source - tests: +13 (historyStore unit coverage, Landing history UI)
- compare-viz: add SpecBar component + getBarWidth helper; render pure-CSS proportional bars for the RAM, storage and GPU rows (no charting dep) - tests: +8 (getBarWidth boundaries, SpecBar rendering and a11y)
- add useTheme hook (csh-theme localStorage key, prefers-color-scheme fallback, follows the system until the user toggles manually) and an accessible ThemeToggle button in the header - add :root[data-theme="dark"] token palette in index.css; make App/Landing/Recommendation/Compare/SpecBar/Quiz theme-aware via dark overrides while keeping light mode visually unchanged - tests: +13 (useTheme behaviour, ThemeToggle)
- a11y: fix the h1->h4 heading-level jump in the results view; renumber to a clean h1->h2->h3 outline and make the results h1 visible; update the matching CSS selectors (NoResults/Fallback/Approximate/ActionCard) - fix(rationale): set the technical-user rationale default when the result is created (handleNext + shared-plan load) instead of in a [result] effect, so the user's manual toggle is no longer overwritten - ux: add an inline pre-paint theme script in index.html to prevent a dark-mode flash (FOUC) on cold load - dark: brighten the compare chip remove glyph for clearer contrast - chore: ignore coverage/ in the eslint config - tests: cover the compare deep-link 3-model cap and generic exclusion; assert real localStorage clearing and full summary fields on Landing
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Implementa el backlog de Fase 2 en 5 lotes, con TDD estricto en la lógica y un review adversarial multi-agente al final.
Tests: 71 → 118 (117 passed + 1 todo) · lint limpio · build OK.
Cambios por lote
Lote 1 — base
/comparealsitemap.xmlconvertToSpecs/matchLaptopClass.jsx → .js(módulos JS puros).sr-onlyLote 2 — motor de inferencia (TDD)
premium(>$25k MXN);highqueda acotado a $12k–$25k y el matching deja de filtrar modelos premium haciahigh; relaxed premium con piso de $18kLote 3 — features
localStorage(historyStore); Landing muestra tarjetas que reabren la recomendación vía?plan=, con botón de limpiar (el historial NO se borra al resetear el quiz)Lote 4 — visual
SpecBar+getBarWidth; barras proporcionales pure-CSS (sin dependencias de charting) para RAM/almacenamiento/GPUuseTheme(detección de sistema + toggle manual, persistido) +ThemeToggleaccesible + paleta:root[data-theme="dark"]y overrides por componente, sin tocar el modo claroReview adversarial
5 reviewers por dimensión + verificación escéptica por hallazgo: 37 hallazgos, 19 confirmados. Corregidos los reales:
h1→h4en resultados → renumerado ah1→h2→h3+ título de resultados visibleindex.htmlcoverage/ignorado en eslint, y 3 gaps de tests cerradosVerificación manual pendiente
El aspecto visual del dark mode conviene revisarlo a ojo (
pnpm dev→ toggle del header en las 4 vistas).