Skip to content

[codex] smooth panel feather motion#184

Merged
thewrz merged 10 commits into
mainfrom
feat/issue-183-smooth-feather-pipeline
Jun 27, 2026
Merged

[codex] smooth panel feather motion#184
thewrz merged 10 commits into
mainfrom
feat/issue-183-smooth-feather-pipeline

Conversation

@thewrz

@thewrz thewrz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds deterministic Dust/Chunk/Feather panel flourish classes.
  • Replaces generic gravity-only motion with cheap drag, immediate gravity, seeded wobble, and class-specific rendering.
  • Keeps open-only emission and shared BURST_DURATION cleanup.

Validation

  • cargo fmt --check
  • cargo test --test side_panel_flourish
  • cargo test app::panels::tests
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • cargo build --release
  • wc -l src/ui/side_panel/flourish.rs src/ui/side_panel/flourish_view.rs tests/side_panel_flourish.rs docs/superpowers/plans/2026-06-27-panel-feather-motion.md docs/superpowers/specs/2026-06-27-panel-feather-motion-design.md
  • git diff --check

Closes #183.

Summary by CodeRabbit

  • New Features

    • Added more varied side-panel flourish particles with distinct visual classes and motion patterns.
    • Updated rendering so each particle class is drawn with its own look, including dust, chunks, and full feathers.
  • Bug Fixes

    • Improved particle motion realism with smoother movement, gravity, drag, and subtle wobble.
    • Ensured all flourish particles clear reliably after the shared animation duration.
  • Tests

    • Expanded coverage for particle class distribution, motion differences, seeded variation, and cleanup timing.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@thewrz, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 17 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 58cb50d7-86b7-4ca8-b8fa-49b03fdd6f67

📥 Commits

Reviewing files that changed from the base of the PR and between 7039ec9 and 24046dd.

📒 Files selected for processing (2)
  • src/ui/side_panel/flourish.rs
  • tests/side_panel_flourish.rs
📝 Walkthrough

Walkthrough

Introduces a FeatherClass enum (Dust, Chunk, Feather) with per-class physics parameters. FeatherParticle gains wobble, drag, and rotation-velocity fields; seed_particle and tick_particle are updated to use class-derived simulation. flourish_view dispatches rendering per class. Tests cover seeding, motion dynamics, and shared cleanup. Two new docs (design spec and implementation plan) are added.

Changes

Panel Feather Motion

Layer / File(s) Summary
FeatherClass physics model
src/ui/side_panel/flourish.rs
Adds FeatherClass enum and FeatherClassParams, extends FeatherParticle with wobble/drag/rotation-velocity fields, updates seed_particle to derive class params, and replaces tick_particle with wobble-aware velocity, per-axis drag damping, and rotation simulation.
Class-dispatched rendering
src/ui/side_panel/flourish_view.rs, src/ui/side_panel/mod.rs
draw_feather early-returns on non-positive alpha and dispatches to draw_dust (filled circle), draw_chunk (two stroked segments), or draw_full_feather (adjusted alpha multipliers and stroke width). Re-export list reformatted.
Behavior tests
tests/side_panel_flourish.rs
Adds first_particle_of and tick_for helpers; new tests cover all-class seeding, distinct sizes, dust vs feather descent and lateral swoop, seeded wobble divergence, and shared BURST_DURATION cleanup.
Design spec and implementation plan
docs/superpowers/specs/..., docs/superpowers/plans/...
New feather-motion design spec defines FeatherClass semantics, per-tick motion model, lifecycle constraints, and testing requirements. New implementation plan enumerates tasks, validation commands, and PR prep. Edge-emitter plan snippet updated to inline PanelRect.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • wrzonance/HonkHonk#182: This PR adjusts the floating_panel_emits_from_center test assertions for the panel_burst_emitter/BurstEmitter::Center(Point) API introduced in PR #182.
  • wrzonance/HonkHonk#146: Builds the feather-particle effects on the shared PanelRect/src/ui/side_panel types that this PR extends with FeatherClass physics.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR smooths motion, but the summary shows no work on frame_subscription_needed or the required close-without-emission regression coverage. Add the frame-subscription lifecycle fix and regression tests for closing without emission, and verify hidden/disabled panel states still skip feather work.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: smoother panel feather motion.
Out of Scope Changes check ✅ Passed The changes stay focused on the panel feather motion feature, related tests, and supporting docs with no obvious unrelated functionality.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-183-smooth-feather-pipeline

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.

@thewrz thewrz marked this pull request as ready for review June 27, 2026 14:42
@thewrz

thewrz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thewrz

