Skip to content

feat(ui): improve Request disclosures, body limits, history navigation, and table spacing. - #29

Merged
terabytesoftw merged 1 commit into
mainfrom
feat/improve-panel-request
Sep 1, 2026
Merged

feat(ui): improve Request disclosures, body limits, history navigation, and table spacing.#29
terabytesoftw merged 1 commit into
mainfrom
feat/improve-panel-request

Conversation

@terabytesoftw

Copy link
Copy Markdown
Contributor

Pull Request

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bugfix (non-breaking change that fixes an issue)
  • CI/build configuration
  • Documentation update
  • New feature (non-breaking change that adds functionality)
  • Refactoring (no functional changes)

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: bc9df905-3159-4a53-a2b2-29a715218297

📥 Commits

Reviewing files that changed from the base of the PR and between 7a3c33e and 9b81af9.

⛔ Files ignored due to path filters (2)
  • resources/assets/dist/css/debug.min.css is excluded by !**/dist/**, !**/*.min.css
  • resources/assets/dist/js/debug.min.js is excluded by !**/dist/**, !**/*.min.js
📒 Files selected for processing (8)
  • CHANGELOG.md
  • resources/src/core/history-cursor.js
  • resources/src/styles/main.css
  • resources/tests/history-cursor.test.js
  • src/Capture/CapturePolicy.php
  • src/Panel/Request/RequestSectionRenderer.php
  • tests/Capture/CapturePolicyTest.php
  • tests/Panel/Request/RequestSectionRendererTest.php

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: Verify Vite build reproduces dist.
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: Verify Vite build reproduces dist.
🧰 Additional context used
🪛 PHPMD (2.15.0)
tests/Panel/Request/RequestSectionRendererTest.php

[warning] 17-391: The class RequestSectionRendererTest has 14 public methods. Consider refactoring RequestSectionRendererTest to keep number of public methods under 10. (undefined)

(TooManyPublicMethods)


[error] 220-220: Avoid using static access to class '\PHPForge\Debug\Panel\Request\RequestSectionRenderer' in method 'testRenderSectionUsesCollapsedDisclosureWhenSectionIsEmpty'. (undefined)

(StaticAccess)

src/Panel/Request/RequestSectionRenderer.php

[error] 23-204: The class RequestSectionRenderer has a coupling between objects value of 19. Consider to reduce the number of dependencies under 13. (undefined)

(CouplingBetweenObjects)


[error] 93-93: Avoid using static access to class '\PHPForge\Debug\Helper\Disclosure' in method 'renderSection'. (undefined)

(StaticAccess)

tests/Capture/CapturePolicyTest.php

[warning] 17-330: The class CapturePolicyTest has 19 public methods. Consider refactoring CapturePolicyTest to keep number of public methods under 10. (undefined)

(TooManyPublicMethods)

🔇 Additional comments (8)
src/Capture/CapturePolicy.php (1)

83-90: LGTM!

tests/Capture/CapturePolicyTest.php (1)

27-27: LGTM!

Also applies to: 50-58

CHANGELOG.md (1)

35-35: LGTM!

src/Panel/Request/RequestSectionRenderer.php (1)

7-7: LGTM!

Also applies to: 82-96

tests/Panel/Request/RequestSectionRendererTest.php (1)

204-225: LGTM!

resources/src/styles/main.css (1)

205-206: LGTM!

resources/src/core/history-cursor.js (1)

95-121: LGTM!

Also applies to: 164-165

resources/tests/history-cursor.test.js (1)

153-169: LGTM!

Also applies to: 224-235, 282-289, 335-335, 353-357


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Request panel links now stay synchronized with the selected history entry.
    • Empty request sections are presented as collapsed disclosures with a “click to expand” hint.
    • The configured maximum request body size is now available for display and monitoring.
  • Bug Fixes

    • Improved spacing between tables and disclosures in tabbed panels.
    • Request navigation remains accurate when moving through history, including incomplete entries.
  • Documentation

    • Added changelog details covering these interface and request-viewing improvements.

Walkthrough

The PR updates Request section rendering, adds access to the configured capture body limit, synchronizes Request navigation links with history-cursor selection, adjusts tab-panel spacing, and records these UI changes in the changelog.

Changes

Request UI and navigation

Layer / File(s) Summary
Capture body-limit accessor
src/Capture/CapturePolicy.php, tests/Capture/CapturePolicyTest.php
CapturePolicy::maxBodyBytes() returns the configured maximum body size. The unit test verifies the returned value.
Empty Request section disclosures
src/Panel/Request/RequestSectionRenderer.php, resources/src/styles/main.css, tests/Panel/Request/RequestSectionRendererTest.php
Empty sections render as collapsed disclosures. Tab-panel disclosures receive the standard top spacing. Tests verify the new empty-state markup.
History-aware Request links
resources/src/core/history-cursor.js, resources/tests/history-cursor.test.js, CHANGELOG.md
Request and legacy automatic-panel links update their tag query parameter when the history cursor changes. Tests cover valid and malformed rows. The changelog records the related UI updates.

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

Merge Risk: ⚪ Minimal · up to 9b81a

The PR adds request disclosure improvements, exposes the configured body limit, synchronizes history navigation, and adjusts table spacing without changing enforcement or navigation safety. No actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 6 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main UI, body limit, history navigation, and table spacing changes.
Description check ✅ Passed The description identifies the pull request as a non-breaking new feature, which matches the stated objectives and changeset.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 6 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/improve-panel-request

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.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7a3c33e) to head (9b81af9).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #29   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity      1744      1745    +1     
===========================================
  Files            141       141           
  Lines           7065      7065           
===========================================
  Hits            7065      7065           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@terabytesoftw
terabytesoftw merged commit bd0d546 into main Sep 1, 2026
43 checks passed
@terabytesoftw
terabytesoftw deleted the feat/improve-panel-request branch September 1, 2026 10:05
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