Skip to content

Commit 364e760

Browse files
t3dotggclaude
andcommitted
feat(web): flatten the connections page into one environments list
Settings → Connections lost its hierarchy after #11542 moved every control into a fixed-height master-detail panel. This puts the page back in reading order: this machine's settings block, one Environments list where the switch is the main action, then Load balancing and GitHub sharing as folded sections that summarize their non-default values in the header. - Environment rows print transport first (T3 Connect, SSH, URL) then status. Errors truncate to one line with the full text on hover. - The icon override moves into the row menu as an Icon submenu that marks the detected kind. "Automatic" is gone. - Authorized clients folds behind one row with a client and link count. - Not yet added T3 Connect machines get an Add button in the same list. - Load balancing and GitHub sharing render only when two or more machines are on. Search jumps open the fold they target. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent c07575f commit 364e760

13 files changed

Lines changed: 713 additions & 586 deletions

‎apps/web/src/components/cloud/CloudEnvironmentConnectList.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ describe("cloud onboarding discovery", () => {
175175
finishDiscovery(linkedMachines);
176176
});
177177
expect(onDiscoveryReady).toHaveBeenCalledTimes(1);
178-
expect(renderer!.root.findByType("button").children).toEqual(["Connect"]);
178+
expect(renderer!.root.findByType("button").children).toEqual(["Add"]);
179179
});
180180

181181
it("connects and selects discovered computers by default without overwriting deselection", async () => {
@@ -232,15 +232,15 @@ describe("cloud onboarding discovery", () => {
232232
expect(renderer!.root.findAllByType("p").map((node) => node.children)).toContainEqual([
233233
"Work laptop",
234234
]);
235-
expect(renderer!.root.findByType("button").children).toEqual(["Connect"]);
235+
expect(renderer!.root.findByType("button").children).toEqual(["Add"]);
236236
await advance(30_000);
237237
expect(discovery.listEnvironments).toHaveBeenCalledTimes(2);
238238
});
239239

240240
it("keeps a discovered computer visible when it is added to the browser", async () => {
241241
discovery.listEnvironments.mockResolvedValue(linkedMachines);
242242
await mount();
243-
expect(renderer!.root.findByType("button").children).toEqual(["Connect"]);
243+
expect(renderer!.root.findByType("button").children).toEqual(["Add"]);
244244
await act(async () => {
245245
renderer!.update(
246246
<CloudEnvironmentConnectRows

‎apps/web/src/components/cloud/CloudEnvironmentConnectList.tsx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,13 @@ export function CloudEnvironmentConnectRows({
288288
const statusText = savedConnection
289289
? savedConnection.statusText
290290
: availability === "online"
291-
? "Available · Relay online"
291+
? "T3 Connect · Not added · Relay online"
292292
: availability === "offline"
293-
? "Available · Relay offline"
293+
? "T3 Connect · Not added · Relay offline"
294294
: availability === "checking"
295-
? "Available · Checking relay status…"
296-
: (Option.getOrNull(error)?.message ?? "Available · Relay status unavailable");
295+
? "T3 Connect · Not added · Checking relay status…"
296+
: (Option.getOrNull(error)?.message ??
297+
"T3 Connect · Not added · Relay status unavailable");
297298
if (selection) {
298299
return (
299300
<label
@@ -386,7 +387,7 @@ export function CloudEnvironmentConnectRows({
386387
disabled={connectingEnvironmentIds.size > 0}
387388
onClick={() => void connectEnvironment(environment)}
388389
>
389-
{connectingEnvironmentIds.has(environment.environmentId) ? "Connecting…" : "Connect"}
390+
{connectingEnvironmentIds.has(environment.environmentId) ? "Adding…" : "Add"}
390391
</Button>
391392
)}
392393
</div>

0 commit comments

Comments
 (0)