Skip to content

✨ feat(desktop): add device gateway status indicator in titlebar#13260

Merged
arvinxx merged 8 commits into
canaryfrom
feat/device-gateway
Mar 25, 2026
Merged

✨ feat(desktop): add device gateway status indicator in titlebar#13260
arvinxx merged 8 commits into
canaryfrom
feat/device-gateway

Conversation

@arvinxx

@arvinxx arvinxx commented Mar 25, 2026

Copy link
Copy Markdown
Member

πŸ’» Change Type

  • ✨ feat

πŸ”— Related Issue

πŸ”€ Description of Change

Adds a device gateway connection status indicator to the desktop app titlebar (to the left of the existing cloud sync icon).

UI:

  • HardDrive icon in the titlebar, visible only when logged in (isSyncActive)
  • Green dot badge on the icon when connected
  • Loading state during connecting/reconnecting
  • Click opens a Popover with:
    • Status text as title (e.g. "Device is connected to the cloud") + toggle Switch
    • Editable Device Name field (saved on blur/Enter)
    • Editable Description field (saved on blur)

Backend:

  • Added gatewayDeviceName and gatewayDeviceDescription to ElectronMainStore type and defaults
  • Extended GatewayConnectionService with getDeviceName/setDeviceName/getDeviceDescription/setDeviceDescription (persisted via storeManager)
  • Exposed setDeviceName and setDeviceDescription IPC methods in GatewayConnectionCtr

Frontend:

  • New src/services/electron/gatewayConnection.ts service wrapping all gateway IPC calls
  • New src/store/electron/actions/gateway.ts Zustand slice with connect/disconnect actions, SWR fetchers, and device info CRUD
  • gatewayConnectionStatus and gatewayDeviceInfo added to electron store initial state
  • Listens to gatewayConnectionStatusChanged broadcast for real-time status updates

πŸ§ͺ How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed
  1. Log in to cloud sync in the desktop app
  2. The HardDrive icon should appear to the left of the Wifi icon in the titlebar
  3. Click the icon β€” Popover opens with connection toggle, device name, and description fields
  4. Toggle the switch to connect/disconnect; observe green dot appears/disappears
  5. Edit device name or description and blur β€” changes persist after restart

πŸ“ Additional Information

The device name defaults to the system hostname if not set.

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

Sorry @arvinxx, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Mar 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Canceled Canceled Mar 25, 2026 5:17pm

Request Review

@lobehubbot

Copy link
Copy Markdown
Member

@ONLY-yours - This is a desktop platform (Electron) feature adding a device gateway status indicator to the titlebar. Please take a look.

@arvinxx arvinxx force-pushed the feat/device-gateway branch from 8b47c77 to ee53dac Compare March 25, 2026 16:02
@chatgpt-codex-connector

Copy link
Copy Markdown

πŸ’‘ Codex Review

const isConnecting = gatewayStatus === 'connecting' || gatewayStatus === 'reconnecting';

P2 Badge Treat authenticating as in-progress in gateway UI

GatewayClient emits an authenticating state after socket open and before connected, but this component only treats connecting/reconnecting as in-progress. During that phase the popover renders the device as disconnected and the switch as off, which is misleading and allows users to re-trigger connect while a handshake is already underway. Include authenticating in the in-progress/checked logic.


