feat(web): add collapsible connections list pane (desktop icon pattern) - #2049
Merged
ysfscream merged 5 commits intoMay 22, 2026
Conversation
Mirrors the desktop app's "show/hide connections" feature in the web build, giving users more screen real estate for messages and subscriptions. State persists in localStorage so the panel stays collapsed across reloads. - Vuex: add showConnectionList state, mutation, action, and getter - Single rotating .collapse-btn that toggles the pane, matching the inner .topbar collapse pattern (icon, rotation, easing) - Layout: reflow .right-topbar, .filter-bar, .left-panel, and .connections-detail-main margins when the pane is hidden - Leftbar: clicking the connections icon toggles when already on /recent_connections, otherwise routes there as before - i18n: add hideConnections / showConnections (zh, en, ja)
Wrap JSON.parse in try/catch and verify the parsed value is a boolean before returning it; fall back to true on parse failure or wrong type. Prevents a corrupted showConnectionList entry from throwing during module initialization and blocking app load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Swap the single floating rotating chevron for the two-icon pattern desktop uses: icon-hide-connections lives in a new flex topbar next to the list titlebar; icon-show-connections renders in the detail header with v-if="!showConnectionList", matching ConnectionsDetail.vue:13-31 on desktop. State and action are unchanged — purely presentational. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the standalone `showConnectionList` localStorage key with the
existing `db.settings` namespace used by the rest of the web app's
preferences (theme, language, autoCheck, etc.). Initial value reads
through `loadSettings()`, and the toggle action persists via
`setSettings('settings.showConnectionList', …)` for consistency with
the other settings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pulled out of this PR's scope. The unguarded `JSON.parse` has been in `src/store/modules/app.ts` since the desktop hide feature shipped in 39e47f8 (Jan 2024) — it's a pre-existing pattern, not something this branch introduced. Smaller blast radius and a cleaner review surface to keep the change web-only; if the guard is worth applying, it belongs in its own desktop-scoped PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ysfscream
requested review from
Copilot and
ysfscream
and removed request for
Copilot
May 22, 2026 01:54
ysfscream
approved these changes
May 22, 2026
ysfscream
left a comment
Member
There was a problem hiding this comment.
Thanks for the update, this looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the desktop app's "show/hide connections list" feature to the web build. The connections list pane on the left can be collapsed to give more horizontal space to messages, subscriptions, and the publish editor — useful for long topic trees or wide payloads.
State is persisted into the existing
dblowdb store undersettings.showConnectionList— the same JSON blob inlocalStoragethat already holdscurrentTheme,currentLang,autoCheck, etc. — so the layout sticks across reloads.Behavior
icon-hide-connectionslives in a flex topbar next to the list'sconnectionstitlebar;icon-show-connectionsrenders inside the detail header (.connection-head, before the title) withv-if="!showConnectionList". Mirrorssrc/views/connections/ConnectionsList.vue:24-41andsrc/views/connections/ConnectionsDetail.vue:13-31on desktop.?oper=create/ edit) and empty-state views, the recovery path is the Leftbar connections icon — matches desktop, which also doesn't render a show-button on those views./recent_connectionsor any of its subpages (/recent_connections/:id, including the?oper=createform), clicking it toggles the pane in-place; from settings/help/about it routes to/recent_connectionsas before without toggling. You can collapse/expand the list without leaving the connection you're viewing or editing..right-topbar,.connections-detail-mainmargin,.filter-bar, the subscriptionsLeftPanel, plus themarginLeftgetter that accounts forshowSubs+largeDesktop) reflow with0.3s cubic-bezier(0.4, 0, 0.2, 1)transitions.Note on one small divergence from desktop
On the desktop app, the show-button only lives inside
ConnectionsDetail.vue— there's no show-button on the empty-state view or the create/edit form. So on desktop, if a user has zero registered connections and hides the list, they can't bring it back until they add at least one connection. The pane stays hidden through the entire onboarding flow.This PR matches desktop's icon placement exactly (no show-button on the empty-state or form views either —
src/components/EmptyPage.vueandsrc/views/connections/ConnectionForm.vueare unchanged). What does differ: web's Leftbar connections icon is now route-aware (seeweb/src/components/Leftbar.vuechange), so on/recent_connections*— including the empty-state view — clicking it toggles the pane. Net effect: visually aligned with desktop on the icons; slightly more forgiving on recovery from empty-state because the Leftbar gives users a way out. Keeping that small asymmetry — happy to remove it if reviewers prefer strict parity.Why this exists in desktop but not web
The desktop variant (
src/) already has this feature (showConnectionListinstore/modules/app.ts,iconfont icon-hide-connections/icon-show-connectionsinConnectionsList.vueandConnectionsDetail.vue). The web variant (web/src/) shipped without it — the.left-listdiv inweb/src/views/connections/index.vuehad no toggle, no Vuex state, and no buttons. This PR closes that parity gap, and unlike #2047 it also matches desktop on the presentation layer.Files
web/src/store/modules/app.tsshowConnectionListstate,TOGGLE_SHOW_CONNECTION_LISTmutation + action; persists viasetSettings('settings.showConnectionList', …)so it lives in the existingdblowdb store alongside theme/lang/etc. — no extra top-levellocalStoragekeyweb/src/database/index.tsshowConnectionList: booleanadded to thesettingsschema, with a default oftrueon first runweb/src/store/getter.tsshowConnectionListgetterweb/src/types/global.d.tsApp.showConnectionList: booleanweb/src/lang/connections.tshideConnections/showConnections(zh, en, ja)web/src/views/connections/index.vue.left-list-topbarwith hide-button, layout overrides, transitionsweb/src/views/connections/ConnectionsDetail.vue.connection-head,TOGGLE_SHOW_CONNECTION_LISTaction wired,marginLeftgetter accounts for hidden listweb/src/components/Leftbar.vueTest plan
Verified locally so far: light, dark, and night themes — both
icon-hide-connectionsandicon-show-connectionsrender correctly in all three (color followsvar(--color-text-title), hover state preserved). Also verified the lowdb migration: existing users withoutsettings.showConnectionListget it seeded totrueon first load..connection-head, before the title) when the list is hidden — clicking restores the list/recent_connections(list view), click the Leftbar connections icon → toggles in place/recent_connections/:id(connection detail or?oper=createform), click the Leftbar connections icon → toggles in place without navigating awayshowConnectionListstate restored fromdb.settings.showConnectionList(inspect thedbentry inlocalStorageto confirm there's no separateshowConnectionListkey)var(--color-text-title)Screenshots