Skip to content

Conversation

@DemonHa
Copy link
Contributor

@DemonHa DemonHa commented Nov 4, 2025

  • Integrate document mutators on the operation page
  • Move to the new event bus event system (side-by-side vue events)

Checklist

I've gone through the following:

  • I've added an explanation why this change is needed.
  • I've added a changeset (pnpm changeset).
  • I've added tests for the regression or new feature.
  • I've updated the documentation.

Note

Moves operation and auth UIs to workspace event-bus with new workspace-store mutators and schema extensions, adds OperationContainer and routing, and updates tests and helpers.

  • API Client:
    • Operation UI: Add OperationContainer and route; Header/AddressBar emit update:method/update:path and import:curl; OperationBlock emits event-bus actions for summary, parameters, and request body; ResponseBlock uses event bus for command palette and send.
    • Auth UI: AuthSelector/RequestAuthDataTable switch to event-bus (auth:update:*, delete) with meta; preserve selected scopes.
    • App/Sidebar: Wire route params (path, method, exampleName); sidebar item select expands.
  • Workspace Store:
    • Mutators: Add auth mutators (update/delete schemes, selected scopes, active tab) and operation mutators (summary, method/path drafts, params CRUD, request-body content-type/values/form-rows).
    • Schemas: Add x-scalar-selected-security, x-scalar-selected-content-type, and operation identifiers (x-scalar-path, x-scalar-method).
    • Helpers/Build: Add generateUniqueValue; harden proxy unpacking; export mutators and include in build.
  • Tests: Update/add extensive tests for new events, mutators, and components.

Written by Cursor Bugbot for commit 27b1ad5. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

🦋 Changeset detected

Latest commit: 27b1ad5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@scalar/workspace-store Minor
@scalar/api-client Minor
@scalar/nuxt Patch
@scalar/api-reference Patch
@scalar/oas-utils Patch
@scalar/sidebar Patch
@scalar/api-client-react Patch
scalar-app Patch
@scalarapi/docker-api-reference Patch
@scalar/aspire Patch
@scalar/aspnetcore Patch
@scalar/fastify-api-reference Patch
@scalar/webjar Patch
@scalar/api-reference-react Patch
@scalar/components Patch
@scalar/mock-server Patch
@scalar/openapi-to-markdown Patch
@scalar/postman-to-openapi Patch
@scalar/pre-post-request-scripts Patch
@scalar/use-codemirror Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@scalar-docs
Copy link

scalar-docs bot commented Nov 4, 2025

Scalar Docs Preview

Project
guides.scalar.com

Commit
557851c

Status
✅ Ready

Preview
Open Preview


Updated (UTC): Nov 4, 2025, 7:47 PM

To edit notification comments on pull requests, go to your Scalar project settings

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Cloudflare Preview for the API Client

https://4b2df377.client-staging-7m0.pages.dev

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Scalar Components Snapshot Test Results

passed  152 passed

Details

report  Open report ↗︎
stats  152 tests across 19 suites
duration  45.1 seconds
commit  27b1ad5

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Scalar References End to End Test Results

passed  66 passed

Details

report  Open report ↗︎
stats  66 tests across 30 suites
duration  11.5 seconds
commit  27b1ad5

Important

These tests include snapshots that may need to be updated if there are intentional changes to the UI components. To update the snapshots run pnpm test:e2e:update in packages/api-reference and commit the changes.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Scalar CDN Snapshot Diff Results

failed  1 failed
passed  19 passed

Details

report  Open report ↗︎
stats  20 tests across 1 suite
duration  14 seconds
commit  27b1ad5
info  These tests are non-blocking and will not prevent merging of your PR.

Failed tests

test/snapshots-cdn/snapshot.e2e.ts › Diff with CDN - Stripe

Important

These tests detect visual differences between the current PR and the latest CDN build which means they may be affected by other changes in main that haven't been released yet.

They can help determine if the changes in the PR are causing any unexpected visual regressions but may be less helpful in isolating the exact cause. For more details see the readme.

@DemonHa DemonHa marked this pull request as ready for review November 4, 2025 22:11
Copy link
Member

@amritk amritk left a comment

Choose a reason for hiding this comment

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

Looks good, did not test, left a few comments but nothing blocking

Comment on lines +31 to +33
/** TODO: remove once we migrate */
environment: Environment
envVariables: EnvVariable[]
Copy link
Member

Choose a reason for hiding this comment

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

we are migrated, you can remove! use the new components from the v2 folder.

I just realized its on my branch LOL, once I merge you can get rid of the old env

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank god now we can remove those 😂

@@ -0,0 +1,187 @@
<script setup lang="ts">
Copy link
Member

Choose a reason for hiding this comment

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

what is an operation container? Can we get top level jsdoc here? Or we end up with something like OperationRoot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is basically a dumb Operation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't came up with a better name

Copy link
Member

Choose a reason for hiding this comment

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

haha just some docs explaining it is good

Copy link
Member

Choose a reason for hiding this comment

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

can call it OperationDumb 😆

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