Skip to content

Default GitHub context not synced across sessions with different app logins #650

Description

Summary

When multiple sessions are open and each logs in with different accounts/apps, the default context marker is not consistent with the active session context.

Reproduction

  1. Open Session 1 and log in with app/account App A (set as default at that time).
  2. Open Session 2 and log in with app/account App B (set as default at that time).
  3. Return to Session 1 and run:
    • Get-GitHubConfig → shows App B as default context.
    • Get-GitHubContext → returns info about App A.
    • Get-GitHubContext -ListAvailable → default marker is on App B.
    • Get-GitHubApp (current session was logged in using an app) shows session/account behavior inconsistent with default marker.

Actual behavior

Default context marker/state appears to be updated globally across sessions, while session-resolved context still points to the session login.

Expected behavior

Behavior should be predictable in multi-session usage and configurable:

  1. Operational default should be session-local by default

    • A session keeps its selected active/default context stable unless changed in that same session.
  2. A separate global startup default should exist for new sessions

    • New sessions initialize from a global default context, but existing sessions do not switch automatically.
  3. Shared contexts should remain available across sessions

    • Sessions can list/select shared contexts, but accessing them should not implicitly change another session's active default.
  4. Configuration option for default scope

    • Add a setting (for example, DefaultContextScope) to choose behavior:
      • Session (recommended)
      • Global
    • Optionally pair with StartupDefaultContext for session initialization.

Commands should consistently reflect the same effective context model:

  • Get-GitHubConfig
  • Get-GitHubContext
  • Get-GitHubContext -ListAvailable
  • Get-GitHubApp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions