Skip to content

fix: build action from source so /glimpse uses PR branch code#22

Merged
DeDuckProject merged 2 commits intomainfrom
fix/glimpse-uses-pr-branch-code
Mar 13, 2026
Merged

fix: build action from source so /glimpse uses PR branch code#22
DeDuckProject merged 2 commits intomainfrom
fix/glimpse-uses-pr-branch-code

Conversation

@DeDuckProject
Copy link
Copy Markdown
Owner

Problem

When /glimpse is triggered via issue_comment, GitHub always runs the workflow from the default branch (main). Our workaround was to overlay packages/action/ from main after checking out the PR head — which meant every action/core code change required merging to main before it could be tested.

This caused significant wasted debugging time: the cursor overlay actually worked much earlier, but we couldn't see it because our code changes were being silently ignored.

Fix

Replace the overlay step with pnpm build, which rebuilds the action dist from whatever is currently checked out:

  • issue_comment (/glimpse): checks out PR head → builds from it → action uses PR branch's code ✅
  • pull_request: checks out merge commit → builds from it → also fixes stale dist edge cases ✅

External users are unaffected — they use uses: DeDuckProject/git-glimpse@v1 (published action), not this workflow.

Note: The workflow YAML itself is still read from main for issue_comment events (GitHub limitation). Changes to demo.yml still require merging. But action/core/config code changes now work immediately from branches.

Also removed

  • GG_DEBUG_TRACE trace infrastructure (tracePath interfaces, context.tracing.start/stop, upload-artifact step) — was debug scaffolding for the cursor investigation, no longer needed.
  • debug-cursor.mjs — local debug script, was untracked.

🤖 Generated with Claude Code

DeDuckProject and others added 2 commits March 13, 2026 17:02
Previously, issue_comment (/glimpse) events would overlay packages/action/
from main after checking out the PR head. This meant every action/core code
change required merging to main before it could be tested — causing wasted
debugging cycles (the cursor overlay actually worked much earlier than we
thought).

Replace the overlay with a `pnpm build` step that always rebuilds the
action dist from the checked-out source. This works for both event types:
- pull_request: rebuilds from PR source (fixes stale dist edge cases)
- issue_comment: rebuilds from PR head, so /glimpse tests the branch's code

Also remove the GG_DEBUG_TRACE debug infrastructure (trace start/stop,
tracePath interfaces, upload-artifact step) added during the cursor
debugging session — no longer needed now that the root cause is identified.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeDuckProject DeDuckProject merged commit fc5c8d0 into main Mar 13, 2026
3 checks passed
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