Skip to content

Server rail: custom bubble icons, safer deletes, and drop zones that actually reach the edges - #14

Merged
jhd3197 merged 4 commits into
mainfrom
dev
Aug 2, 2026
Merged

Server rail: custom bubble icons, safer deletes, and drop zones that actually reach the edges#14
jhd3197 merged 4 commits into
mainfrom
dev

Conversation

@jhd3197

@jhd3197 jhd3197 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

The server rail has always been the fastest way to eyeball your connections, but a wall of two-letter monograms all starts to look the same after connection number twenty. This PR lets each connection wear its own face — an emoji, or one of a small bundled set of Iconify glyphs (rockets, databases, cats, the usual suspects) — while leaving the color-monogram fallback intact for everyone who never touches it. Along the way it closes two rough edges in the rail's drag-and-drop: you can now drop a bubble above the first row, below the last, or out of a folder entirely, none of which had a landing spot before. Deleting a connection now asks first, because wiping saved credentials from the OS keychain is not the kind of thing you want to do on a stray click. Rounding it out, the commerce backends (HubSpot, Dynamics) got their subtitles trimmed to the terse Design files · :443 house style, with the "you don't need a URL" and "prefer a sandbox" guidance moved into proper hints where people will actually read them.

Highlights

  • Give any connection a custom rail bubble icon — type an emoji like 🚀 or a bundled Iconify key like mdi:rocket-launch, with a live preview right in the editor.
  • Unknown or mistyped icon keys warn you and quietly fall back to the name monogram, so a typo never leaves you with a blank bubble.
  • Drag-and-drop in the rail now reaches the edges: drop a connection at the very top, at the end of a section, or drag it out of a folder even when there's no neighbour to aim for.
  • Deleting a connection now pops a confirmation that spells out the consequence — saved credentials are removed from the OS keychain and it can't be undone.
  • HubSpot and Dynamics connection forms are clearer: HubSpot no longer implies you need a URL (the token identifies the portal), and the "edits publish instantly, prefer a draft/sandbox" caution is now a visible warning hint.
Technical changes
  • Added an optional icon field to ConnectionProfile in both src/lib/types.ts and src-tauri/src/profiles/mod.rs (serde skip_serializing_if = "Option::is_none" so existing profile JSON keeps loading untouched).
  • Threaded icon: None through every backend ConnectionProfile constructor — dropbox_authorize, onedrive_authorize, dynamics_authorize, gdrive_authorize, box_authorize in commands.rs, plus grant.rs, importers/mod.rs.
  • ProfileEditor.tsx: new "Icon (optional)" field with an inline live preview; a value containing : is treated as an Iconify key (validated against BRAND_ICONS), anything else renders as text, and an unrecognized key surfaces a Hint tone="warn" while the rail falls back to the monogram.
  • ServerRail.tsx RailBubble: resolves profile.icon at render — a known bundled Iconify key renders via BrandIcon, an emoji/short string renders as text (text-[16px]), otherwise the existing monogram(p.name) fallback stands.
  • Expanded the curated glyph set in scripts/gen-brand-icons.mjs with ~55 mdi "personality" icons (rocket, database, server, cat, ghost, penguin, etc., all Apache-2.0) and regenerated src/lib/brandIconData.ts.
  • New DropStrip component in ServerRail.tsx — a thin always-rendered strip (so rows never shift mid-drag) that shows a faint line while dragging and an accent line when it's the active drop target.
  • Extended the rail's dropTarget union with { kind: "sectionEnd"; group } and { kind: "top" }, added onStripDragOver, and taught commitDrop to resolve them: top → ungrouped at index 0; sectionEnd with undefined group → end of the ungrouped list (also the "leave a folder" path); sectionEnd with a named group → appended to that group.
  • Delete is now gated: the context-menu "Delete" action arms pendingDelete instead of calling deleteProfile directly, and a ConfirmModal (destructive, showing the connection name + address) commits the deletion, calling out the OS-keychain credential wipe.
  • ProfileEditor.tsx commerce copy: HubSpot hint rewritten to state no URL is needed (token identifies the portal, api.hubapi.com is fixed) with the required scopes; the "prefer draft/sandbox — writes deploy instantly" cautions for HubSpot and Dynamics moved into Hint tone="warn" blocks; protocolHint subtitles for hubspot/dynamics shortened to Design files · :443 / Web resources · :443.
  • Note: the diff against main also shows version numbers dropping 1.3.321.3.29 across the Cargo.toml files, tauri.conf.json, and the README badge — that's release-version drift (main auto-bumps on each release), not a change from this branch, and resolves when dev merges up.

protocolHint had full sentences for HubSpot/Dynamics where every other
protocol uses a terse "Kind · :port" hint — shortened to "Design files ·
:443" and "Web resources · :443". The publish-instantly warnings move
into the forms as warn hints so they aren't lost. HubSpot's form now says
plainly that no URL is needed: the private-app token identifies the portal
and the api.hubapi.com base is fixed (matches the backend, which has no
host field on HubSpot profiles).
Copilot AI review requested due to automatic review settings August 2, 2026 16:06

Copilot AI 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.

Pull request overview

This PR refines the protocol hint UX for HubSpot and Dynamics profiles by making the global protocol subtitles consistent with other protocols (terse “Kind · :port” style) while moving important “publishes instantly” warnings into the relevant profile forms. It also clarifies in the HubSpot form that no URL is required because the API base is fixed and the token identifies the portal.

Changes:

  • Shorten protocolHint(...) output for HubSpot and Dynamics to match the terse subtitle style used by other protocols.
  • Add in-form warn hints for HubSpot (draft vs published) and Dynamics (prefer dev/sandbox due to immediate publishing).
  • Update HubSpot guidance text to explicitly state that no URL is needed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jhd3197 added 3 commits August 2, 2026 12:29
The rail's context-menu Delete fired immediately — and the backend also
wipes the profile's saved credentials from the OS keychain, with no undo.
It now arms a ConfirmModal (name + address + keychain warning) and only
deletes on confirm, reusing the SnippetsPanel delete pattern.
Bubble drag-and-drop reorder has existed since v1.3.16, but the only drop
targets were other rows and group headers — so you couldn't drop above the
first row, below the last, or drag a bubble out of a folder when no
ungrouped neighbour existed (dropping on a group header appends to the
group's end). Adds always-rendered drop strips (zero layout shift) at the
rail top, the ungrouped section end, and each expanded group's end, routed
through the same single reorderProfiles round-trip.
New optional profile.icon: an emoji/short string or a bundled Iconify key
(mdi:rocket-launch), rendered in the rail bubble instead of the name
monogram (profile color still applies; unknown keys fall back). The
connection editor gains an Icon field with a live bubble preview and an
unknown-key warning. The offline icon bundle grows from 29 to 84 icons —
a curated set of personality glyphs (rocket, database, robot, cat, …)
regenerated via gen-brand-icons. Backward-compatible: old profiles.json
files load with icon = None.
@jhd3197 jhd3197 changed the title fix(profiles): terse commerce subtitles, clarify HubSpot needs no URL Server rail: custom bubble icons, safer deletes, and drop zones that actually reach the edges Aug 2, 2026
@jhd3197
jhd3197 merged commit 5d74c2c into main Aug 2, 2026
1 check passed
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