Skip to content
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

ref: Overhaul console integration #525

Merged
merged 2 commits into from
Sep 13, 2024
Merged

ref: Overhaul console integration #525

merged 2 commits into from
Sep 13, 2024

Conversation

BYK
Copy link
Member

@BYK BYK commented Sep 13, 2024

Our console integration was designed to work on the same page with the Spotlight UI. It was using a naive filtering method to avoid infinite loops from Spotlight debug mode logger itself. Moreover, it was not taking the sidecarURL option, was defaulting to localhost:8969 as the sidecar URL. This patch overhauls the two, leveraging the fact that they are on the same page. This means switching to the local event-based message passing between the UI and the console integration, removing the need for fetch calls and passing around the sidecarURL option. It also overhauls the Spotlight logger to always try to use an unmodified console implementation, removing the need for hacky filtering on the console integration side.

ref #521.

Our console integration was designed to work on the same page with the Spotlight UI. It was using a naive filtering method to avoid infinite loops from Spotlight debug mode logger itself. Moreover, it was not taking the `sidecarURL` option, was defaulting to `localhost:8969` as the sidecar URL. This patch overhauls the two, leveraging the fact that they are on the same page. This means switching to the local event-based message passing between the UI and the console integration, removing the need for `fetch` calls and passing around the sidecarURL option. It also overhauls the Spotlight logger to always try to use an unmodified console implementation, removing the need for hacky filtering on the console integration side.
@BYK BYK requested a review from Lms24 September 13, 2024 11:40
Copy link

vercel bot commented Sep 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 11:51am

@BYK BYK enabled auto-merge (squash) September 13, 2024 11:49
@BYK BYK merged commit 149e95b into main Sep 13, 2024
13 checks passed
@BYK BYK deleted the byk/fix/console-integration branch September 13, 2024 11:53
BYK pushed a commit that referenced this pull request Sep 30, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/[email protected]

### Patch Changes

-   Fix race condition on event processing - prevent doubling of events
    ([#528](#528))

-   Updated dependencies

\[[`f22222717dcf2482892e1cc83c233c83ba03211d`](f222227)]:
    -   @spotlightjs/[email protected]

## @spotlightjs/[email protected]

### Patch Changes

-   Fix race condition on event processing - prevent doubling of events
    ([#528](#528))

-   Updated dependencies

\[[`149e95bd02af41618bc74b365c71ddf99358672f`](149e95b),

[`f22222717dcf2482892e1cc83c233c83ba03211d`](f222227)]:
    -   @spotlightjs/[email protected]

## @spotlightjs/[email protected]

### Patch Changes

-   Overhaul console integration for more performance and stability
    ([#525](#525))

-   Fix race condition on event processing - prevent doubling of events
    ([#528](#528))

## @spotlightjs/[email protected]

### Patch Changes

-   Fix race condition on event processing - prevent doubling of events
    ([#528](#528))

-   Updated dependencies

\[[`149e95bd02af41618bc74b365c71ddf99358672f`](149e95b),

[`f22222717dcf2482892e1cc83c233c83ba03211d`](f222227)]:
    -   @spotlightjs/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

2 participants