thewrz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@thewrz thewrz force-pushed the feat/panel-feather-edge-emitter branch from f1364e2 to 775f1c6 Compare June 27, 2026 16:55
Base automatically changed from feat/panel-feather-edge-emitter to main June 27, 2026 17:31
@thewrz thewrz force-pushed the feat/issue-183-smooth-feather-pipeline branch from 371ee2a to 7039ec9 Compare June 27, 2026 17:52
@thewrz

thewrz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/ui/side_panel/flourish.rs`:
- Around line 260-269: `class_params` is deriving `variant` from `i % 3`, but
because `feather_class()` already buckets by `i % 6`, that value is fixed for
each `FeatherClass` and never varies per particle. Update `class_params` so the
size/speed/wobble tuning is driven by the class itself (or another per-particle
source) instead of `i % 3`, and keep the logic aligned with `FeatherClass` and
`feather_class()`.
- Around line 321-322: The drag_factor helper currently applies a linear clamp,
which makes motion vary with frame cadence and can zero out velocity on long
frames. Update drag_factor in flourish::drag_factor to compute drag using
elapsed time in a frame-rate-independent way so the same total time yields the
same result regardless of how it is split across frames. Keep the fix localized
to the drag_factor function and any callers that rely on its returned
multiplier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d0ffd0c0-91cf-4466-a07f-13dff1cb7cf1

📥 Commits

Reviewing files that changed from the base of the PR and between af6578e and 7039ec9.

📒 Files selected for processing (7)
  • docs/superpowers/plans/2026-06-26-panel-feather-edge-emitter-snippets.md
  • docs/superpowers/plans/2026-06-27-panel-feather-motion.md
  • docs/superpowers/specs/2026-06-27-panel-feather-motion-design.md
  • src/ui/side_panel/flourish.rs
  • src/ui/side_panel/flourish_view.rs
  • src/ui/side_panel/mod.rs
  • tests/side_panel_flourish.rs

Comment thread src/ui/side_panel/flourish.rs Outdated
Comment thread src/ui/side_panel/flourish.rs Outdated
@thewrz

thewrz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

CodeRabbit finishing-touch item handled: the unit-test suggestion was addressed in 24046dd by adding regression coverage for same-class particle variation and long-frame drag behavior (same_class_particles_have_seed_variation and long_frame_hitch_does_not_snap_feather_drag_to_zero).

@thewrz thewrz merged commit 1278248 into main Jun 27, 2026
7 checks passed
@thewrz thewrz deleted the feat/issue-183-smooth-feather-pipeline branch June 27, 2026 19:29
thewrz added a commit that referenced this pull request Jul 6, 2026
* refactor(ui): address panel-feather flourish review follow-ups

Review follow-ups for the merged #182/#184 feather work:

- Remove the dead close-burst path. Feathers emit on panel *open* only; the
  Close transition just clears them. The `transition` parameter threaded through
  emit -> seed_particles -> seed_particle and the Close `rotation_bias` branch
  were unreachable from the app (only a test still seeded with Close). Drop them.
- panel_burst_emitter now falls back to Center on a zero-length edge (a panel
  collapsed to zero height/width) instead of seeding a degenerate edge line that
  stacks every particle on one point. Pinned with a test.
- De-brittle the motion tests: assert the dust-vs-feather ordering invariants
  instead of absolute pixel margins coupled to current tuning, and assert
  lateral spread across the feather set rather than hunting for two particles
  with byte-identical seeds (which panicked on any seeding refactor).
- Split the now over-budget side_panel_flourish.rs (>400) into emitter-geometry
  and motion suites sharing a flourish_support module.
- Small cleanup: compute wobble phase advance once per tick; reconcile the design
  spec's Non-Goals with the shipped open-only behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* style: apply cargo fmt to flourish tests

Fixes the CI lint (cargo fmt --check) failure on this branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: sync feather emitter spec with shipped emit API

The spec still showed the removed transition parameter on
PanelFlourish::emit, mentioned the dropped close-transition rotation
bias, and omitted the side_panel_flourish_emitter test binary.

Addresses CodeRabbit nitpick on PR #188.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(deny): ignore quick-xml RUSTSEC-2026-0194/0195 pending upstream bump

Both advisories are DoS-via-untrusted-XML in quick-xml < 0.41. The sole
consumer is wayland-scanner, a build-time proc-macro parsing vendored
Wayland protocol XML; no untrusted XML is parsed at runtime, so neither
issue is reachable in the shipped binary. wayland-scanner 0.31.10
(latest) still pins quick-xml ^0.39 — drop these ignores when it moves
to 0.41.

Closes #192.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

perf(ui): smooth panel feather animation frame pipeline

1 participant