fix(local): print one timestamp per event line and identify as a Spot… - #1341
Merged
MathurAditya724 merged 1 commit intoAug 2, 2026
Merged
Conversation
…light sidecar Event tails rendered their own event timestamp and then went through logger.log(), so consola's reporter appended a second wall-clock time to every line (right-aligned on wide terminals, a [HH:MM:SS] prefix on narrow ones). Print those pre-formatted lines straight to stderr via printLine() so only the event time survives. The local server also never advertised X-Powered-By: spotlight-by-sentry, which is what Spotlight's isSidecarRunning() probes for. Without it the desktop app treated the CLI server as 'no sidecar connected', tried to start its own on 8969, and hit EADDRINUSE. Set the header on every response and echo the ;base64 event-type suffix that Spotlight UI clients request via ?base64 on /stream. Co-authored-by: Aditya Mathur <MathurAditya724@users.noreply.github.com>
MathurAditya724
enabled auto-merge (squash)
August 2, 2026 22:09
Contributor
|
MathurAditya724
deleted the
cursor/fix-local-timestamps-and-sidecar-27d6
branch
August 2, 2026 22:17
MathurAditya724
added a commit
that referenced
this pull request
Aug 3, 2026
…1342) `local run` only printed events when it started the background server itself. When something else was already listening — most often the Spotlight desktop app's own sidecar — it injected SENTRY_SPOTLIGHT, spawned the child, and then stayed silent for the whole session: no logs, no traces, even though envelopes were flowing to that server. Attach as an SSE consumer in that case, which is what `local serve` already does, so the terminal tail works regardless of who owns the port. The subscription is torn down when the child exits. This became much more visible after #1341: now that the CLI server advertises itself as a Spotlight sidecar, the desktop app keeps its own sidecar on 8969 instead of losing the race, so `run` hits the attach path far more often. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Aditya Mathur <MathurAditya724@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…light sidecar
Event tails rendered their own event timestamp and then went through logger.log(), so consola's reporter appended a second wall-clock time to every line (right-aligned on wide terminals, a [HH:MM:SS] prefix on narrow ones). Print those pre-formatted lines straight to stderr via printLine() so only the event time survives.
The local server also never advertised X-Powered-By: spotlight-by-sentry, which is what Spotlight's isSidecarRunning() probes for. Without it the desktop app treated the CLI server as 'no sidecar connected', tried to start its own on 8969, and hit EADDRINUSE. Set the header on every response and echo the ;base64 event-type suffix that Spotlight UI clients request via ?base64 on /stream.