Skip to content

feat: add contextual actions across Harbor - #1404

Closed
OwaisByte wants to merge 1 commit into
harborstremio:beta-branchfrom
OwaisByte:feat/context-actions
Closed

OwaisByte wants to merge 1 commit into
harborstremio:beta-branchfrom
OwaisByte:feat/context-actions

Conversation

@OwaisByte

@OwaisByte OwaisByte commented Sep 8, 2026

Copy link
Copy Markdown

Summary

Right-clicking a Harbor poster currently opens different menus depending on which component rendered it. Collections, downloads, profile content and nested links/images can instead fall through to WebView page commands, while file and membership actions need different targets and guarantees.

This adds a shared context-action system that composes the registered entity, its explicit membership/page context, and the actual image/link/text under the pointer. Independent child controls retain their own target. The work covers title and episode cards, library and collections, downloads/local files/server sources, profiles and social content, readers, live channels, and page navigation without changing their card layouts or including ElegantFin work.

Why

  • Keep Harbor's menu styling, translation and input conventions while centralizing measured placement, submenus, focus restoration and session-bound execution.
  • Make Add idempotent and Move affect only the specified membership. Require acknowledged storage and validate collection publication/ownership rather than reporting memory-only success.
  • Use exact download IDs and file paths, explicit episode scopes and fresh provider state. Report partial results and preserve records when a delete or persistence step fails.
  • Add an image viewer with zoom/pan and real image save/copy operations. Public image links have separate eligibility checks; copying an image never means copying its URL.
  • Preserve native editing behavior. A Windows WebView2 bridge covers transferable sandboxed Canvas image/link content without weakening sandbox isolation; unsupported frame content retains native tools.

Verification

The detailed coverage and limitations are in docs/context-actions-review.md. Tests use isolated storage, mocked account services and dedicated temporary files; no real account writes or user-file deletion were used for QA.

  • Changed-file pnpm run check and TypeScript checks passed, with the recorded pre-existing gamepad lint warning.
  • The full frontend suite ran 1,283 tests: 1,253 passed, the same nine failures recorded on the untouched base remain, and 21 were skipped. This is not an all-green claim.
  • Windows cargo check passed with three existing dead-code warnings; four native policy tests passed.
  • The isolated Windows native fixture passed eight probes, including pixel-exact clipboard round-trip, loopback image loading, editing-command filtering and sandboxed HTTP/blob context metadata/fallback.
  • Full-application browser checks covered right-click/Shift+F10, image submenu and focus return, truthful image failure, additive membership, Move to an existing destination, persistence in a fresh tab, Arabic RTL placement, and dismissal without activating the sidebar underneath.
  • Built the full isolated Windows application, separately from the fixture. Startup/shutdown smoke verification and the exact final artifact are recorded in the review document.

Final GitHub Code Quality run on c3fc27a0:

  • Frontend formatting/lint and typecheck passed on Ubuntu. Its test result exactly matched Windows: 1,253 passed, nine baseline failures and 21 skipped.
  • Linux cargo check and cargo test passed: 187 tests passed, zero failed, two ignored. This establishes native compilation/unit-test coverage; it does not replace a Linux desktop build/runtime trial.
  • The overall workflow remains red solely because of the documented baseline frontend test failures.

Platform Impact

Windows native fixture and full-application startup were exercised. Native Save-dialog interaction, actual local playback/reveal, the full-app asynchronous frame bridge, real connected-provider writes and physical remote/gamepad checks remain manual acceptance items.

The Linux system build was attempted with the Linux target, but this Windows host lacks x86_64-unknown-linux-gnu; no Linux binary or runtime verification is claimed. macOS/mobile runtime checks are also outstanding. Native Canvas interception is intentionally Windows-specific; fallback behavior remains on other platforms.

Unsafe Simkl membership-only removal/unwatch operations remain blocked rather than deleting a whole title/history entry. Cross-family Move, universal cross-tab Back history and an invented Follow/Unfollow service are not included.

AniList/MyAnimeList progress informs the read state, but these context-menu writes do not synchronize progress back to those services. Connected services receive named unsupported outcomes instead of a silent success claim; individual-episode actions do not invent a sequential-progress update.

UI Changes

This is a draft for code review and isolated desktop trial. Before/after screenshots and a short interaction recording are still required before marking it ready. Existing screenshots containing user accounts were not uploaded.

Checklist

  • This pull request is focused and contains no unrelated refactors.
  • I ran vp check for the changed files.
  • I ran the TypeScript check after TypeScript changes.
  • I ran the relevant Cargo checks after Rust changes.
  • I completed all affected-platform manual acceptance checks.
  • I completed physical remote/gamepad and playback regression verification.
  • I added or updated tests for behavior changes.
  • No secrets, tokens, private URLs or personal account data are included in the submitted artifacts.

@OwaisByte OwaisByte closed this Sep 9, 2026
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