Skip to content

[codex] spread panel feathers across full edge#182

Merged
thewrz merged 7 commits into
mainfrom
feat/panel-feather-edge-emitter
Jun 27, 2026
Merged

[codex] spread panel feathers across full edge#182
thewrz merged 7 commits into
mainfrom
feat/panel-feather-edge-emitter

Conversation

@thewrz

@thewrz thewrz commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the side-panel feather burst origin with an explicit BurstEmitter model for full-edge docked panel emitters and center fallback.
  • Seeds edge feathers with deterministic stratified jitter so the flourish spreads along the entire panel edge.
  • Adds regression coverage for docked edge geometry, full-edge spread, and existing fade/cursor behavior.

Validation

  • cargo fmt --check
  • cargo test --test side_panel_flourish
  • cargo test app::panels::tests
  • cargo clippy --all-targets -- -D warnings
  • cargo test

Notes

  • Feather rendering is unchanged in this iteration: no new small/medium/large variants or pixel-art sprite changes.
  • PR created as draft per repo workflow.

Summary by CodeRabbit

  • New Features

    • Side panel feather effects now spread across the full docked edge when panels are attached to a window edge, while floating panels still burst from the center.
    • Particle placement is more even and deterministic, improving the look of edge-based feather bursts.
  • Bug Fixes

    • Closing a panel now stops any ongoing flourish immediately, preventing lingering animations and extra emission during close transitions.
    • Updated behavior preserves existing motion, fade, and cursor interaction while improving edge coverage.

@coderabbitai

coderabbitai Bot commented Jun 26, 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 43 minutes and 30 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: 7071ae55-2cad-4f3c-87d0-d52033a52a41

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf7dd8 and 775f1c6.

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

Walkthrough

Replaces the BurstSource/BurstOrigin panel feather emission model with BurstEmitter/BurstLine, which carries full inner-edge geometry for docked panels. panel_burst_emitter selects an edge line by boundary proximity or falls back to center. PanelTransition::Close now immediately clears panel_flourish. Supporting design spec, implementation plan, snippet doc, and tests are added.

Changes

Panel Feather Edge Emitter

Layer / File(s) Summary
BurstEmitter/BurstLine types and re-exports
src/ui/side_panel/flourish.rs, src/ui/side_panel/mod.rs
BurstEmitter (Edge/Center) and BurstLine (start, end, direction) replace BurstSource/BurstOrigin; re-exports updated.
panel_burst_emitter and particle seeding
src/ui/side_panel/flourish.rs
panel_burst_emitter selects edge lines by window-boundary proximity; edge_line, particle_direction, emitter_point, point_on_line, edge_t, and deterministic_jitter implement stratified per-particle sampling.
Close-transition early-exit
src/app/panels.rs
emit_effects_panel_flourish clears panel_flourish and returns on PanelTransition::Close; tests updated to assert animation state and frame subscription after close.
Updated flourish tests
tests/side_panel_flourish.rs
Imports switched to emitter types; assert_line helper and PanelRect constructors added; edge geometry, direction, span coverage, and cursor bump tests updated.
Design spec, plan, and snippets
docs/superpowers/specs/..., docs/superpowers/plans/...
New design spec defines BurstEmitter API and geometry rules; implementation plan lists task sequence and checklist; snippet file provides Rust examples for tests and emitter logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: spreading panel feathers across the full edge.
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 feat/panel-feather-edge-emitter

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 16:38

@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/plans/2026-06-26-panel-feather-edge-emitter-snippets.md (1)

107-120: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use floating_panel() helper for consistency.

The floating_panel_emits_from_center test inlines its PanelRect while the other tests use helper functions. The actual tests/side_panel_flourish.rs already defines and uses a floating_panel() helper (see tests/side_panel_flourish.rs:56-65). Update the snippet to match for consistency and to avoid drift if the helper values change.

🤖 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/plans/2026-06-26-panel-feather-edge-emitter-snippets.md`
around lines 107 - 120, The floating_panel_emits_from_center test is inlining
PanelRect instead of using the existing floating_panel() helper, which makes it
inconsistent with the other panel tests and easier to drift. Update the test
snippet in panel_burst_emitter to construct the panel via floating_panel() and
keep the assertion on BurstEmitter::Center using the helper’s center value so it
stays aligned with tests/side_panel_flourish.rs.
🤖 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/plans/2026-06-26-panel-feather-edge-emitter-snippets.md`:
- Around line 107-120: The floating_panel_emits_from_center test is inlining
PanelRect instead of using the existing floating_panel() helper, which makes it
inconsistent with the other panel tests and easier to drift. Update the test
snippet in panel_burst_emitter to construct the panel via floating_panel() and
keep the assertion on BurstEmitter::Center using the helper’s center value so it
stays aligned with tests/side_panel_flourish.rs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d88058e5-0393-46b9-92ff-52d3f2bf121e

📥 Commits

Reviewing files that changed from the base of the PR and between 6525890 and 6bf7dd8.

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

@thewrz

thewrz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

CodeRabbit body nitpick addressed: the floating_panel_emits_from_center snippet now uses floating_panel() and asserts against panel.center, matching the real tests/side_panel_flourish.rs helper pattern.

Fixed in commit ce18533.

The branch was then rebased onto current main; integration Clippy fallout from the new lint baseline was fixed in 775f1c6.

Local verification:

  • cargo test --test side_panel_flourish
  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings

@thewrz thewrz force-pushed the feat/panel-feather-edge-emitter branch from f1364e2 to 775f1c6 Compare June 27, 2026 16:55
@thewrz thewrz merged commit af6578e into main Jun 27, 2026
10 checks passed
@thewrz thewrz deleted the feat/panel-feather-edge-emitter branch June 27, 2026 17:31
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.

1 participant