Skip to content

Commit 903ab29

Browse files
[fix](advisor+ui): guided weight adjuster, separate 1/2 sections, single Export, tidy footer, deep labelled diagrams, responsive sliders, never-wrap chrome
Owner feedback rounds on the Fase 2d PR: - ADJUST BUG: the weights adjuster was expert-gated, so guided users could never customise — ungated (plain-language panel is newcomer-safe); verified end-to-end: set 35% -> Done -> applied & persisted, reopen keeps the value. - Project factors (1) and Quality priorities (2) are now SEPARATE collapsible sections; PrioritiesCard/Toolbar internal headers removed ("4 Export" was doubled); two newly-orphaned dict keys deleted. - Footer: tidy two-line centered stack (glyph + wordmark, then (c) + short licenses); browser guidance stays as hover title. - Catalog detail diagrams rev.2: every part carries its own tiny label (CLIENT/SERVER, EVENT BUS, WRITE/READ MODEL, PORTS/ADAPTERS/CORE, E1..E5, TEAM A/B/C...) + flow arrows + an explanation line; hero canvas enlarged (clamp 180-230px); label type scaled DOWN (6/7px) so text never overpowers the drawing; event-driven boxes widened to fit their labels. - Pattern Library slider: arrows now visible on phones/tablets too (smaller, edge-tucked; swipe still works). - How-it-works: grid on desktop, arrowless swipe slider on <=1024 (media block relocated after the base rule so the cascade actually applies). - Never-wrap app bar: compact-nav chrome breakpoint raised 1024 -> 1180 (any width where the bar would wrap now gets the mobile chrome); docs updated (design-spec 6.1, mobile-experience-plan 5). 119 unit + 14 e2e, lint, tsc, build, all 6 guards green; verified: guided adjust applies, tablet-900 steps=flex/desktop=grid, 1100px uses compact chrome, phone arrows visible. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b0ca509 commit 903ab29

9 files changed

Lines changed: 320 additions & 92 deletions

File tree

docs/03-blueprint/design-specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ utilities via `tailwind.config.js`); view code references these instead of hardc
279279
| **Type** | `--aa-fs-2xs..2xl` = 11/12/12.5/13.5/15 px + fluid lg/xl/2xl via `clamp()`; `--aa-lh` 1.6 |
280280
| **Elevation** | `--aa-shadow-sm/md/lg` over a theme-aware `--aa-shadow-color` |
281281
| **Touch & focus** | `--aa-touch` 44 px (coarse pointers); `--aa-focus-ring` 2 px info, global `:focus-visible` |
282-
| **Breakpoints** | canonical (cannot be `var()` in `@media`): **phone ≤ 640 px · tablet 641–1024 px · laptop ≥ 1025 px**. **Navigation chrome switches at ≤ 1024 px** (Fase 2b): phones AND tablets share the compact mobile chrome (bottom tab bar, action bar, settings sheet, compact top bar — brand left + Guide) so the app bar never wraps; content-density rules (`.f-div`, overlay padding, grid columns) keep the 640 px phone tier. Historical `-phone` class names mean "compact tier". |
282+
| **Breakpoints** | canonical (cannot be `var()` in `@media`): **phone ≤ 640 px · tablet 641–1024 px · laptop ≥ 1025 px**. **Navigation chrome switches at ≤ 1180 px** (Fase 2b, raised Fase 2d: ANY width where the app bar would wrap gets the compact chrome): phones, tablets and small laptops share the compact mobile chrome (bottom tab bar, action bar, settings sheet, compact top bar — brand left + Guide) so the app bar never wraps; content-density rules (`.f-div`, overlay padding, grid columns) keep the 640 px phone tier. Historical `-phone` class names mean "compact tier". |
283283

284284
Base classes: `.aa-page` / `.aa-frame` / `.aa-surface` / `.aa-panel` / `.aa-card` / `.aa-wrap` /
285285
`.aa-touch`. New classes are namespaced `aa-`; no `!important`.

docs/03-blueprint/mobile-experience-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Desktop (≥641px) is unchanged (top nav + header controls as today).
6262

6363
- ~~Phone tier: **≤640px** (canonical, design-spec §6.1). Bottom nav + action bar + settings sheet are
6464
phone-only; ≥641px keeps the current top-nav desktop layout.~~ **Updated (Fase 2b, 2026-07-16):**
65-
the navigation chrome now switches at **1024px** — tablets share the phone's bottom nav /
65+
the navigation chrome now switches at **1180px** (raised Fase 2d) — tablets share the phone's bottom nav /
6666
action bar / settings sheet / compact top bar so the app bar never wraps; only content-density
6767
rules stay on the 640px phone tier (design-spec §6.1).
6868
- Safe area: `padding-bottom: env(safe-area-inset-bottom)` on the fixed bars; the viewport already

src/App.tsx

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -296,16 +296,21 @@ export default function App() {
296296

297297
<div className="f-div" />
298298

299-
{/* Step 1 — project factors + derived priorities (collapsible card, Fase 2d). */}
299+
{/* Step 1 — project factors (its own dropdown section; owner feedback: factors and
300+
priorities must be SEPARATE so nobody gets confused). */}
300301
<StepSection id="aa-sec-1" n="1" titleG="step1.g" titleE="step1.e">
301-
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit,minmax(280px,1fr))', gap: '18px' }}>
302-
<FactorInputs levels={levels} onChange={setLevels} />
303-
{/* Step 2 anchor: the derived priorities live here; the adjust editor opens RIGHT
304-
under the card (owner feedback: it used to land far below the factor column). */}
305-
<div id="aa-sec-2" style={{ display: 'grid', gap: '14px', alignContent: 'start', scrollMarginTop: '132px' }}>
306-
<PrioritiesCard weights={weights} onAdjust={() => setEditWeights((v) => !v)} editing={mode === 'expert' && editWeights} />
307-
{mode === 'expert' && editWeights && <QaOverridePanel weights={weights} overrides={overrides} onChange={setOverrides} />}
308-
</div>
302+
<FactorInputs levels={levels} onChange={setLevels} />
303+
</StepSection>
304+
305+
<div className="f-div" />
306+
307+
{/* Step 2 — derived quality priorities; the adjust editor opens right underneath.
308+
Ungated (Fase 2d rev.3, owner): guided users can customise weights too — the
309+
plain-language adjuster is newcomer-safe. */}
310+
<StepSection id="aa-sec-2" n="2" titleG="step2.g" titleE="step2.e">
311+
<div style={{ display: 'grid', gap: '14px' }}>
312+
<PrioritiesCard weights={weights} onAdjust={() => setEditWeights((v) => !v)} editing={editWeights} />
313+
{editWeights && <QaOverridePanel weights={weights} overrides={overrides} onChange={setOverrides} />}
309314
</div>
310315
</StepSection>
311316

@@ -397,29 +402,27 @@ export default function App() {
397402
}}
398403
/>
399404

400-
{/* Global footer (Fase 2d: simple & professional) — one calm identity line with the
401-
brand glyph; browser guidance (FR-EDGE-4) folded into a hover title. */}
405+
{/* Global footer (Fase 2d rev.2 — owner: "rapi & simple"): a tidy two-line centered
406+
stack — brand line, then one short legal line. Browser guidance (FR-EDGE-4)
407+
lives in the hover title. */}
402408
<footer
403409
className="screen-only"
404410
title={t('footer.browsers')}
405411
style={{
406-
display: 'flex',
407-
alignItems: 'center',
408-
justifyContent: 'center',
409-
gap: '10px',
410-
flexWrap: 'wrap',
412+
display: 'grid',
413+
justifyItems: 'center',
414+
gap: '6px',
411415
padding: 'var(--aa-space-7) var(--aa-panel-pad) var(--aa-space-5)',
412-
fontSize: 'var(--aa-fs-2xs)',
413-
color: 'var(--color-text-tertiary)',
414416
textAlign: 'center',
415417
}}
416418
>
417-
<span style={{ display: 'inline-flex', color: 'var(--color-text-secondary)' }} aria-hidden>
418-
<BrandMark size={16} />
419+
<span style={{ display: 'inline-flex', alignItems: 'center', gap: '8px', color: 'var(--color-text-secondary)', fontFamily: 'var(--font-display)', fontSize: '12.5px', fontWeight: 600, letterSpacing: '-0.01em' }}>
420+
<BrandMark size={15} />
421+
{t('app.title')}
422+
</span>
423+
<span style={{ fontSize: 'var(--aa-fs-2xs)', color: 'var(--color-text-tertiary)' }}>
424+
{SITE_COPYRIGHT} · {t('footer.rights')}
419425
</span>
420-
<span>{SITE_COPYRIGHT}</span>
421-
<span aria-hidden>·</span>
422-
<span>{t('footer.rights')}</span>
423426
</footer>
424427
</div>
425428
</div>

src/components/advisor/PrioritiesCard.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,12 @@ export function PrioritiesCard({ weights, onAdjust, editing = false }: Props) {
1818

1919
return (
2020
<div style={{ border: '0.5px solid var(--color-border-tertiary)', borderRadius: 'var(--border-radius-lg)', padding: '15px 16px' }}>
21-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '3px' }}>
22-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
23-
<span className="f-num">2</span>
24-
<span style={{ fontSize: '14px', fontWeight: 500 }}>
25-
<span className="guided-only">{t('prio.title.g')}</span>
26-
<span className="expert-only">{t('step2.e')}</span>
27-
</span>
28-
</div>
21+
{/* No internal number/title — the StepSection card already shows "2 · …" (owner
22+
feedback: factors and priorities are now SEPARATE dropdown sections). */}
23+
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', marginBottom: '3px' }}>
2924
<button
3025
type="button"
31-
className="expert-only f-btn"
26+
className="f-btn"
3227
onClick={onAdjust}
3328
aria-pressed={editing}
3429
style={

src/components/chrome/Toolbar.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,8 @@ export function Toolbar({ run, status, setStatus, mode, onImport }: Props) {
5656

5757
return (
5858
<div>
59-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '11px' }}>
60-
<span className="f-num">4</span>
61-
<span style={{ fontSize: '15px', fontWeight: 500 }}>
62-
<span className="guided-only">{t('export.title.g')}</span>
63-
<span className="expert-only">{t('step4.e')}</span>
64-
</span>
65-
</div>
66-
59+
{/* No internal heading — the StepSection card already shows "4 · Save & share"
60+
(owner feedback: the number was doubled). */}
6761
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '9px' }}>
6862
<button
6963
type="button"

0 commit comments

Comments
 (0)