Skip to content

Control panel: recent-hosts dropdown on the Axol Host field - #324

Merged
shawnpatel merged 2 commits into
mainfrom
host-history-dropdown
Sep 24, 2026
Merged

shawnpatel merged 2 commits into
mainfrom
host-history-dropdown

Conversation

@shawnpatel

@shawnpatel shawnpatel commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

The setup dialog only remembered the last Axol host. Clicking the host field now opens a dropdown of the last 5 hosts that connected successfully (newest first), matching the dataset field's dropdown.

  • Only successful connects are recorded, so typos and unreachable hosts never land in the list.
  • Reconnecting moves a host back to the top (deduped case-insensitively).
  • Typing filters the list; picking fills the field; Connect / Enter still connects.
  • Stored in localStorage under axolHostHistory; the existing axolServerHost last-host key is unchanged.

Changes

  • components/suggest-input.tsx (new): SuggestInput extracted from config-form.tsx so both fields share it. The dataset field is unchanged.
  • lib/host-history.ts (new) + lib/host-history.test.ts.
  • components/setup-dialog.tsx, routes/ControlPanel.tsx: wire the list into the host field.

The VR app (/vr) host field is not changed here.

Test plan

  • npm test, npm run lint (no errors), npm run format:check, npm run build
  • Checked in a browser: focusing the field shows the list; typing local filters it

🤖 Generated with Claude Code


Note

Low Risk
Client-only UX and localStorage; connection logic is unchanged aside from recording hosts after successful connects.

Overview
The setup dialog’s Axol Host field now behaves like dataset repo fields: focusing it shows a filterable dropdown of the last five hosts that connected successfully (newest first), while free typing still works. History is stored in localStorage as axolHostHistory; only successful connects call recordHost, with case-insensitive dedupe and re-promotion on reconnect. The existing axolServerHost last-host key is unchanged.

SuggestInput and FieldSuggestion move from config-form.tsx into shared suggest-input.tsx, with wrapper className and passthrough input attributes (e.g. spellcheck) so the setup form can lay out the field in a flex row. ControlPanel loads history on mount, updates it after fetchCommands succeeds, and passes hostHistory into SetupDialog.

Reviewed by Cursor Bugbot for commit f1e60ba. Configure here.

The setup dialog only remembered the last host. Clicking the host field
now opens a dropdown of the last 5 hosts that connected successfully,
newest first, using the same suggestion dropdown as the dataset field.

- components/suggest-input.tsx: SuggestInput moved out of config-form so
  the setup dialog can reuse it; extra input attributes pass through.
- lib/host-history.ts: MRU list in localStorage (axolHostHistory), deduped
  case-insensitively, capped at 5; recorded only on a successful connect.
- setup-dialog / ControlPanel: wire the list into the host field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
axol Ready Ready Preview Sep 24, 2026 7:24pm UTC

Request Review

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f1e60ba. Configure here.

Comment thread web/app/src/components/suggest-input.tsx
SetupDialog closes on a window-level Escape listener, so pressing Escape
with the recent-hosts list open dismissed the whole dialog. Stop the event
when the list consumes it; a second Escape still closes the dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shawnpatel
shawnpatel merged commit 9cee79c into main Sep 24, 2026
4 checks passed
@shawnpatel
shawnpatel deleted the host-history-dropdown branch September 24, 2026 19:26

This branch was successfully deployed

1 active deployment
Preview — 80562233 Deployed Sep 24, 2026 by vercel[bot]
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.

1 participant