Skip to content

♻️ refactor(styles): migrate remaining createStyles to createStaticStyles#13358

Merged
Innei merged 1 commit intocanaryfrom
refactor/create-static-styles-migration
Mar 28, 2026
Merged

♻️ refactor(styles): migrate remaining createStyles to createStaticStyles#13358
Innei merged 1 commit intocanaryfrom
refactor/create-static-styles-migration

Conversation

@Innei
Copy link
Copy Markdown
Member

@Innei Innei commented Mar 28, 2026

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • ✅ test
  • 📝 docs
  • 🔨 chore

🔗 Related Issue

N/A

🔀 Description of Change

Migrates the last createStyles (hook) usages to createStaticStyles with cssVar tokens so styles are computed once at module load instead of every render.

Touches reactions, mention menu, eval bench run/case UI, OAuth device flow auth, Electron device gateway, GTD create-plan surfaces, and ModelSelect.

ModelSelect: @lobehub/ui base-ui Select does not expose Ant Design styles.popup; numeric popupWidth is applied via popupMatchSelectWidth. The prop is narrowed to number (only call site was a numeric width).

🧪 How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

Type-check: bun run type-check

📸 Screenshots / Videos

N/A (visual parity intended; token/cssVar mapping only)

📝 Additional Information

  • Mention menu container background uses cssVar.colorBgElevated for floating surface (replaces isDarkMode-branch on tokens).
  • PendingState dropped unused useTranslation.

Made with Cursor

…yles

- Replace antd-style createStyles hooks with createStaticStyles and cssVar tokens
- Update MentionMenu, reactions, eval bench UI, OAuth device flow, DeviceGateway, GTD plan UI
- ModelSelect: use popupMatchSelectWidth for numeric popupWidth; narrow prop to number

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Mar 28, 2026 0:55am

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot
Copy link
Copy Markdown
Member

@canisminor1990 @ONLY-yours - This is a style refactor migrating createStyles to createStaticStyles for performance. Touches UI components (MentionMenu, Reaction, ModelSelect), Electron DeviceGateway, eval bench, provider settings, and GTD. Please take a look.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.95%. Comparing base (26449e5) to head (09912a3).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #13358     +/-   ##
=========================================
  Coverage   66.94%   66.95%             
=========================================
  Files        1903     1903             
  Lines      153684   153675      -9     
  Branches    15534    17678   +2144     
=========================================
- Hits       102889   102887      -2     
+ Misses      50675    50668      -7     
  Partials      120      120             
Flag Coverage Δ
app 58.52% <33.33%> (+<0.01%) ⬆️
database 96.66% <ø> (ø)
packages/agent-runtime 89.61% <ø> (ø)
packages/context-engine 86.47% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 66.68% <ø> (ø)
packages/model-bank 99.85% <ø> (ø)
packages/model-runtime 84.44% <ø> (ø)
packages/prompts 67.76% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.41% <ø> (ø)
packages/web-crawler 88.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 67.31% <ø> (ø)
Services 49.30% <ø> (ø)
Server 67.27% <ø> (ø)
Libs 51.03% <ø> (ø)
Utils 91.01% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Innei Innei merged commit 841c1d2 into canary Mar 28, 2026
31 checks passed
@Innei Innei deleted the refactor/create-static-styles-migration branch March 28, 2026 13:57
@lobehubbot
Copy link
Copy Markdown
Member

❤️ Great PR @Innei ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Mar 31, 2026
…yles (lobehub#13358)

- Replace antd-style createStyles hooks with createStaticStyles and cssVar tokens
- Update MentionMenu, reactions, eval bench UI, OAuth device flow, DeviceGateway, GTD plan UI
- ModelSelect: use popupMatchSelectWidth for numeric popupWidth; narrow prop to number

Made-with: Cursor
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