Skip to content

feat(copilot): add staged sign-in timing diagnostics - #388

Merged
Angnuo (angnuoli) merged 1 commit into
microsofthackathons:mainfrom
angnuoli:codex/copilot-login-phase-timing
Nov 16, 2026
Merged

Angnuo (angnuoli) merged 1 commit into
microsofthackathons:mainfrom
angnuoli:codex/copilot-login-phase-timing

Conversation

@angnuoli

@angnuoli Angnuo (angnuoli) commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

GitHub Copilot sign-in can remain on "Starting GitHub sign-in" without showing which part of the device-code flow is slow. Record staged timings in the existing desktop diagnostics log so process startup, SDK/provider loading, the GitHub request, user authorization, and credential persistence can be distinguished.

Related Issue

None.

Changes

  • Add monotonic phase timings and per-login correlation for the standalone authentication worker and main process, including code delivery, cancellation, timeout, and exit.
  • Observe the GitHub device-code HTTP request through Undici diagnostics without replacing fetch or reading request/response bodies. Keep authorization/model checks separate from credential saving and auth refresh.
  • Persist only fixed phase/status labels and numeric metrics; ignore malformed telemetry and logging failures, and never include authorization codes, tokens, headers, or profiles in timing records.
  • Document the timing fields and overlapping phases. Add standalone-worker coverage for successful, failed, and cancelled sign-in, diagnostic failures, and sensitive-data exclusion.

Type of Change

  • New feature (non-breaking diagnostic capability)
  • Documentation update

Testing

  • 52 focused authentication, timing, and diagnostics tests passed.
  • Main-process and test TypeScript checks passed.
  • Desktop/renderer production build succeeds.
  • Full desktop and renderer test suites on the upstream-based branch: 2,697 main-process tests passed (56 skipped), 1,156 renderer tests passed (2 skipped), and runtime/resource Node tests passed.
  • Repository lint and formatting checks passed (existing lint warnings remain; no errors).
  • Live GitHub sign-in timing capture after rebuilding the installed application

The production build retains existing bundle-size warnings. This change adds observability; it does not change sign-in behavior or request timeouts.

Checklist

  • Self-review completed.
  • Regression tests added.
  • Timing documentation added, including the distinction between code dispatch and UI rendering and between nested phases and total time.

@angnuoli
Angnuo (angnuoli) merged commit c64b2f5 into microsofthackathons:main Nov 16, 2026
4 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