chore: align service shells + shared @tale/webui utilities#1700
Conversation
Cross-service alignment + bundle of pre-existing WIP. Reduces boilerplate across services/platform, services/web, services/docs and pulls common patterns into @tale/ui and @tale/webui. Service-shell alignment - One-liner services/*/app/globals.css (all three import @tale/webui/globals.css) - Service-local CSS moved to sibling app/locals.css imported alongside globals - main.tsx files share the same shape (router import, providers around RouterProvider, identical root/error string, same import order). Platform's eight-provider stack lifted out of __root.tsx into main.tsx - router.tsx files share the same module-level export pattern; platform's QueryClient + ConvexQueryClient construction lifted to module scope - tailwind.config.ts, postcss.config.mjs, tsr.config.json, tsconfig.json byte-identical across the three services - services/*/lib/i18n/i18n.ts collapsed via new initServiceI18n helper Shared utilities pulled into packages - @tale/ui/globals.css is the canonical stylesheet; tokens, base layer, animations, json-diff-kit and react-flow overrides all live here - @fontsource/inter bundled at @tale/ui (one source of truth for the body font); removed per-service @fontsource imports - @tale/ui/i18n/init-service composes initI18n + collectRegionalBundles - @tale/webui/server exports startSimpleServer used by services/web and services/docs; covers locale negotiation, /api/health (with optional graceful-drain marker), shared security headers via defaultSimpleSecurityHeaders, and an extraRoutes hook for service-only endpoints (web's Discord form proxy, etc.). Platform's Hono-based server keeps its specifics (CSP nonce injection, file-events SSE, branding, canvas preview) but its /api/health body shape was aligned to match Other - components.json moved to repo root; aliases now point at packages/ui - Plop templates updated to emit the aligned shape (locals.css, router.tsx with declare-module block, initServiceI18n-based i18n.ts, identical tsconfig/tsr/tailwind/postcss) - Pre-existing WIP bundled in: webui search test suite, rehype-preserve- code-meta plugin, theme-asset-sync component + ThemeAssets refactor, storybook cleanup, favicon rename, translation edits Pre-PR checklist - [x] Ran \`bun run check\` (format, lint, typecheck, all tests) - [x] Updated services/platform/messages/{en,de,fr}.json — N/A (no user-facing platform copy changed) - [x] Updated /docs/{en,de,fr}/ for every user-visible change — translation edits bundled - [x] Ran \`bun run --filter @tale/docs lint\` and \`bun run --filter @tale/docs test\` — covered by \`bun run check\` - [x] Updated README.md, README.de.md, README.fr.md — N/A
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (112)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Cross-service alignment for
services/platform,services/web, andservices/docs, plus pulling common patterns into@tale/uiand@tale/webui. Also bundles pre-existing WIP that was in the working tree (search test suite, rehype-preserve-code-meta plugin, theme-asset refactor, storybook cleanup, favicon rename, translation edits).Service-shell alignment
services/*/app/globals.cssis now a one-line@import '@tale/webui/globals.css';across all three services and the react-service template.app/locals.cssimported alongsideglobals.cssfrommain.tsx.main.tsxfiles share the same shape (router import, providers aroundRouterProvider, identicalroot+ error string, same import order). Platform's eight-provider stack lifted out of__root.tsxintomain.tsx.router.tsxfiles share the same module-level export pattern; platform'sQueryClient+ConvexQueryClientconstruction moved to module scope.tailwind.config.ts,postcss.config.mjs,tsr.config.json,tsconfig.jsonare now byte-identical across the three services.services/*/lib/i18n/i18n.tscollapsed via the newinitServiceI18nhelper.Shared utilities pulled into packages
@tale/ui/globals.cssis the canonical stylesheet: tokens, base layer, animations, json-diff-kit + react-flow overrides all live here.@fontsource/interbundled at@tale/ui(one source of truth for the body font); removed per-service@fontsourceimports.@tale/ui/i18n/init-servicecomposesinitI18n+collectRegionalBundles.@tale/webui/serverexportsstartSimpleServerused byservices/webandservices/docs— covers locale negotiation,/api/health(with optional graceful-drain marker), shared security headers viadefaultSimpleSecurityHeaders, and anextraRouteshook for service-only endpoints (web's Discord form proxy, etc.). Platform's Hono-based server keeps its specifics (CSP nonce injection, file-events SSE, branding routes, canvas preview), but its/api/healthbody shape was aligned to match.Other
components.jsonmoved to repo root; aliases now point atpackages/ui(the shared component library).locals.css,router.tsxwithdeclare-module,initServiceI18n-basedi18n.ts, identicaltsconfig/tsr/tailwind/postcss.packages/webui/src/search/*test suite,rehype-preserve-code-metaplugin,theme-asset-synccomponent + platformThemeAssetsrefactor, storybook cleanup, favicon rename, translation edits indocs/.Test plan
bun run check— format / lint / typecheck / all tests across the monoreposervices/platformin a browser (provider lift, theme provider, login)services/web(locale redirect on/,/api/forms/submit, security headers present in response)services/docs(locale redirect,/api/health{ status, version }shape, security headers present,DOCS_BASE_URLredirect prefix when behind a sub-path proxy)@tale/uiandservices/platformbun run gen react-serviceproduces a working scaffold against the new templatePre-PR checklist
bun run check(format, lint, typecheck, all tests).services/platform/messages/{en,de,fr}.json— N/A (no user-facing platform copy changed in this PR)./docs/{en,de,fr}/for every user-visible change — translation edits bundled.bun run --filter @tale/docs lintandbun run --filter @tale/docs test— covered bybun run check.README.md,README.de.md,README.fr.md— N/A.