Skip to content

feat(web): the Access tab names the car and charger in a request - #1684

Merged
frahlg merged 2 commits into
masterfrom
claude/box-access-names
Oct 18, 2026
Merged

frahlg merged 2 commits into
masterfrom
claude/box-access-names

Conversation

@frahlg

@frahlg frahlg commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Problem

On the box page, Settings → Access lists an assistant's requests under "Waiting for your yes". A request that names a car showed the car's 32-digit id, for example Car 4966cee2bfa7dd771fc910d68fb4b554. The owner could not tell which car the assistant meant.

The args here are not the assistant's opaque ids. The box resolves those as the request arrives and keeps the owner's view with its own ids (agentstate.go, agentRequest), so GET /api/agents returns a charger's loadpoint id and a car's id from the car store. A charger's id is already its name on the box (the Chargers tab shows lp.id); a car's id is not.

Change

  • appproto.Handler.ArgNames names each argument of kind loadpoint or car in a request (protocol.RegistryAgentArgs), from the same ports the box uses to resolve ids in a cmd: a car by its name in the car store, a charger by its id while the box still has it. An id the box no longer knows gets no name.
  • GET /api/agents adds names: {arg: name} to each request. api.AgentRequest wraps protocol.Request; only this local route builds it.
  • access.js shows the name for a charger or car argument and falls back to the id. It ignores names for any other kind. Cache key access1 → access2.
  • docs/agents.md, "Approval on the box page", says what names holds and who reads it.

protocol.Request and the typed agent.list answer keep their existing form and ids. The full technical diagnostic API added in #1723 reads the same page shape as the local API; this rebase updates its agent-list adapter to preserve that access.

Evidence

  • go/internal/appproto: TestTheBoxPageNamesARequestsCarAndCharger. An agent asks by its own ids; the list names the car "Volvo" and the charger "lp1". After the car and the charger go, neither request has names, and the args still hold the box's ids.
  • go/internal/api: TestTheAgentListNamesARequestsChargerAndCar. The JSON carries names beside unchanged args, and a request with nothing to name has no names key.
  • web/settings/tabs/access.test.mjs: names a car and a charger, cleans hidden characters from a name, ignores a name on a power argument, and falls back to the id.
  • The original branch passed make verify and npm test (760 tests). The current master rebase keeps later app/fleet terms2 cache keys and fixes the diagnostic agent-list adapter; final checks run on this head before merge.

Browser check against a local Core

A scratch rig, not in the repo: a Core build with -ldflags pointing cloudlink.Endpoint, ServiceKeys, DevRootCA and OfferKeys at a local stand-in for FTW Cloud. The stand-in is the uplink tests' miniCloud and Noise initiator as a program. The box granted the assistant through POST /api/agents from the Mac's LAN address with the house password. The box then linked, the assistant opened its session through the tunnel, read cars.get and loadpoints.get, and sent three agent.requests by its own ids. I took the screenshots on loopback; reading the list needs no sign-in there. On loopback #1682 dims Approve, since the house password does not count on the box itself. Two of the three cars came from named vehicle profiles; "Car 1" is the car the box made from the charger's old settings.

Before (#1682's page at 73bb9f6, against the same Core) and after (this branch on 3e7a6a1):

Before After
Before: car goal After: car goal
Before: charger and car After: charger and car

Not tried against the real FTW Cloud, a real assistant or the home box. A person still needs to review the page in a browser.

Changeset: patch.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T06:02:35.162642Z a3c3b03 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

A request waiting for the owner on the box page showed a car by its
32-digit id. GET /api/agents now adds names to each request: for every
argument of kind loadpoint or car that the box still knows, what the box
calls it. The page shows the name and falls back to the id.

The args stay the box's own ids, as before. Only this local, owner-only
route carries names; protocol.Request and everything an agent or FTW
Cloud reads are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frahlg
frahlg force-pushed the claude/box-access-names branch from d39607e to 46a5636 Compare October 18, 2026 15:30
@frahlg
frahlg changed the base branch from claude/box-access-page to master October 18, 2026 15:30
@frahlg
frahlg merged commit 2a0662c into master Oct 18, 2026
22 checks 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.

1 participant