Skip to content

Adapt catalog grids and thread workspaces for Duo and iPad - #56

Merged
vanities merged 12 commits into
masterfrom
codex/iphone-duo-layouts
Oct 5, 2026
Merged

vanities merged 12 commits into
masterfrom
codex/iphone-duo-layouts

Conversation

@vanities

@vanities vanities commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Opening Swiftchan on Duo or iPad keeps the catalog card grid available while reading the selected thread. Compact phones and an active Duo fold use two columns; opening the Duo adds columns according to the catalog pane width. The verified native Tabletop transition shows two → four → two columns while keeping thread 200 and reply 205 visible.

The native ArrangementView respects the system hinge region and its margins, retains its container through background snapshots, and preserves reading anchors using post IDs. iPad uses a balanced board/thread workspace. Catalog selection remains visible with an accent outline. This branch also includes nested reply navigation, unified thread jumps, reverse image search, and gallery/media actions.

Updates the app to 1.3 (4), records Duo/iPad capture and pose-control instructions in AGENTS.md and the testing guides, and preserves CLAUDE.md as its compatibility symlink. The gallery regression now checks the post for the paged media after dismissal. The CI build/test step has 25 minutes for cold compilation plus the full suite; the job retains its 30-minute limit.

Validation:

  • Native Duo grid transition passed with real simulator hinge events and visible-thread/reading-position assertions; native PNGs and a new video were captured.
  • iPhone 17 on iOS 26.5: the compact two-column navigation test, favorites export test, and paged gallery/image-search test all passed (3 tests, 0 failures).
  • Changed Swift files passed scoped SwiftLint with no serious violations. Both package lockfiles match and the final source builds for testing with the scoped Xcode 27.2 beta toolchain.
  • Full iPhone 17 suite on iOS 26.5: 95 unit tests and 21 phone UI tests passed, with five opt-in Duo tests skipped and no failures.
  • Updated iPad mini portrait and Pro landscape walkthroughs passed with native orientation preparation; the native closed Duo check passed two columns and pushed navigation in landscape.
  • All four new review videos passed full AVFoundation frame decoding (6,210 frames). Native PNGs retain simulator resolution.
  • Hosted Build and Test passed on commit 5e31854: 95 unit tests and 21 phone UI tests passed, with five opt-in Duo tests skipped and no failures. CodeRabbit completed with no actionable comments.

The earlier four-app review is in ../iphone-duo-review/2026-10-04-current/. Updated Swiftchan grid footage and source provenance are kept separately in ../iphone-duo-review/2026-10-04-grid/.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4aad066f-f8ee-4946-ab21-28b352b84de7
📥 Commits

Reviewing files that changed from the base of the PR and between e22028d and 5e31854.

📒 Files selected for processing (25)
  • .github/workflows/build_and_test.yml
  • AGENTS.md
  • docs/ipad-testing.md
  • docs/iphone-duo-testing.md
  • swiftchan.xcodeproj/project.pbxproj
  • swiftchan/Extensions/CoreExtensions.swift
  • swiftchan/Info.plist
  • swiftchan/Models/PresentationState.swift
  • swiftchan/Models/ReverseImageSearch.swift
  • swiftchan/Services/ThreadUITestFixture.swift
  • swiftchan/ViewModels/CatalogViewModel.swift
  • swiftchan/Views/Boards/Catalog/CatalogView.swift
  • swiftchan/Views/Boards/Catalog/Thread/PostDetailView.swift
  • swiftchan/Views/Boards/Catalog/Thread/PostView.swift
  • swiftchan/Views/Boards/Catalog/Thread/QuotePreviewSheet.swift
  • swiftchan/Views/Boards/Catalog/Thread/RepliesView.swift
  • swiftchan/Views/Boards/Catalog/Thread/ThreadView.swift
  • swiftchan/Views/Media/Gallery/GalleryPreviewView.swift
  • swiftchan/Views/Media/Gallery/GalleryView.swift
  • swiftchan/Views/Media/Gallery/MediaContextMenu.swift
  • swiftchan/Views/Media/Gallery/MediaDownloadMenu.swift
  • swiftchan/Views/Media/ReverseImageSearchMenu.swift
  • swiftchan/Views/Utility/RefreshProgressBar.swift
  • swiftchanTests/ReverseImageSearchTests.swift
  • swiftchanUITests/BrowsingUITests.swift
💤 Files with no reviewable changes (2)
  • swiftchan/Views/Boards/Catalog/Thread/QuotePreviewSheet.swift
  • swiftchan/Extensions/CoreExtensions.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The update adds adaptive catalog and thread navigation, reverse-image-search links, and gallery layout changes. It also adds simulator fixtures, UI and unit tests, iPad and iPhone Duo testing guidance, and build and version setting updates.

Changes

Adaptive catalog and linked-post navigation

