authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-06-14 11:41:26-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-06-14 11:41:26-07:00
log31e68229d6561c2062e1ff69597897a665bcde62
treec9294b4679cd34b4950a9447ea7d3ace4213057a
parent1db585878ebc85927ddfe8a2bf50764e8e56ae4e
signature Signed by PGP key B5690EEEBB952194

Wrap authorized clients in fading scroll area (#3085)


2 files changed, 60 insertions(+), 1 deletions(-)

apps/web/src/components/settings/ConnectionsSettings.tsx+7-1
...@@ -3007,7 +3007,13 @@ export function ConnectionsSettings() {...@@ -3007,7 +3007,13 @@ export function ConnectionsSettings() {
3007 />3007 />
3008 }3008 }
3009 >3009 >
3010 {renderAuthorizedClients("current")}3010 <ScrollArea
3011 scrollFade
3012 className="max-h-[22.5rem]"
3013 data-testid="authorized-clients-scroll-area"
3014 >
3015 {renderAuthorizedClients("current")}
3016 </ScrollArea>
3011 </SettingsSection>3017 </SettingsSection>
3012 ) : null}3018 ) : null}
3013 <AlertDialog3019 <AlertDialog
apps/web/src/components/settings/SettingsPanels.browser.tsx+53
...@@ -917,6 +917,59 @@ describe("GeneralSettingsPanel observability", () => {...@@ -917,6 +917,59 @@ describe("GeneralSettingsPanel observability", () => {
917 await expect.element(page.getByText("Revoke others")).toBeInTheDocument();917 await expect.element(page.getByText("Revoke others")).toBeInTheDocument();
918 });918 });
919919
920 it("keeps authorized clients within a five-row fading scroll area", async () => {
921 window.desktopBridge = createDesktopBridgeStub({
922 serverExposureState: {
923 mode: "network-accessible",
924 endpointUrl: "http://192.168.1.44:3773",
925 advertisedHost: "192.168.1.44",
926 tailscaleServeEnabled: false,
927 tailscaleServePort: 443,
928 },
929 });
930 authAccessHarness.setSnapshot({
931 pairingLinks: [],
932 clientSessions: Array.from({ length: 7 }, (_, index) =>
933 makeClientSession({
934 sessionId: `session-client-${index}`,
935 subject: `client-${index}`,
936 scopes: ["orchestration:read"],
937 method: "browser-session-cookie",
938 client: {
939 label: `Client ${index + 1}`,
940 deviceType: "desktop",
941 os: "macOS",
942 browser: "Electron",
943 ipAddress: `192.168.1.${index + 10}`,
944 },
945 issuedAt: "2036-04-07T00:00:00.000Z",
946 expiresAt: "2036-05-07T00:00:00.000Z",
947 connected: index === 0,
948 current: index === 0,
949 }),
950 ),
951 });
952 setServerConfigSnapshot(createBaseServerConfig());
953
954 mounted = await render(
955 <AppAtomRegistryProvider>
956 <ConnectionsSettings />
957 </AppAtomRegistryProvider>,
958 );
959
960 await expect.element(page.getByText("Client 7")).toBeInTheDocument();
961 const scrollArea = document.querySelector<HTMLElement>(
962 '[data-testid="authorized-clients-scroll-area"]',
963 );
964 const viewport = scrollArea?.querySelector<HTMLElement>('[data-slot="scroll-area-viewport"]');
965
966 expect(scrollArea).not.toBeNull();
967 expect(viewport).not.toBeNull();
968 expect(scrollArea?.clientHeight).toBe(360);
969 expect(viewport?.scrollHeight).toBeGreaterThan(viewport?.clientHeight ?? 0);
970 expect(viewport?.className).toContain("mask-b-from");
971 });
972
920 it("revokes all other paired clients from settings", async () => {973 it("revokes all other paired clients from settings", async () => {
921 window.desktopBridge = createDesktopBridgeStub({974 window.desktopBridge = createDesktopBridgeStub({
922 serverExposureState: {975 serverExposureState: {