GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(web): terminal output no longer re-renders the drawer, theme… · pingdotgg/t3code@28df7a2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src
    • components
      • ThreadTerminalDrawer.test.ts
      • ThreadTerminalDrawer.tsx
      • onboarding
        • WelcomeWizard.tsx
      • settings
        • ProviderAuthTerminal.tsx
        • SettingsFontPreviews.tsx
        • SettingsSidebarNav.tsx
        • ThemeImportDialog.browser.test.tsx
        • ThemeImportDialog.tsx
        • ThemeSearchSection.test.ts
        • ThemeSearchSection.tsx
        • TypographySettings.browser.test.tsx
        • TypographySettings.tsx
        • settingsSearch.ts
    • hooks
      • useLocalStorage.ts
    • state
      • session.ts
      • terminalSessions.test.ts
      • terminalSessions.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/ThreadTerminalDrawer.test.ts‎

Copy file name to clipboardExpand all lines: apps/web/src/components/ThreadTerminalDrawer.test.ts
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
shouldClearTerminalSelectionAction,
1212
shouldHandleTerminalExit,
1313
synchronizeTerminalOutput,
14+
synchronizeTerminalSession,
1415
} from "./ThreadTerminalDrawer";
1516

1617
describe("terminal selection actions", () => {
@@ -87,3 +88,16 @@ it("retains visible output and selection until a replacement subscription receiv
8788
synchronizeTerminalOutput(terminal, cleared, observedCursor);
8889
expect(terminal.resetAndWrite).toHaveBeenLastCalledWith("");
8990
});
91+
92+
it("reports an attach failure that leaves the output unchanged", () => {
93+
const terminal = { resetAndWrite: vi.fn(), write: vi.fn(), clearSelection: vi.fn() };
94+
const previous = { ...EMPTY_TERMINAL_BUFFER_STATE, error: null };
95+
const failed = { ...previous, error: "Terminal attach failed" };
96+
97+
expect(
98+
synchronizeTerminalSession(terminal, previous, failed, INITIAL_TERMINAL_OUTPUT_CURSOR),
99+
).toBe(INITIAL_TERMINAL_OUTPUT_CURSOR);
100+
expect(terminal.write).toHaveBeenCalledWith("\r\n[terminal] Terminal attach failed\r\n");
101+
expect(terminal.resetAndWrite).not.toHaveBeenCalled();
102+
expect(terminal.clearSelection).not.toHaveBeenCalled();
103+
});

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.