Skip to content

[codex] Support TCPViewer session export and import#61

Draft
NghiaTranUIT wants to merge 2 commits into
mainfrom
codex/add-tcpviewsession-export-support
Draft

[codex] Support TCPViewer session export and import#61
NghiaTranUIT wants to merge 2 commits into
mainfrom
codex/add-tcpviewsession-export-support

Conversation

@NghiaTranUIT

Copy link
Copy Markdown
Member

Summary

Adds .tcpviewsession as a ZIP-backed TCPViewer session format with readable JSON sidecars, an internal capture.pcapng, de-duplicated client records, annotations, document-local state, and packaged client icons.

The import path now handles malformed per-flow records gracefully: unsafe packages still fail at the package boundary, but malformed packet rows are skipped, valid flows continue importing, and TCPViewer shows an alert with imported/skipped flow counts only when skipped flows are present.

What Changed

  • Added session format models plus export/import services for .tcpviewsession packages.
  • Added File menu export flow and document type registration/icon assets.
  • Preserved document-local pins, saved packets, custom filters, source-list state, table state, comments/colors, client metadata, and app icons without mutating global user state.
  • Added client de-duplication and document-local icon resolution for packet table/source list rendering.
  • Hardened session import against malformed ZIP paths, unsupported schema, duplicate IDs, dangling refs, bad JSONL rows, invalid ordinals, packet ID mismatches, and missing optional icons.
  • Mapped session packets to raw capture.pcapng packets by captureOrdinal, so skipped rows do not shift inspection/export onto the wrong packet.

Validation

  • git diff --check
  • xcodebuild -project TCPViewer.xcodeproj -scheme TCPViewer build CODE_SIGNING_ALLOWED=NO TCPVIEWER_DEVELOPMENT_TEAM=ABCDE12345 TCPVIEWER_BUILD_KEY=local-build
  • xcodebuild test -project TCPViewer.xcodeproj -scheme TCPViewer -destination platform=macOS CODE_SIGNING_ALLOWED=NO TCPVIEWER_DEVELOPMENT_TEAM=ABCDE12345 TCPVIEWER_BUILD_KEY=local-build

The exact default build/test commands still fail locally because this machine does not have a valid Apple Development identity for the SMJobBless requirement generation step: Invalid Apple Development signing identity for SMJobBless requirements: Sign to Run Locally.

Disclosure

This PR was substantially assisted by AI and reviewed through local build/test runs before publishing.

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