Skip to content

🐛 fix: show plan limit upgrade UI on desktop builds#15628

Merged
tjx666 merged 3 commits into
canaryfrom
fix/desktop-plan-limit-error-ui
Jun 10, 2026
Merged

🐛 fix: show plan limit upgrade UI on desktop builds#15628
tjx666 merged 3 commits into
canaryfrom
fix/desktop-plan-limit-error-ui

Conversation

@tjx666

@tjx666 tjx666 commented Jun 10, 2026

Copy link
Copy Markdown
Member

💻 Change Type

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

🔗 Related Issue

N/A

🔀 Description of Change

Desktop builds ship without the business override, so cloud billing errors (FreePlanLimit / SubscriptionPlanLimit / InsufficientBudgetForModel) fell through to the raw JSON error fallback in the conversation view.

  • Add a lightweight PlanLimitCard that only reads the budget snapshot from the error body (no live subscription state) and links to the web plans page via BRANDING_URL.subscription, with a retry action.
  • Recognize the Fable campaign budget context and show the campaign-specific copy.
  • Migrate the small self-contained error views (DeprecatedModelError, QuotaLimitError, TraceIdError) into the open-source tree and wire them into ErrorMessageExtra, including a trace-id fallback for unknown traceable errors.
  • All new branches are gated behind enableBusinessFeatures; the useRenderBusinessChatErrorMessageExtra business hook still takes precedence when installed, so web behavior is unchanged.

All locale keys used already exist (subscription/error namespaces); no i18n additions needed.

🧪 How to Test

Trigger a plan-limit error (e.g. exhaust free plan credits with the LobeHub provider) in a build without the business override (desktop): the conversation should show the upgrade card instead of the raw JSON error body.

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

📸 Screenshots / Videos

Before After
Raw JSON error body (FreePlanLimit) Upgrade card with plan copy + retry

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Jun 10, 2026 12:13pm

Request Review

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. platform:desktop Desktop client labels Jun 10, 2026

@sourcery-ai sourcery-ai Bot left a comment

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.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d91d65796f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/Conversation/Error/index.tsx Outdated
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.63%. Comparing base (5b02563) to head (ac7a300).
⚠️ Report is 5 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #15628      +/-   ##
==========================================
+ Coverage   67.60%   67.63%   +0.02%     
==========================================
  Files        3354     3360       +6     
  Lines      338490   339000     +510     
  Branches    29467    35357    +5890     
==========================================
+ Hits       228846   229290     +444     
- Misses     109453   109519      +66     
  Partials      191      191              
Flag Coverage Δ
app 60.14% <83.50%> (+0.01%) ⬆️
database 98.12% <ø> (ø)
packages/agent-manager-runtime 49.69% <ø> (ø)
packages/agent-runtime 81.06% <ø> (ø)
packages/app-config 44.58% <ø> (ø)
packages/builtin-tool-lobe-agent 20.07% <ø> (ø)
packages/context-engine 84.12% <ø> (ø)
packages/conversation-flow 91.29% <ø> (ø)
packages/device-gateway-client 90.18% <ø> (ø)
packages/env 11.42% <ø> (ø)
packages/eval-dataset-parser 95.15% <ø> (ø)
packages/eval-rubric 76.11% <ø> (ø)
packages/fetch-sse 85.67% <ø> (?)
packages/file-loaders 87.89% <ø> (ø)
packages/locales 0.87% <0.00%> (-0.01%) ⬇️
packages/memory-user-memory 74.99% <ø> (ø)
packages/model-bank 99.99% <ø> (ø)
packages/model-runtime 84.27% <ø> (ø)
packages/prompts 72.51% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/trpc 40.43% <ø> (ø)
packages/types 35.18% <ø> (ø)
packages/utils 85.03% <ø> (ø)
packages/web-crawler 88.08% <ø> (ø)

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

Components Coverage Δ
Store 68.41% <ø> (ø)
Services 54.25% <ø> (ø)
Server 97.03% <ø> (ø)
Libs 54.19% <ø> (+0.16%) ⬆️
Utils 82.08% <ø> (ø)
🚀 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.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 10, 2026
@tjx666

tjx666 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@codex review latest code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

tjx666 added 3 commits June 10, 2026 18:10
Desktop builds ship without the business override, so cloud billing errors
(FreePlanLimit / SubscriptionPlanLimit / InsufficientBudgetForModel) fell
through to the raw JSON error fallback. Add a lightweight PlanLimitCard that
only reads the budget snapshot from the error body and links to the web plans
page, plus migrate the small self-contained error views (DeprecatedModelError,
QuotaLimitError, TraceIdError) so they render on desktop too. All gated behind
enableBusinessFeatures; the business hook still takes precedence when
installed.
- Deduplicate the retry-parent-message logic shared by QuotaLimitError,
  TraceIdError and ExceededContextWindowError into useRetryParentMessage,
  with a disabled state when no parent message exists.
- Use the Plans enum from @lobechat/types instead of string literals in
  PlanLimitCard.
- Replace hardcoded copy in TraceIdError with locale keys and use
  copyToClipboard from @lobehub/ui.
Every stream error gets a traceId injected by the chat executor, so the
fallback previously swallowed the localized message of known errors like
LocationNotSupportError. Gate it on error types without a dedicated
localized message (runtime spec table + legacy response map).
@tjx666 tjx666 force-pushed the fix/desktop-plan-limit-error-ui branch from ac7a300 to 15b8386 Compare June 10, 2026 10:12
@tjx666 tjx666 merged commit b8339ab into canary Jun 10, 2026
24 of 25 checks passed
@tjx666 tjx666 deleted the fix/desktop-plan-limit-error-ui branch June 10, 2026 10:19
@arvinxx arvinxx mentioned this pull request Jun 10, 2026
arvinxx added a commit that referenced this pull request Jun 10, 2026
# 🚀 LobeHub Release (20260610)

**Release Date:** June 10, 2026  
**Since v2.2.2:** 131 merged PRs · 13 contributors

> This weekly release strengthens agent collaboration across cloud,
desktop, CLI, and workspace flows, with steadier runtime behavior and a
broader foundation for workspace-scoped data.

---

## ✨ Highlights

- **Agent execution across devices** — Unifies per-device working
directories, project skill discovery, and sub-agent suspend/resume
behavior across server, QStash, and device RPC flows. (#15543, #15566,
#15481, #15620, #15591)
- **Connector and sandbox platform** — Expands connector permissions,
custom OAuth MCP connector onboarding, sandbox provider support, and
user-uploaded file sync into cloud sandbox runs. (#15463, #15546,
#15184, #15550)
- **Desktop and CLI reliability** — Fixes desktop cold-start,
auto-update, Windows build, CLI skill discovery, and `lh connect` agent
dispatch paths. (#15547, #15525, #15527, #15562, #15632, #15634)
- **Pages and sharing** — Refreshes topic sharing, improves Page Editor
layout behavior, and routes Page Agent tool execution through the
server-side editor path. (#15581, #15556, #15588, #15023, #15610)
- **Model availability and provider updates** — Adds user-scoped LobeHub
model availability, Claude Fable 5, Qwen thinking preservation, and
MiniMax M3 updates. (#15590, #15639, #13494, #15376)

---

## 🏗️ Core Product & Architecture

### Agent Runtime & Heterogeneous Agents

- Improves sub-agent lifecycle handling, including async suspend/resume,
queue-mode QStash resume delivery, and blocking nested sub-agent calls.
(#15481, #15620, #15575)
- Stabilizes heterogeneous agent ingestion and streaming with raw stream
dumps, per-turn usage, image forwarding on regenerate, and
duplicate-text fixes. (#15602, #15577, #15592, #15585)
- Adds execution-device and working-directory controls across device
RPC, legacy defaults, and remote-spawned Claude Code sessions. (#15543,
#15566, #15591, #15572)
- Improves runtime diagnostics and compatibility, including Gemini
multimodal output capture, abort stream semantics, and trace quality
analysis. (#15535, #13677, #15508)

---

## 📱 Platforms, Integrations & UX

### Connectors, Sandbox & Tools

- Ships API-level connector tool permissions, custom OAuth MCP connector
onboarding, and connector-first runtime execution. (#15463, #15546)
- Adds sandbox provider support, cloud sandbox file sync, and safer
external URL file input handling with SSRF validation. (#15184, #15550,
#12657)
- Improves tool visibility and execution with pinned app-fixed tools,
ANSI output rendering, gateway-tunneled MCP calls, and automatic
headless tool runs. (#15509, #15516, #15469, #15492)

### Desktop, CLI & Web UX

- Restores desktop startup and reload behavior, preserves IPC error
causes, and keeps the tab bar new-tab action visible across routes.
(#15547, #15597, #15638)
- Fixes desktop update and build stability for browser quit guards,
macOS update signing, and Windows Visual Studio detection. (#15525,
#15527, #15562)
- Shows the plan-limit upgrade UI on desktop builds. (#15628)
- Adds the Agent Run delivery checker and fixes CLI device dispatch plus
skill list/search output. (#15489, #15634, #15632)
- Refreshes onboarding, auth source preservation, topic UI states,
referral/Fable campaign copy, and chat-input control bar behavior.
(#15629, #15544, #15573, #15614, #15616, #15617, #15622, #15643)

---

## 🔒 Security, Reliability & Rollout Notes

- External URL file input now includes SSRF validation for safer Google
file handling. (#12657)
- Database workspace-scope migrations are part of this release;
self-hosted operators should run the normal migration path before
serving the updated app. (#15446, #15465, #15468, #15472)
- The release branch was re-cut from `canary` and includes the latest
`main` release-version commit so `v2.2.2` is the verified compare base.

---

## 👥 Contributors

@ONLY-yours, @sxjeru, @hardy-one, @xujingli, @hezhijie0327, @Coooolfan,
@arvinxx, @tjx666, @Innei, @rivertwilight, @rdmclin2, @cy948,
@AmAzing129

**Full Changelog**:
v2.2.2...release/weekly-20260610-recut-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform:desktop Desktop client size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant