Skip to content

Demo/gg integration demo#1470

Draft
Leftium wants to merge 6 commits intoEpicenterHQ:mainfrom
Leftium:demo/gg-integration-demo
Draft

Demo/gg integration demo#1470
Leftium wants to merge 6 commits intoEpicenterHQ:mainfrom
Leftium:demo/gg-integration-demo

Conversation

@Leftium
Copy link
Copy Markdown
Member

@Leftium Leftium commented Mar 10, 2026

This is a demo branch — not intended for merging. It exists to demo how @leftium/gg can integrate into an existing app with minimal effort, and to set up a live debug session for issue #1282.

This branch incrementally adds @leftium/gg to Whispering across 4 commits, replacing console.* calls with gg() to demonstrate the integration path and unlock agent-accessible runtime logs.

What each commit does

ad72939  chore: install @leftium/gg
   ↓
7468f31  feat: replace 15 console.* → gg() in notify.ts + actions.ts
   ↓
ba04382  feat: add ggCallSitesPlugin — one config line, zero code changes
         (upgrades random namespaces like "jazzy-perch" → real file@function paths)
   ↓
14495bc  feat: add <GgConsole />, enable all vite plugins, ungate prod logging
         (Eruda in-browser console, click-to-open-in-editor, fileSink for agent access)

What this enables

  • In-browser console — 5-tap gesture opens Eruda with a dedicated GG panel showing all gg() output with source locations, level filtering, and click-to-open-in-editor
  • Agent log accesscurl http://localhost:1420/__gg/logs returns NDJSON for programmatic querying (filter by level, file, message content via jq)
  • Production logginggg() calls are always-on (no-op when not activated), so logs are available in Tauri builds without a dev server
  • Zero-effort source mappingggCallSitesPlugin rewrites call sites at build time, so every log entry includes its real file path and function name

Integration effort

The actual integration is 3 touches:

  1. bun add @leftium/gg
  2. ...ggPlugins() spread in vite.config.ts
  3. <GgConsole /> in root layout

After that, replacing console.*gg() is mechanical 1:1 substitution. No refactoring, no new abstractions.

Next: live debug demo for #1282

The next step (not committed) is a live agent-driven debug session targeting issue #1282 (moonshine tiny model returns empty transcription). The agent will add gg() calls to the transcription pipeline, query logs via the fileSink endpoint, and iterate — demonstrating the agent-accessible logging workflow.' | pbcopy

Leftium added 4 commits March 10, 2026 18:38
gg() is designed to be always-on — it's a no-op when not activated,
so there's no cost to leaving calls in production. Removing the
if (dev) gate allows logs to appear when gg is enabled in Tauri
builds (where there's no URL bar to append ?gg).
@Leftium Leftium marked this pull request as draft March 10, 2026 10:52
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.

1 participant