Fix datagrid pagination, document rsx:debug --eval, update jqhtml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-12 03:00:48 +00:00
parent 958da28f64
commit c4ba2b743f
138 changed files with 212 additions and 150 deletions

View File

@@ -168,15 +168,37 @@ LAYOUT DEBUGGING
JAVASCRIPT EVALUATION
--eval=<code>
Execute JavaScript code in the page context and display the result.
Useful for testing RSX JavaScript APIs or inspecting global state.
Execute JavaScript code in the page context AFTER the page has fully
loaded but BEFORE the DOM is captured for output. The code runs with
full access to jQuery, component APIs, and all page state.
Examples:
This is powerful for simulating user interactions and testing async
behavior. Use `await` for async operations and `await sleep(ms)` to
wait for side effects to complete before the DOM snapshot.
Simple examples:
--eval="Rsx.Route('Demo_Controller').url()"
--eval="JSON.stringify(Rsx._routes)"
--eval="typeof jQuery"
--eval="document.title"
Simulating user interactions:
# Click a pagination button and wait for results
--eval="$('.page-link[data-page=\"2\"]').click(); await sleep(2000)"
# Fill and submit a form
--eval="$('#search').val('test'); $('form').submit(); await sleep(1000)"
# Open a dropdown and click an option
--eval="$('.dropdown-toggle').click(); await sleep(100); $('.dropdown-item:first').click(); await sleep(500)"
# Toggle a checkbox and verify state change
--eval="$('#enable_feature').click(); await sleep(100); console.log('Checked:', $('#enable_feature').prop('checked'))"
The DOM output will reflect the state AFTER your eval code completes,
making this ideal for testing that UI updates correctly in response
to user actions.
AUTHENTICATION & BACKDOOR
The --user and --user-id options use backdoor authentication that only works
@@ -253,6 +275,14 @@ Debug layout issues by inspecting element dimensions:
php artisan rsx:debug /page --dump-dimensions=".card,.sidebar" --dump-element=".main"
# Shows .main HTML with data-dimensions on matching elements
Test pagination or other interactive behavior:
php artisan rsx:debug /contacts --user=1 --eval="$('.page-link[data-page=\"2\"]').click(); await sleep(2000)" --console
# Clicks page 2, waits for Ajax, dumps DOM showing page 2 results
Test form validation feedback:
php artisan rsx:debug /users/add --user=1 --eval="$('form').submit(); await sleep(500)" --dump-element=".invalid-feedback"
# Submits empty form, shows validation errors
IMPORTANT NOTES
• When using rsx:debug with grep and no output appears, re-run without grep