Skip to content

Track web pane URLs in bridge for layout capture #84

@kordless

Description

@kordless

Goal

Extend the bridge's TrackedSession type to include webUrl so that layout save (#82) can capture web pane URLs without an extra IPC roundtrip.

Current state

  • app/bridge.ts:34-51 TrackedSession tracks: rows, cols, name, tabName, description, rootTabUid, windowId, splitLabel, tabOrder, tabActive, paneActive, bspX/Y/W/H
  • Web pane URL lives in renderer Redux at termGroups[uid].webUrl (typings/hyper.d.ts:33)
  • No flow from renderer to bridge for URL changes

Scope

  • Add webUrl?: string | null to TrackedSession interface
  • Add an exported function updateSessionWebUrl(uid, url) in bridge.ts
  • In renderer, when a webUrl reducer action fires (lib/reducers/term-groups.ts:234, 242), fire an RPC to main → call updateSessionWebUrl
  • Add an IPC 'session web url' handler in app/ui/window.ts that calls updateSessionWebUrl

Why this matters

  • Without bridge tracking, layout save needs an IPC roundtrip on every close to fetch URLs from Redux
  • With bridge tracking, the main process can iterate trackedSessions filtered by windowId and emit URLs directly

Files touched

  • app/bridge.ts — extend TrackedSession, add updateSessionWebUrl
  • app/ui/window.ts — register RPC handler
  • lib/reducers/term-groups.ts — emit RPC alongside reducer dispatch (or via a thunk)

Depends on

None — can ship independently. Unblocks #82 from needing per-pane IPC fetches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions