Skip to content

refactor(ui): panel-feather flourish review follow-ups#188

Merged
thewrz merged 5 commits into
mainfrom
fix/panel-feather-review-followups
Jul 6, 2026
Merged

refactor(ui): panel-feather flourish review follow-ups#188
thewrz merged 5 commits into
mainfrom
fix/panel-feather-review-followups

Conversation

@thewrz

@thewrz thewrz commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Why

Follow-ups from a local review of the recently-merged, CodeRabbit-unreviewed feather work (#182 "spread feathers across full edge", #184 "smooth feather motion"). These address the dead code, a degenerate-input bug, and test brittleness that review surfaced.

What

  • Remove the dead close-burst path. Feathers emit on panel open only; closing 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).
  • Degenerate-edge fix. panel_burst_emitter now falls back to Center on a zero-length edge (a panel collapsed to zero height/width) instead of seeding a zero-length edge line that stacks every particle on one point.
  • De-brittle the motion tests. Assert the dust-vs-feather ordering invariants instead of absolute pixel margins; assert lateral spread across the feather set instead of hunting for two particles with byte-identical seeds (which panic!d on any seeding refactor).
  • Split the over-budget side_panel_flourish.rs (>400 lines) into emitter-geometry and motion suites sharing a flourish_support module.
  • Minor: compute the wobble phase advance once per tick; reconcile the design spec's Non-Goals with the shipped open-only behavior.

Testing

  • Unit tests pass (cargo test)
  • Clippy clean (cargo clippy --all-targets --all-features -- -D warnings)
  • All files within the 400-line cap
  • CI green

🤖 Co-authored by Claude Opus 4.8. Follow-up to #182 / #184.

Summary by CodeRabbit

  • New Features

    • Side panel feather effects now appear when the panel opens, with edge-based spawning along the full docked side.
  • Bug Fixes

    • Closing the side panel no longer triggers a closing burst; existing feathers are cleared instead.
    • Zero-sized/collapsed panel states now fall back to safer centered emission.
    • Feather motion/spread were refined for more natural movement and divergence.
  • Tests

    • Added/expanded integration coverage to validate emitter geometry and particle behavior.
  • Documentation

    • Updated the panel-feather design spec to match the shipped lifecycle behavior.

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>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e7cb2601-58fb-45ce-b850-7af643909b48

📥 Commits

Reviewing files that changed from the base of the PR and between c6ea92d and 54c79d4.

📒 Files selected for processing (1)
  • src/app/panels.rs
📝 Walkthrough

Walkthrough

The PanelTransition parameter is removed from PanelFlourish::emit, and edge emission now requires non-degenerate panel spans. Shared test fixtures were added, existing flourish tests were updated for the new signature and invariants, a new emitter geometry test suite was introduced, and the design spec was aligned with the shipped behavior.

Changes

Feather Flourish Transition Removal

Layer / File(s) Summary
Emit signature change and edge emitter span gating
src/ui/side_panel/flourish.rs, src/app/panels.rs
PanelFlourish::emit drops the PanelTransition parameter; panel_burst_emitter gates edge emission on non-degenerate vertical/horizontal spans; seed_particles/seed_particle remove transition-based rotation bias; tick_particle wobble math refactored; caller updated.
Shared test fixtures and updated flourish tests
tests/flourish_support/mod.rs, tests/side_panel_flourish.rs
New shared fixtures/helpers module added; existing tests updated to the new emit signature, ordering-based assertions replace fixed-offset checks, and a new lateral-divergence test replaces the wobble-phase test.
New emitter geometry tests and docs update
tests/side_panel_flourish_emitter.rs, docs/superpowers/specs/2026-06-26-panel-feather-edge-emitter-design.md
New tests validate panel_burst_emitter geometry for docked/floating/collapsed panels; design doc's Non-Goals section clarifies feathers emit on panel open only, with closing simply clearing feathers.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Panels as panels.rs
  participant Flourish as PanelFlourish
  participant Emitter as panel_burst_emitter

  Panels->>Flourish: emit(panel, window_size, now)
  Flourish->>Emitter: compute BurstEmitter (check span validity)
  alt non-degenerate edge span
    Emitter-->>Flourish: edge BurstEmitter
  else degenerate/floating panel
    Emitter-->>Flourish: center BurstEmitter
  end
  Flourish->>Flourish: seed_particles(emitter)
  Flourish->>Flourish: seed_particle (rotation from scatter, no transition bias)
Loading