if (this.status === 'connected' || this.status === 'connecting') {
return { success: true };

P2 Badge Short-circuit connect during authentication phase

connect() only no-ops for connected and connecting, so a call received while status is authenticating will run doConnect() again, forcibly disconnecting the current client and restarting the handshake. This can cause avoidable reconnect churn when connect is triggered twice during startup/handshake; authenticating (and usually reconnecting) should be treated as already in progress.

ℹ️ 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".

@codecov

codecov Bot commented Mar 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 34.61538% with 68 lines in your changes missing coverage. Please review.
βœ… Project coverage is 66.89%. Comparing base (a1e91ab) to head (f8aff8a).
⚠️ Report is 2 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #13260      +/-   ##
==========================================
- Coverage   66.91%   66.89%   -0.03%     
==========================================
  Files        1867     1869       +2     
  Lines      147855   147959     +104     
  Branches    16904    17565     +661     
==========================================
+ Hits        98942    98978      +36     
- Misses      48802    48870      +68     
  Partials      111      111              
Flag Coverage Ξ”
app 58.13% <34.61%> (-0.03%) ⬇️
database 97.89% <ΓΈ> (ΓΈ)
packages/agent-runtime 89.60% <ΓΈ> (ΓΈ)
packages/context-engine 83.59% <ΓΈ> (ΓΈ)
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.53% <ΓΈ> (ΓΈ)
packages/prompts 74.60% <ΓΈ> (ΓΈ)
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 65.96% <31.70%> (-0.11%) ⬇️
Services 49.56% <45.45%> (-0.02%) ⬇️
Server 68.13% <ΓΈ> (ΓΈ)
Libs 43.20% <ΓΈ> (ΓΈ)
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.

arvinxx and others added 5 commits March 26, 2026 00:28
…ption fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ad of cloud

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…over

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arvinxx arvinxx merged commit 169f11b into canary Mar 25, 2026
38 of 41 checks passed
@arvinxx arvinxx deleted the feat/device-gateway branch March 25, 2026 17:14
@lobehubbot

Copy link
Copy Markdown
Member

❀️ Great PR @arvinxx ❀️

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.

ONLY-yours added a commit that referenced this pull request Mar 27, 2026
# πŸš€ release: 20260326

This release includes **91 commits**. Key updates are below.


- **Agent can now execute background tasks** β€” Agents can perform
long-running operations without blocking your conversation.
[#13289](#13289)
- **Better error messages** β€” Redesigned error UI across chat and image
generation with clearer explanations and recovery options.
[#13302](#13302)
- **Smoother topic switching** β€” No more full page reloads when
switching topics while an agent is responding.
[#13309](#13309)
- **Faster image uploads** β€” Large images are now automatically
compressed to 1920px before upload, reducing wait times.
[#13224](#13224)
- **Improved knowledge base** β€” Documents are now properly parsed before
chunking, improving retrieval accuracy.
[#13221](#13221)

### Bot Platform

- **WeChat Bot support** β€” You can now connect LobeChat to WeChat, in
addition to Discord.
[#13191](#13191)
- **Richer bot responses** β€” Bots now support custom markdown rendering
and context injection.
[#13294](#13294)
- **New bot commands** β€” Added `/new` to start fresh conversations and
`/stop` to halt generation.
[#13194](#13194)
- **Discord stability fixes** β€” Fixed thread creation issues and Redis
connection drops.
[#13228](#13228)
[#13205](#13205)

### Models & Providers

- **GLM-5** is now available in the LobeHub model list.
[#13189](#13189)
- **Coding Plan providers** β€” Added support for code planning assistant
providers. [#13203](#13203)
- **Tencent Hunyuan 3.0 ImageGen** β€” New image generation model from
Tencent. [#13166](#13166)
- **Gemini content handling** β€” Better handling when Gemini blocks
content due to safety filters.
[#13270](#13270)
- **Claude token limits fixed** β€” Corrected max window tokens for
Anthropic Claude models.
[#13206](#13206)

### Skills & Tools

- **Auto credential injection** β€” Skills can now automatically request
and use required credentials.
[#13124](#13124)
- **Smarter tool permissions** β€” Built-in tools skip confirmation for
safe paths like `/tmp`.
[#13232](#13232)
- **Model switcher improvements** β€” Quick access to provider settings
and visual highlight for default model.
[#13220](#13220)

### Memory

- **Bulk delete memories** β€” You can now delete all memory entries at
once. [#13161](#13161)
- **Per-agent memory control** β€” Memory injection now respects
individual agent settings.
[#13265](#13265)

### Desktop App

- **Gateway connection** β€” Desktop app can now connect to LobeHub
Gateway for enhanced features.
[#13234](#13234)
- **Connection status indicator** β€” See gateway connection status in the
titlebar. [#13260](#13260)
- **Settings persistence** β€” Gateway toggle state now persists across
app restarts. [#13300](#13300)

### CLI

- **API key authentication** β€” CLI now supports API key auth for
programmatic access.
[#13190](#13190)
- **Shell completion** β€” Tab completion for bash/zsh/fish shells.
[#13164](#13164)
- **Man pages** β€” Built-in manual pages for CLI commands.
[#13200](#13200)

### Security

- **XSS protection** β€” Sanitized search result image titles to prevent
script injection.
[#13303](#13303)
- **Workflow hardening** β€” Fixed potential shell injection in release
automation. [#13319](#13319)
- **Dependency update** β€” Updated nodemailer to address security
advisory. [#13326](#13326)

### Bug Fixes

- Fixed skill page not redirecting correctly after import.
[#13255](#13255)
[#13261](#13261)
- Fixed token counting in group chats.
[#13247](#13247)
- Fixed editor not resetting when switching to empty pages.
[#13229](#13229)
- Fixed manual tool toggle not working.
[#13218](#13218)
- Fixed Search1API response parsing.
[#13207](#13207)
[#13208](#13208)
- Fixed mobile topic menus rendering issues.
[#12477](#12477)
- Fixed history count calculation for accurate context.
[#13051](#13051)
- Added missing Turkish translations.
[#13196](#13196)

### Credits

Huge thanks to these contributors:

@bakiburakogun @hardy-one @Zhouguanyang @sxjeru @hezhijie0327 @arvinxx
@cy948 @CanisMinor @Innei @lijian @lobehubbot @neko @rdmclin2
@rivertwilight @tjx666
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