Skip to content

Episode comments, spoiler hiding and timed reactions - #66

Closed
professorDeveloper wants to merge 3 commits into
next/3.3.0from
feat/episode-comments-reactions
Closed

professorDeveloper wants to merge 3 commits into
next/3.3.0from
feat/episode-comments-reactions

Conversation

@professorDeveloper

Copy link
Copy Markdown
Owner

Needs professorDeveloper/sozo-backend#79. Until that is deployed, the new calls fail quietly and everything behaves as before.

Episode discussion

  • The player shows React and Comments buttons on the end edge while the controls are visible.
  • Comments opens the episode's own thread, reusing CommentsPanel. It is a side panel on landscape, TV and desktop, and a bottom sheet on a portrait phone.
    • It opens as a route, so typing never reaches the player's keyboard shortcuts, and BACK on a remote closes the thread rather than the player.
    • A film opens the title's thread.
  • The thread is scoped by an episode key, e<episode number>: the same number watch history uses (EpisodeKey).
  • New comments written in the player are stamped with the current second.
  • The episodes list shows a comment count per episode when there are any. It comes from one GET /comments/episode-counts call, and tapping the count opens that episode's thread.

Spoilers

  • The compose box has a Spoiler toggle. Spoiler comments are blurred, with a "tap to reveal" pill. The reveal is focusable for the D-pad.
  • New setting under Player settings: Hide spoilers for episodes I haven't watched, on by default.
    • It blurs comments about an episode the viewer has not finished.
    • "Finished" means watched past the 85% tracker threshold, or history already has a later episode of the title.
    • While watching, only comments stamped after the current playhead stay blurred.
  • The viewer's own comments always show.

Timed reactions

  • React opens a bar with 8 emoji and a short-text option (60 characters max). It posts at the current second and shows the viewer's own reaction straight away.
  • There is a 5-second client cooldown, and the server's 429 is shown as a message.
  • Reactions pop up in a lane at the start edge, between the top bar and the subtitles:
    • they fade in and out;
    • repeats are grouped ("🔥 ×12");
    • at most 3 are on screen at once.
  • After a seek, nothing from before the landing point bursts onto the screen.
  • A thin heatmap above the seek bar shows where reactions cluster.
  • New setting: Viewer reactions, on by default. It turns the lane and the heatmap off.

How it fits in

  • The player work is a new part file, player_page.reactions.dart. The other player files get one-line hooks: reset, load and tick next to the AniSkip calls, the layers in the stack, and the heatmap in the seek bar.
  • Episode and spoiler support in the comments repository goes through a separate EpisodeCommentsRepository interface, which CommentsRepositoryImpl also implements. Existing fakes of CommentsRepository keep compiling.
  • CommentEntity gains optional fields with defaults.
  • comment_card.dart is not touched: the blur wraps the card from the panel.

Strings

15 new keys, translated into all 16 locales.

Tests

  • test/features/comments/reaction_scheduler_test.dart covers:
    • which reactions show at time t;
    • forward and backward seeks, and landing exactly on a reaction;
    • grouping and the visible cap;
    • adding the viewer's own reaction, the heatmap scaling and JSON parsing.
  • test/features/comments/episode_key_test.dart covers episode key building and its agreement with the history storage key.
  • test/features/comments/spoiler_rules_test.dart covers the visibility rules and what counts as a finished episode.

Not verified

  • Nothing was built or run on a device or emulator. The owner does not allow running Flutter on this machine, so CI is the only check.
  • The layout has not been looked at on phone, TV or desktop. That includes the lane position, the rail position, and how the heatmap sits on the TV seek bar.
  • D-pad reachability of the rail buttons and the reaction bar follows the existing focus patterns, but has not been tried on a TV.
  • Reporting a single reaction from the app is not built. The backend accepts reaction reports, but the aggregated GET carries no ids.

The player gets React and Comments buttons. Comments opens the episode's
own thread (side panel on landscape, TV and desktop, bottom sheet on a
portrait phone). React opens an eight-emoji bar with a short text option
and posts at the current second.

Other viewers' reactions pop up in a lane at the start edge, grouped and
capped at three on screen, with a heatmap strip over the seek bar. Both
can be turned off in player settings.

Comments can be marked as spoilers and are blurred until tapped. A new
setting, on by default, also blurs comments about episodes the viewer
has not finished, using watch history. The episode list shows a comment
count per episode when there are any.

Title-level comments, and apps without this change, behave as before.
An is-check does not promote CommentsRepository to an unrelated
interface, so the scoped calls did not resolve.
Jumping from 10 s to 13 s in one tick is a seek, which correctly
restarts the window.
@professorDeveloper

Copy link
Copy Markdown
Owner Author

Combined into one PR against release/3.2.1.

@professorDeveloper
professorDeveloper deleted the feat/episode-comments-reactions branch November 7, 2026 13:16
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