Possibly related PRs

  • wrzonance/HonkHonk#182: Both PRs modify the side-panel feather burst emission and seeding path in src/ui/side_panel/flourish.rs.
  • wrzonance/HonkHonk#184: Both PRs change particle seeding and wobble behavior in src/ui/side_panel/flourish.rs.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 clearly refers to the panel-feather flourish follow-up refactor covered by the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/panel-feather-review-followups

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

@thewrz thewrz marked this pull request as ready for review July 6, 2026 05:00

@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.

🧹 Nitpick comments (1)
docs/superpowers/specs/2026-06-26-panel-feather-edge-emitter-design.md (1)

83-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Design doc still stale on the emit signature and rotation bias outside the Non-Goals bullet.

Non-Goals was updated for the open-only behavior, but:

  • Data Flow (Lines 101-107) still shows PanelFlourish::emit(panel, window, transition, now); the shipped signature drops transition (see src/ui/side_panel/flourish.rs Lines 120-122).
  • Particle Seeding (Lines 92-95) still says velocity keeps "close-transition rotation bias," but seed_particle no longer applies any transition-based bias.
  • Testing (Lines 133-136) only lists cargo test --test side_panel_flourish; the new side_panel_flourish_emitter test binary isn't mentioned.
📝 Suggested doc touch-ups
-PanelFlourish::emit(panel, window, transition, now)
+PanelFlourish::emit(panel, window, now)
-jitter prevents the particles from looking mechanically spaced. Velocity keeps
-the current outward direction, scatter, speed variation, close-transition
-rotation bias, gravity, and cursor interaction.
+jitter prevents the particles from looking mechanically spaced. Velocity keeps
+the current outward direction, scatter, speed variation, gravity, and cursor
+interaction.
 cargo test --test side_panel_flourish
+cargo test --test side_panel_flourish_emitter
 cargo test app::panels::tests

Also applies to: 97-107, 131-136

🤖 Prompt for 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.

In `@docs/superpowers/specs/2026-06-26-panel-feather-edge-emitter-design.md`
around lines 83 - 95, Update the panel feather edge emitter spec to match the
shipped API and behavior: in the Data Flow section, change the
`PanelFlourish::emit` signature reference to the current
`PanelFlourish::emit(panel, window, now)` shape from `flourish.rs`; in Particle
Seeding, remove the mention of “close-transition rotation bias” since
`seed_particle` no longer uses transition-based bias; and in Testing, add the
`side_panel_flourish_emitter` test binary alongside `side_panel_flourish` so the
doc reflects both test targets.
🤖 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.

Nitpick comments:
In `@docs/superpowers/specs/2026-06-26-panel-feather-edge-emitter-design.md`:
- Around line 83-95: Update the panel feather edge emitter spec to match the
shipped API and behavior: in the Data Flow section, change the
`PanelFlourish::emit` signature reference to the current
`PanelFlourish::emit(panel, window, now)` shape from `flourish.rs`; in Particle
Seeding, remove the mention of “close-transition rotation bias” since
`seed_particle` no longer uses transition-based bias; and in Testing, add the
`side_panel_flourish_emitter` test binary alongside `side_panel_flourish` so the
doc reflects both test targets.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ad11dbed-c9fc-4c01-9130-82b556425a81

📥 Commits

Reviewing files that changed from the base of the PR and between fa80c57 and 656a891.

📒 Files selected for processing (6)
  • docs/superpowers/specs/2026-06-26-panel-feather-edge-emitter-design.md
  • src/app/panels.rs
  • src/ui/side_panel/flourish.rs
  • tests/flourish_support/mod.rs
  • tests/side_panel_flourish.rs
  • tests/side_panel_flourish_emitter.rs

thewrz and others added 2 commits July 5, 2026 23:16
Fixes the CI lint (cargo fmt --check) failure on this branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>
@thewrz

thewrz commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

CodeRabbit body nitpick addressed: the feather emitter design doc was stale on the shipped API. Fixed in c6ea92dPanelFlourish::emit(panel, window, now) signature (transition param removed), dropped the close-transition rotation bias mention, and added cargo test --test side_panel_flourish_emitter to the Testing section.

The CI lint failure was a pure cargo fmt diff in tests/side_panel_flourish.rs, fixed in c8932fb. Verified locally: fmt clean, clippy -D warnings clean, full test suite green.

thewrz and others added 2 commits July 5, 2026 23:36
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>
@thewrz thewrz merged commit ddc122a into main Jul 6, 2026
6 of 7 checks passed
@thewrz thewrz deleted the fix/panel-feather-review-followups branch July 6, 2026 15:01
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