Add session-scoped request history browser - #23
Open
Alistar84 wants to merge 3 commits into
Open
Conversation
Member
|
@Alistar84 At some point please rebase from master. I put a fix in for the warning emitted in the CI that makes this CI red. Thanks |
Alistar84
force-pushed
the
feature/request-history
branch
from
September 2, 2026 15:07
d26cba8 to
603fa1c
Compare
Author
|
Rebased onto the latest master. Thanks for the fix! |
Alistar84
marked this pull request as ready for review
September 3, 2026 06:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
In raising this pull request, I confirm the following:
Small description of change:
This PR adds an optional, session-scoped request history system to the debug bar.
It resolves #21, which describes the current limitation where the bar can only inspect the request that rendered the current page. This makes completed AJAX requests, redirects, and earlier requests difficult to inspect once they have finished.
Closes #21.
When enabled, the new history system records the collected debug-bar payload together with request metadata such as:
A new
Historyitem in the bottom bar opens the list of stored requests. Selecting a request replaces the currently displayed collector data without navigating away from or reloading the host page. The history browser also provides refresh and clear controls.Storage and retention
History storage is disabled by default and must be enabled explicitly through configuration.
Stored requests are:
The storage path defaults to the system temporary directory and can be configured outside the application document root.
Internal endpoint
When history is enabled, the provider automatically registers an internal controller for:
GET /_debugbar/open- list stored request metadataGET /_debugbar/open?id=<request-id>- load a stored debug-bar payloadDELETE /_debugbar/open- clear the current session's historyThe endpoint reuses the debug bar access gate, returns private non-cacheable responses, validates request IDs, and excludes its own requests from the history.
Backward compatibility
The feature is opt-in. Existing applications retain the current behavior when
history.enabledis not enabled.Tests
The PR includes tests covering:
Thanks