Skip to content

chore(site): Add XState inspector #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2022
Merged

chore(site): Add XState inspector #872

merged 3 commits into from
Apr 4, 2022

Conversation

presleyp
Copy link
Contributor

@presleyp presleyp commented Apr 4, 2022

New PR!

In order to inspect your XState services, simply run the ./develop.sh script or otherwise set the INSPECT_XSTATE environment variable to "true" while in dev mode.

Documentation here: https://www.notion.so/coderhq/Inspect-an-XState-machine-4de27670d836422db23f5d252241aed2

@presleyp presleyp requested a review from a team as a code owner April 4, 2022 23:23
@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #872 (9dc7f2a) into main (f02b8fd) will increase coverage by 0.11%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##             main     #872      +/-   ##
==========================================
+ Coverage   65.93%   66.04%   +0.11%     
==========================================
  Files         204      204              
  Lines       13252    13257       +5     
  Branches       86       87       +1     
==========================================
+ Hits         8738     8756      +18     
+ Misses       3622     3614       -8     
+ Partials      892      887       -5     
Flag Coverage Δ
unittest-go- 65.43% <ø> (+0.06%) ⬆️
unittest-go-macos-latest 52.69% <ø> (+0.15%) ⬆️
unittest-go-ubuntu-latest 55.19% <ø> (-0.01%) ⬇️
unittest-go-windows-2022 51.86% <ø> (+0.02%) ⬆️
unittest-js 62.36% <16.66%> (-0.35%) ⬇️
Impacted Files Coverage Δ
site/src/Main.tsx 0.00% <0.00%> (ø)
site/src/xServices/StateContext.tsx 100.00% <100.00%> (ø)
cli/cliui/provisionerjob.go 76.42% <0.00%> (-2.15%) ⬇️
coderd/workspaceresources.go 60.56% <0.00%> (-0.41%) ⬇️
coderd/provisionerdaemons.go 62.05% <0.00%> (+0.50%) ⬆️
peer/conn.go 79.18% <0.00%> (+1.01%) ⬆️
provisionerd/provisionerd.go 80.76% <0.00%> (+1.17%) ⬆️
provisioner/echo/serve.go 56.80% <0.00%> (+2.39%) ⬆️
codersdk/provisionerdaemons.go 64.61% <0.00%> (+6.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f02b8fd...9dc7f2a. Read the comment docs.

// configure all XServices to use the inspector
Interpreter.defaultOptions.devTools = true
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up, this will eventually move to another function or file (parity with v1), but we don't have enough "stuff" to justify moving it just yet. Looks great!

V1 looks like:

initSync()
main()

Where initSync contains all the configuration like this that happen before we mount.

Copy link
Contributor

@greyscaled greyscaled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎊

@presleyp presleyp merged commit d4e26ff into main Apr 4, 2022
@presleyp presleyp deleted the presleyp/inspector2 branch April 4, 2022 23:54
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
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.

3 participants