Layer / File(s) Summary
Adaptive catalog workspace
swiftchan/Views/Boards/Catalog/CatalogView.swift, swiftchan/Services/ThreadUITestFixture.swift, swiftchan/ViewModels/CatalogViewModel.swift, swiftchan/Extensions/CoreExtensions.swift, swiftchan/Views/Utility/RefreshProgressBar.swift, swiftchan.xcodeproj/project.pbxproj, swiftchan/Info.plist, AGENTS.md
The catalog selects a thread workspace based on available width and size class. Supported Duo layouts use division geometry when active. Debug fixtures supply catalog entries and seeded media. Build versions and Duo layout settings are updated.
Linked-post navigation and reading position
swiftchan/Models/PresentationState.swift, swiftchan/Views/Boards/Catalog/Thread/*, swiftchan.xcodeproj/project.pbxproj
Post links open post-specific reply views through item-based navigation. Thread views save and restore reading anchors, and unread navigation moves into the jump menu. The quote-preview sheet is removed.
Workspace validation and test guidance
swiftchanUITests/BrowsingUITests.swift, docs/ipad-testing.md, docs/iphone-duo-testing.md, AGENTS.md, .github/workflows/build_and_test.yml
UI tests cover catalog layouts, Duo transitions, linked posts, unread navigation, and quote copying. Testing guidance documents simulator geometry, capture procedures, and validation results. The build-and-test timeout increases to 25 minutes.

Gallery and reverse image search

Layer / File(s) Summary
Search URL construction and entry points
swiftchan/Models/ReverseImageSearch.swift, swiftchan/Views/Media/ReverseImageSearchMenu.swift, swiftchan/Views/Boards/Catalog/Thread/PostView.swift, swiftchan.xcodeproj/project.pbxproj, swiftchanTests/ReverseImageSearchTests.swift
The app builds search URLs for six providers from supported image or thumbnail URLs. Post and gallery menus show available provider links and an original-media link. Unit tests cover provider hosts, URL encoding, source selection, and unsupported URLs.
Gallery sizing and media controls
swiftchan/Views/Media/Gallery/*, swiftchanUITests/BrowsingUITests.swift, AGENTS.md
Gallery thumbnails use available container geometry and scroll to the selected item. The gallery adds a media-position indicator and passes thumbnail URLs to context menus. UI tests cover searches from posts and paged gallery media.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor Reader
  participant CatalogView
  participant ThreadView
  Reader->>CatalogView: Select a thread
  CatalogView->>ThreadView: Set the selected thread
  ThreadView-->>Reader: Display the selected thread
Loading
sequenceDiagram
  actor Reader
  participant ReverseImageSearchMenu
  participant ReverseImageSearchProvider
  participant Safari
  Reader->>ReverseImageSearchMenu: Open search links
  ReverseImageSearchMenu->>ReverseImageSearchProvider: Request a search URL
  ReverseImageSearchProvider-->>ReverseImageSearchMenu: Return a provider URL
  Reader->>Safari: Open the provider link
Loading

Merge Risk: ⚪ Minimal · up to 5e318

The catalog search and layout-transition concerns do not block merging. Normal build and test checks still apply.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 5e318

Media search requires an explicit user action and uses fixed destinations with basic URL validation. Risk appears limited, but the public-only guarantees of archive media URLs remain unconfirmed. Navigation interruption and recovery also have limited validation.

Retained concerns

  • Low · security · inferred: If an archive response supplies a private or token-bearing media URL, activating reverse search forwards its complete URL to the selected third party. The archive fields' public-only guarantee and attacker influence remain unverified; no actual sensitive disclosure was demonstrated. The archive producer predates this PR, but the third-party propagation path is new.
Security review details

Security Blast Radius

  • inferred — The new disclosure path is scoped to one selected media URL and one individually activated provider link. Image and GIF searches use the original URL; video searches use the thumbnail URL. Any conditional exposure concerns the supplied URL contents, not a demonstrated gain of app or infrastructure authority.

Security Findings and Attack Paths

  • inferred — A conditional path exists from an archive-provided eligible URL through the media model into an external search query after user activation. Exploitation requires an attacker-influenced or sensitive archive URL, neither of which was established. Provider-side fetching, redirect handling, and internal-network access were not established, so this does not verify SSRF or credential theft.

Trust Boundaries and Controls

  • observed — Selected search sources require HTTP or HTTPS, a nonempty host, and no URL username/password. Destination query construction preserves encoding and escapes form-sensitive plus signs. These controls do not constrain source hosts or remove query/path tokens; the tests explicitly exercise preservation of such URL contents.

Resilience and Maintainability Implications

  • observed — Gallery selection is bounded against the injected thread model, and refresh is paused during gallery or reply presentation. Catalog selections originate from posts constructed with the catalog model's immutable board, providing counterevidence to cross-board reuse based solely on numeric thread keys.

Hardening Proposals

  • proposed — Establish a public-media contract for archive URL fields. If that guarantee cannot be established, consider provenance-aware search eligibility and destination preview or confirmation for unknown sources rather than assuming every eligible HTTP(S) URL is suitable for third-party disclosure.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 17 files. (6 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adapting catalog grids and thread workspaces for Duo and iPad.
Full details: Docstring Coverage

Explanation

Docstring coverage is 2.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 17 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vanities vanities changed the title Adapt board browsing and media to iPhone Duo Adapt Duo browsing, replies, and media actions Oct 4, 2026
@vanities vanities changed the title Adapt Duo browsing, replies, and media actions Adapt board and thread workspaces for Duo and iPad Oct 5, 2026
@vanities vanities changed the title Adapt board and thread workspaces for Duo and iPad Adapt catalog grids and thread workspaces for Duo and iPad Oct 5, 2026
@vanities
vanities marked this pull request as ready for review October 5, 2026 01:57
@vanities
vanities merged commit 5409def into master Oct 5, 2026
2 checks passed
@vanities
vanities deleted the codex/iphone-duo-layouts branch October 5, 2026 02:19
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