Skip to content

feat(native): port Files PDF/Office/Cmd+F and Device hub parity (PN-FILES, PN-DEVICE) - #455

Merged
rynfar merged 2 commits into
nativefrom
nw/g3-files-device
Nov 20, 2026
Merged

rynfar merged 2 commits into
nativefrom
nw/g3-files-device

Conversation

@rynfar

@rynfar rynfar commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Ports the #390 File/Search and Device deltas and advances #249 parity across PN-FILES and PN-DEVICE in apps/native, clearing #390 and stale closed #235 from apps/native/parity/LEDGER.md.

Part of #390
Part of #249

What changed

  • PN-FILES:

    • PDF viewer & progressive Find (pingdotgg/t3code#33956): Added crates/core/src/files/pdf.rs and crates/app/src/files/pdf.rs with bounded workspace asset download, macOS CoreGraphics/PDFKit rasterization, single-parse PdfScanSession wrapped in objc2::rc::autoreleasepool for progressive first-hit Find, zoom/fit-width controls, saved viewport position LRU, and cross-platform pure-Rust fallback parser.
    • Office / OOXML & OpenDocument previews (pingdotgg/t3code#35548): Added crates/core/src/files/office.rs and crates/app/src/files/office.rs supporting .xlsx/.ods spreadsheet grids with sheet tabs and interactive Excel-clamped (16..=1790 col / 16..=546 row) track resize, .docx/.odt/.rtf/.epub document previews, and .pptx/.odp slide previews, plus PDF & Office icons in crates/app/src/palette/files.rs.
    • Cmd+F / preview.find & focus routing (pingdotgg/t3code#34346, pingdotgg/t3code#34360): Added .key_context("Preview") on FilesPanel (crates/app/src/files/mod.rs) and Preview (crates/app/src/files/preview.rs) so default and user-customized preview.find bindings route cleanly without hardcoded secondary-f overrides; opening a file focuses its preview/editor, read-only CodeView opens an in-file Find bar (clearing find_input on close), and non-searchable previews propagate preview.find to FilesPanel to fall back to explorer search.
    • Verified MetadataCache (crates/core/src/files/metadata.rs) already retains positive hits per thread and expires misses (pingdotgg/t3code#30606).
  • PN-DEVICE:

    • Simlock ended-lease handling (pingdotgg/t3code#35994): Verified WebSocket close 4001 stops reconnect retries with the lease-end reason in crates/core/src/device/stream.rs and crates/client/src/device_stream.rs (AVCC lease-end frame remains listed under Not yet: alongside H.264/WebRTC decoding).
    • Agent-opened device tabs & Hub tools: Added AgentSessionTracker (crates/core/src/device.rs) and wired agent-opened right-panel device tabs (crates/app/src/device/mod.rs), added device hub endpoints in crates/core/src/device/hub.rs and crates/client/src/device_stream.rs (AX tree, iOS foreground SSE, iOS event log SSE, Android fold posture), wired them into DeviceScreen / DeviceScreen::render_tools (crates/app/src/device/screen.rs, screen/tools.rs) with AppEvent::Phase connection-change state reset and Android Back/Recents rail buttons.
  • Ledger (apps/native/parity/LEDGER.md): Updated PN-FILES and PN-DEVICE rows only (removed #390 and stale closed #235; kept partial | #249 with exact remaining gaps).

Verification

  • vp fmt --check apps/native/parity/LEDGER.md: pass
  • node apps/native/scripts/gen-theme.ts --check: tokens.rs up to date
  • node apps/native/conformance/generate.ts --check: pass
  • node --test apps/native/parity/sync.test.ts: 47 passed, 0 failed
  • CARGO_INCREMENTAL=0 cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings: 0 warnings, 0 errors
  • T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test --manifest-path apps/native/Cargo.toml -p t3-core -p t3-client -- --test-threads=1: t3-core 1837 passed + conformance 8 passed, t3-client 163 passed (0 failed)
  • T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test --manifest-path apps/native/Cargo.toml -p t3-native -- --test-threads=1: 205 passed, 0 failed
  • T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test --manifest-path apps/native/Cargo.toml -p t3-native --features snapshot -- files::tests --test-threads=1: 7 passed, 0 failed (440 filtered out)
  • CARGO_INCREMENTAL=0 cargo build --manifest-path apps/native/Cargo.toml -p t3-native: finished dev build

Built with Antigravity (g3-files-device).

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