Skip to content

fix: UX Core consolidation regressions (navbar / fonts / bias-modal backdrop / context provider)#113

Merged
MaryWylde merged 5 commits into
archive/pre-uxc-consolidation-fixesfrom
fix/uxc-layout-route-split
May 15, 2026
Merged

fix: UX Core consolidation regressions (navbar / fonts / bias-modal backdrop / context provider)#113
MaryWylde merged 5 commits into
archive/pre-uxc-consolidation-fixesfrom
fix/uxc-layout-route-split

Conversation

@manager
Copy link
Copy Markdown
Contributor

@manager manager commented May 14, 2026

Four commits stacking on top of the UX Core consolidation, restoring parity with prod on /uxcore, /uxcg, /uxcat, /uxcp, /uxcore-api.

Commits

  1. c3ebb6b — fix(layout): route-split _app so UX Core pages use UX Core's own Layout
  2. ef27a11 — fix(fonts): load UX Core @font-face declarations + scope Lato default
  3. 58a8308 — fix(uxc-slug): pass biases as prop to /uxcore/[slug] + /uxcg/[slug]
  4. 399b1e6 — fix(uxc-context): real UX Core GlobalContext.Provider bridged in _app.tsx

Visible regressions fixed

  • Top nav on UX Core routes was keepsimple's parent Header, not UX Core's ToolHeader
  • UX Core specific fonts (Lato, IBM Plex Mono, Oswald, DelaGothicOne, etc.) never loaded — pages fell back to Source-Serif
  • Bias detail (/uxcore/[slug]) opened modal on grey backdrop (no hexagon, no sidebar, no footer)
  • OUR PROJECTS rendered as Disabled in ToolHeader; ToolHeader auth state stayed null

Test plan

  • /uxcore renders UX Core ToolHeader
  • /uxcore fonts match prod
  • /uxcore/ shows hexagon + sidebar behind the modal
  • OUR PROJECTS active (no Disabled class)
  • Keepsimple home / unaffected (still Source-Serif default, still keepsimple Header)
  • /ai-atlas unchanged

NOTE (The Order): These commits are already fast-forward-merged into dev and live on both staging.keepsimple.io and the DEV preview. This PR is opened against an archive/pre-uxc-consolidation-fixes marker branch (frozen at the pre-fix commit 72cb6b7) purely so the four-commit diff is reviewable as a unit. Merging this PR is a no-op against current dev.

manager and others added 4 commits May 14, 2026 20:31
Post-consolidation regression: every page was wrapped in @layouts/Layout
(keepsimple parent Header), including /uxcore /uxcg /uxcat /uxcp /uxcore-api.
UX Core has its own @uxcore/layouts/Layout (ToolHeader + UX Core nav) that
was never reached.

Switch on router.pathname inside _app.tsx: UX Core routes mount UX Core's
Layout, everything else continues to mount keepsimple's Layout. No deeper
context bridge yet; the safe-default Proxy on the UX Core GlobalContext
keeps ToolHeader rendering even without a real Provider.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
UXCoreOSS shipped its own globals.scss that declared the UX Core-specific
fonts (Lato, IBM Plex Mono, Oswald, RedHatDisplay, DelaGothicOne,
Manrope, IBMPlexSans, NotoSansArmenian, Cormorant-Garamond-Medium) and
set Lato as the global default via `* { font-family: 'Lato' }`. After the
consolidation, _app.tsx only imports the keepsimple globals.scss — so UX
Core fonts never load on /uxcore /uxcg /uxcat /uxcp /uxcore-api and the
default cascades to keepsimple's Source-Serif. Result: visible font
breakage vs production.

Extract the missing @font-face rules into uxcore-fonts.scss and gate the
Lato default behind `body.uxcorePage` (toggled in _app.tsx based on
route) so keepsimple pages keep their Source-Serif default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bias-detail pages render UXCoreLayout (hexagon backdrop, sidebar) only
when biases[locale] is truthy. Before this change they read biases from
useContext(GlobalContext); but the consolidated _app.tsx never wraps the
UX Core tree in a real Provider — the context defaults to the safe-Proxy
that returns null for everything. So uxCoreData stayed null, biases
stayed [], and the layout never rendered. Visible effect on DEV/Staging:
the bias modal opens over a grey backdrop with no hexagon, sidebar, or
footer (PROD still has them because it served UXCoreOSS as a standalone
app with its own Provider).

Mirror the pattern already used by /uxcore/index.tsx: fetch strapiBiases
in getStaticProps and pass them as a `biases` prop. Drop the
useContext-derived biases state. /uxcg/[slug] had the same dependency on
uxCoreData; fixed the same way.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
….tsx

UX Core code reads accountData, uxcatUserInfo, ourProjectsModalData and
several setters from useContext(GlobalContext). Post-consolidation those
reads hit the safe-default Proxy and returned null/noop — visible
fallout: OUR PROJECTS rendered as Disabled (`!ourProjectsModalData`),
ToolHeader showed no avatar, UXCAT user state was unreachable, and a few
UXCAT/profile pages stayed half-rendered.

Wrap the UX Core branch of _app.tsx in UXCoreGlobalContext.Provider with:
- accountData / setAccountData / setToken bridged from the existing
  keepsimple state (single source of auth truth)
- uxcatUserInfo, selectedTitle, updatedUsername state + setters
- ourProjectsModalData fetched once from getOurProjects(locale) on entry
  to a UX Core route, refetched when locale changes
- uxCoreData / uxcgLocalizedData / uxcgData kept null here; pages that
  need the heavy Strapi payloads (already fetched in getStaticProps)
  continue to take them as props (mirrors /uxcore/[slug] fix)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Comment thread src/uxcore/styles/uxcore-fonts.scss Outdated
@@ -0,0 +1,90 @@
// UX Core @font-face declarations + scoped default.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unnecessary duplication of keeping fonts in different files. All font families are stored in globals.scss.

Per review on #113: the UX Core font declarations + the scoped
body.uxcorePage default no longer live in a sibling stylesheet. The
@font-face block and the body.uxcorePage Lato fallback move into
src/styles/globals.scss, the separate src/uxcore/styles/uxcore-fonts.scss
is deleted, and the extra import in _app.tsx is dropped.

The body.uxcorePage rule stays placed AFTER the global `*` selector
so specificity still wins over the Source-Serif default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@MaryWylde MaryWylde merged commit 3b8c394 into archive/pre-uxc-consolidation-fixes May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants