Skip to content

feat(tui): emit OSC 7577 program resume reports - #522

Merged
shuv1337 merged 2 commits into
integration-v2from
osc7577-program-resume
Nov 26, 2026
Merged

shuv1337 merged 2 commits into
integration-v2from
osc7577-program-resume

Conversation

@shuv1337

Copy link
Copy Markdown
Owner

Summary

  • Advertise the full Shuvcode TUI’s current resume command to OSC 7577 v0.5 terminals. Home reports a base command; a confirmed session adds --session. Plugin views keep the last command, and SIGCONT refreshes it.
  • On exit, clear the record only after a clean user exit and terminal teardown. Preserve it on hangup, termination, interruption, or loss of the terminal. An unreportable command also clears any stale record.
  • Capture and strip OSC7577_TOKEN on every CLI path. Only packaged interactive full TUI runs can report; Mini, source runs, and automation remain silent. The terminal-issued token is the opt-in.

Verification

  • bun run check: 40/40 tasks; TUI and CLI typecheck:tsc passed.
  • Full suites: TUI 1,862 passed / 2 skipped, CLI 560 passed / 7 skipped, client 291 passed. No failures.
  • Five-repeat OSC coverage: 195 TUI and 115 CLI passes. Repeating the entire TUI lifecycle file reproduces the same 12 failures on this branch and the pinned base.
  • A compiled Bun CLI in an isolated PTY emitted a valid signed Home report and cleared it after leaving the alternate screen.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" role="img" aria-label="Shuvcode sends a signed session resume report to its terminal">
  <style>
    .signal { animation: send 2.8s ease-in-out infinite; }
    @keyframes send {
      0%, 12% { transform: translateX(-17px); opacity: 0; }
      28%, 62% { opacity: 1; }
      76%, 100% { transform: translateX(17px); opacity: 0; }
    }
    @media (prefers-reduced-motion: reduce) { .signal { animation: none; } }
  </style>
  <g fill="none" stroke="currentColor">
    <rect x="4.5" y="14.5" width="85" height="43" rx="6" opacity=".35"/>
    <rect x="150.5" y="14.5" width="85" height="43" rx="6" opacity=".35"/>
    <path d="M90 36h60m-7-5 5 5-5 5" opacity=".45"/>
    <path d="m16 32 4 4-4 4m7 0h5m134-5 3 3 6-6" stroke-linecap="round" stroke-linejoin="round"/>
  </g>
  <circle class="signal" cx="119" cy="36" r="2.5" fill="currentColor"/>
  <g fill="currentColor" font-family="monospace" font-size="10">
    <text x="34" y="39">session</text>
    <text x="178" y="39">resume</text>
    <text x="120" y="55" text-anchor="middle" font-size="8" opacity=".65">OSC 7577</text>
  </g>
</svg>

@shuv1337
shuv1337 merged commit 0f8caeb into integration-v2 Nov 26, 2026
7 checks passed
@shuv1337
shuv1337 deleted the osc7577-program-resume branch November 26, 2026 06:21
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