Skip to content

chore: align service shells + shared @tale/webui utilities#1700

Merged
yannickmonney merged 3 commits into
mainfrom
chore/align-service-shells
May 11, 2026
Merged

chore: align service shells + shared @tale/webui utilities#1700
yannickmonney merged 3 commits into
mainfrom
chore/align-service-shells

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Summary

Cross-service alignment for services/platform, services/web, and services/docs, plus pulling common patterns into @tale/ui and @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.css is now a one-line @import '@tale/webui/globals.css'; across all three services and the react-service template.
  • Service-local CSS moved to a sibling app/locals.css imported alongside globals.css from main.tsx.
  • 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 moved to module scope.
  • tailwind.config.ts, postcss.config.mjs, tsr.config.json, tsconfig.json are now byte-identical across the three services.
  • services/*/lib/i18n/i18n.ts collapsed via the new initServiceI18n helper.

Shared utilities pulled into packages

  • @tale/ui/globals.css is the canonical stylesheet: tokens, base layer, animations, json-diff-kit + 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 routes, 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 (the shared component library).
  • Plop templates updated to emit the aligned shape: locals.css, router.tsx with declare-module, initServiceI18n-based i18n.ts, identical tsconfig/tsr/tailwind/postcss.
  • Pre-existing WIP bundled in: packages/webui/src/search/* test suite, rehype-preserve-code-meta plugin, theme-asset-sync component + platform ThemeAssets refactor, storybook cleanup, favicon rename, translation edits in docs/.

Test plan

  • bun run check — format / lint / typecheck / all tests across the monorepo
  • Smoke-test services/platform in a browser (provider lift, theme provider, login)
  • Smoke-test services/web (locale redirect on /, /api/forms/submit, security headers present in response)
  • Smoke-test services/docs (locale redirect, /api/health { status, version } shape, security headers present, DOCS_BASE_URL redirect prefix when behind a sub-path proxy)
  • Verify Storybook still launches for @tale/ui and services/platform
  • bun run gen react-service produces a working scaffold against the new template

Pre-PR checklist

  • Ran bun run check (format, lint, typecheck, all tests).
  • Updated services/platform/messages/{en,de,fr}.json — N/A (no user-facing platform copy changed in this PR).
  • Updated /docs/{en,de,fr}/ for every user-visible change — translation edits bundled.
  • Ran bun run --filter @tale/docs lint and bun run --filter @tale/docs test — covered by bun run check.
  • Updated README.md, README.de.md, README.fr.md — N/A.

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
@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@yannickmonney has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 44 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e38c4505-a5a7-4a39-bfda-67d1aabddd28

📥 Commits

Reviewing files that changed from the base of the PR and between 9b92396 and 1bca6cb.

⛔ Files ignored due to path filters (4)
  • bun.lock is excluded by !**/*.lock
  • services/docs/public/favicon-dark.png is excluded by !**/*.png
  • services/docs/public/favicon-light.png is excluded by !**/*.png
  • services/docs/public/favicon.ico is excluded by !**/*.ico
📒 Files selected for processing (112)
  • components.json
  • docs/de-CH/platform/admin/governance.md
  • docs/de-CH/platform/chat/attachments.md
  • docs/de/platform/admin/governance.md
  • docs/de/platform/chat/attachments.md
  • docs/de/platform/member/preferences.md
  • docs/en/platform/chat/attachments.md
  • docs/en/platform/member/preferences.md
  • docs/fr/platform/chat/attachments.md
  • docs/fr/platform/member/preferences.md
  • knip.config.ts
  • package.json
  • packages/ui/.storybook/preview.tsx
  • packages/ui/package.json
  • packages/ui/src/globals.css
  • packages/ui/src/i18n/init-service.ts
  • packages/ui/src/markdown/components/code-group.tsx
  • packages/ui/src/markdown/globals.css
  • packages/ui/src/markdown/markdown.tsx
  • packages/ui/src/markdown/plugins/rehype-preserve-code-meta.ts
  • packages/ui/src/markdown/shiki.ts
  • packages/ui/src/theme/index.ts
  • packages/ui/src/theme/theme-asset-sync.tsx
  • packages/ui/vitest.config.ts
  • packages/webui/.storybook/main.ts
  • packages/webui/package.json
  • packages/webui/src/globals.css
  • packages/webui/src/search/__fixtures__/sample-docs.ts
  • packages/webui/src/search/build-index.test.ts
  • packages/webui/src/search/build-index.ts
  • packages/webui/src/search/client.test.ts
  • packages/webui/src/search/client.ts
  • packages/webui/src/search/dialog.test.tsx
  • packages/webui/src/search/dialog.tsx
  • packages/webui/src/search/highlight.test.tsx
  • packages/webui/src/search/highlight.tsx
  • packages/webui/src/search/recent-searches.test.ts
  • packages/webui/src/search/search-empty.tsx
  • packages/webui/src/search/search-results.test.tsx
  • packages/webui/src/search/search-results.tsx
  • packages/webui/src/search/snippet.test.ts
  • packages/webui/src/search/snippet.ts
  • packages/webui/src/search/types.ts
  • packages/webui/src/search/use-search.test.ts
  • packages/webui/src/search/use-search.ts
  • packages/webui/src/server.ts
  • packages/webui/src/test/setup.ts
  • packages/webui/vitest.config.ts
  • services/docs/app/components/docs/docs-toc.tsx
  • services/docs/app/globals.css
  • services/docs/app/locals.css
  • services/docs/app/main.tsx
  • services/docs/app/routes/__root.tsx
  • services/docs/index.html
  • services/docs/lib/i18n/i18n.ts
  • services/docs/messages/de.json
  • services/docs/messages/en.json
  • services/docs/messages/fr.json
  • services/docs/package.json
  • services/docs/postcss.config.mjs
  • services/docs/scripts/build-search-index.ts
  • services/docs/server.ts
  • services/docs/tailwind.config.ts
  • services/docs/tsconfig.json
  • services/docs/tsr.config.json
  • services/platform/.storybook/manager.ts
  • services/platform/.storybook/preview.tsx
  • services/platform/.storybook/theme.ts
  • services/platform/.storybook/vitest.setup.ts
  • services/platform/Dockerfile
  • services/platform/app/components/theme/theme-assets.tsx
  • services/platform/app/components/theme/theme-color-meta.tsx
  • services/platform/app/globals.css
  • services/platform/app/locals.css
  • services/platform/app/main.tsx
  • services/platform/app/router.tsx
  • services/platform/app/routes/__root.tsx
  • services/platform/components.json
  • services/platform/index.html
  • services/platform/lib/i18n/i18n.ts
  • services/platform/package.json
  • services/platform/server.ts
  • services/platform/tailwind.config.ts
  • services/platform/tsconfig.json
  • services/platform/tsr.config.json
  • services/platform/vitest.config.ts
  • services/web/app/globals.css
  • services/web/app/locals.css
  • services/web/app/main.tsx
  • services/web/components.json
  • services/web/lib/i18n/i18n.ts
  • services/web/package.json
  • services/web/server.ts
  • services/web/tailwind.config.ts
  • services/web/tsconfig.json
  • services/web/tsr.config.json
  • tools/plop/generators/react-package.ts
  • tools/plop/generators/react-service.ts
  • tools/plop/templates/react-package/src/globals.css
  • tools/plop/templates/react-package/src/test/setup.ts
  • tools/plop/templates/react-package/vitest.config.ts.hbs
  • tools/plop/templates/react-service/.storybook/vitest.setup.ts
  • tools/plop/templates/react-service/app/globals.css
  • tools/plop/templates/react-service/app/locals.css
  • tools/plop/templates/react-service/app/main.tsx.hbs
  • tools/plop/templates/react-service/app/router.tsx.hbs
  • tools/plop/templates/react-service/components.json
  • tools/plop/templates/react-service/lib/i18n/i18n.ts.hbs
  • tools/plop/templates/react-service/tailwind.config.ts.hbs
  • tools/plop/templates/react-service/tsconfig.json.hbs
  • tools/plop/templates/react-service/tsr.config.json
  • tools/plop/templates/react-service/vitest.config.ts.hbs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/align-service-shells

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yannickmonney yannickmonney merged commit 7c20b49 into main May 11, 2026
28 checks passed
@yannickmonney yannickmonney deleted the chore/align-service-shells branch May 11, 2026 10:42
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.

1 participant