Skip to content

FE-M0-10 · The shell: menu, pools, theme, refusal page and placeholders

ID FE-M0-10 · Level L0 · Run order row 26

Every signed-in page sits in the shell: the menu the role may open at the current pool, the pool switcher, the theme toggle and sign-out; a page not built yet shows a placeholder, a page outside the role the refusal page; it builds; committed.

FE-M0-09 and FE-M0-15 are Done, so Tailwind and the token theme are in place (D35). You are on the branch web/shell.

1 · Copy this step's files and remove lib/i18n.ts: t now comes from getT() in server code and useT() in client components

Section titled “1 · Copy this step's files and remove lib/i18n.ts: t now comes from getT() in server code and useT() in client components”
Terminal window
cp -R ~/opleet-v2/packs/fe-pack-c/FE-M0-10/. .
git rm -q apps/web/lib/i18n.ts
git status --short
Terminal window
pnpm --filter web typecheck
pnpm lint
pnpm --filter web build
Terminal window
git add -A apps/web
git commit -m "feat(web): the app shell with the menu by permission, pools and theme"
  • Block 1: M for apps/web/AGENTS.md, app/layout.tsx, app/login/page.tsx, app/login/sign-in-form.tsx, app/page.tsx, components/opleet/Toast.tsx and lib/auth/actions.ts; D apps/web/lib/i18n.ts; ?? for app/(shell)/, app/no-access/, components/shell/, lib/access/server.ts, lib/i18n/client.ts, lib/i18n/server.ts and lib/shell/.
  • Block 2: no type errors; “No fixes applied.”; the build lists ƒ /, ƒ /[...slug], ƒ /design-preview, ƒ /login and ƒ /no-access, then “ƒ Proxy (Middleware)”.
  • Block 3: the commit line with 22 files changed.
Terminal window
git show --stat HEAD | tail -1
git status --short

Expect: 22 files changed, then nothing from git status.

The shell's layout is Tailwind utilities, not inline styles (D35, the rules). Three greps over the shell's files prove it:

Terminal window
grep -rn 'style={{' apps/web/components/shell 'apps/web/app/(shell)' apps/web/app/no-access
grep -rnE '#[0-9a-fA-F]{3,8}([^0-9a-zA-Z]|$)|\[[0-9.]+(px|rem|em|%)\]|dark:|(^|[^a-zA-Z0-9_-])(bg|text|border)-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black)([^a-zA-Z0-9_]|$)' apps/web/components/shell 'apps/web/app/(shell)' apps/web/app/no-access
grep -rnE '<(Button|Badge|Card|Input|Textarea|Avatar|Progress|Separator|Skeleton|SelectTrigger|TabsTrigger|TabsList)\b[^>]*className="([^"]* )?(bg|text-(fs|text|muted|primary|danger|success|warning|info)|border|rounded|shadow|font)-' apps/web/components/shell 'apps/web/app/(shell)' apps/web/app/no-access

Expect: the first lists only values known at runtime, such as a width worked out from data; a padding, gap, flex or grid is a class, not a hit. The second and third print nothing: no hex colour, no pixel value in a class name, no dark: variant, no Tailwind default colour, and, after D88, no utility that sets the colour, border, radius, shadow or font of a component from components/ui (the third grep reads the opening tags on one line; a tag that spans lines is read by eye). Read every hit before deciding it is wrong; paste the ones you can't explain.

  • typecheck reports an import of "@/lib/i18n": a file outside this pack still uses the old t. Paste the line.
  • The build stops at a page: paste the error.
Terminal window
git reset --hard
git clean -fd apps/web

Before the commit. After it: git reset --hard HEAD~1.

Not run yet.