luckyframework / luckyframework/lucky_flow

Add a fancy debug page

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Crystal
Stars
55
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Rough idea:

* Save html page for each spec to `tmp/lucky_flow/debug_pages/`. Example: `tmp/lucky_flow/debug_pages/signs-a-user-in-spec.html`
* Show what interactions happened (Ran `click "@heading"`, Ran `fill UserForm`, etc.) on a pane to the left
* Clicking what happened in the left plane (`click "@heading"`) shows screenshot of the page on the right
* Would *love* to also include styles and images, but since the server stops after spec ends it could be really hard
* Maybe copy assets and rewrite the asset URLs the page? Probably too much for v1
* Also allow frameworks to extend the page and show other debug info
* What page was rendered
* What action rendered it
* What assigns were passed to it
* forms - so you can see forms
* context
* headers, etc.
* session
* Allow customizing objects `TheObjext#lucky_flow_inspect`
* So for forms you might show how if there are errors in an easily digestible way
* Or queries might show the SQL that it had and the results

## Examples of left pane

* Click `“@heading”` with text `“adds”`
* Fill `UserForm`
* Should have `“@heading”` with text `“adds”`

## Example of right pane

### Click `"@heading"` with text `"adds"`

### Details

* On page `Users::IndexPage`
* Data:
* Users: which would print the SQL that was run, number of results, etc.
* Rendered by `Users::Index`
* Params
* Headers

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files, tests, or entry points are named. Start by tracing how specs and browser interactions are recorded, then define the first version around writing HTML under tmp/lucky_flow/debug_pages/ with an interaction pane and corresponding page screenshots; asset copying and framework extensions are explicitly broader follow-up ideas.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.