Skip to content

Fix ConnectPanel state-matrix handling for partial GitHub/wallet connection states #52

Closed

Description

@chonilius

Problem

src/app/connect/ConnectPanel.tsx orchestrates connecting both GitHub (OAuth redirect to the backend) and the Stellar wallet (Freighter, client-side) per the README's architecture description — two independent, asynchronous, differently-failure-prone identity/connection flows that this single component needs to sequence and reconcile. There's a real question of ordering and consistency: can a user connect a wallet before authenticating with GitHub (and if so, what happens to that wallet connection state if the subsequent GitHub OAuth fails or the user abandons it)? Can a user connect GitHub, navigate away, and return later to /connect to add the wallet separately — and does the component correctly detect and reflect a partially-complete state (GitHub connected, wallet not) rather than assuming both happen in one linear session? Given AuthUser.stellarAddress: string | null exists as a field, the backend clearly models "authenticated but no wallet yet" as a valid state, but it's unverified whether ConnectPanel.tsx actually handles resuming into that state correctly versus only having been built and tested for the "both in one go" happy path.

Why this is hard

  • Requires reading ConnectPanel.tsx in full to map its actual current state machine (explicit or implicit) against the real possible states: {no GitHub, no wallet}, {GitHub connected, no wallet}, {no GitHub, wallet connected locally but unlinked}, {both connected} — and determining which of these the component currently handles correctly versus assumes away.
  • The "wallet connected before GitHub auth" case is subtle: WalletContext's connect() calls into useAuth() (per the earlier file read, it destructures user, refresh from useAuth()) — meaning wallet connection logic may already assume an authenticated user exists, and connecting a wallet pre-auth might silently no-op, error confusingly, or (worst case) connect the wallet locally without any backend association, giving false confidence that "wallet connected" is a durable, linked state when it's actually just local Freighter permission grant with no server-side record.
  • Needs a UX decision for enforcing or not enforcing an order (require GitHub first, since wallet-linking presumably needs to associate with an authenticated user server-side) — if an order should be enforced, ConnectPanel.tsx needs to actually gate/disable the wallet-connect action until GitHub auth completes, with a clear explanation, rather than allowing a confusing state to be reached.
  • Must correctly handle resuming the flow: a user who completed GitHub auth in a previous session, closed the tab, and returns to /connect later should see accurate state (GitHub: connected, wallet: not yet) sourced from AuthContext/WalletContext's real reconciled state (see the wallet-reconciliation issue elsewhere in this batch) rather than a component that assumes it's always starting from a blank slate.

Scope

  • Map ConnectPanel.tsx's actual current behavior against the full state matrix above; document gaps.
  • Decide and enforce (or explicitly support, if the decision is to allow either order) a deliberate ordering policy between GitHub auth and wallet connection, with clear UI communication of why, if an order is enforced.
  • Fix any case where a wallet can end up connected in Freighter but not durably linked server-side without the UI reflecting that distinction clearly.
  • Ensure returning to /connect in any partially-complete state renders accurate, resumable UI reflecting real backend/wallet state, not an assumed fresh start.

Acceptance criteria

  • Every state in the {GitHub × wallet} matrix renders correct, non-misleading UI in ConnectPanel.tsx, verified by manually driving the component into each state.
  • A wallet connection that isn't yet durably linked to the authenticated account is never presented identically to a fully linked one.

Activity

  1. added
    very hard
    bug
    architecture
    on Jul 15, 2026
  2. added
    GrantFox OSS
    Maybe Rewarded
    Official Campaign | FWC26
    on Jul 15, 2026
  3. ranjeet150 commented on Sep 14, 2026

    @ranjeet150

    Hi maintainers,

    I would like to resolve this issue. Here is my proposed execution plan:

    • Implementation: Build Fix ConnectPanel state-matrix handling for partial GitHub/wallet connection states with clean React/Next.js components, responsive styling, and proper loading/error boundaries.
    • Testing & Verification: Add component unit tests and ensure zero TypeScript/ESLint warnings.
    • Delivery: Ready to ship a thoroughly tested PR within 12–24 hours with passing CI.

    I am ready to start immediately—please assign this to me!

  4. added
    Stellar Wave
    on Sep 26, 2026
  5. fadesany commented on Sep 26, 2026

    @fadesany

    @fadesany has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hello maintainer, i would like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @fadesany to this issue.

  6. harmondconsultant-png commented on Sep 26, 2026

    @harmondconsultant-png

    @harmondconsultant-png has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    hy, i can work on it pleas assign

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @harmondconsultant-png to this issue.

  7. Chidubemkingsley commented on Sep 26, 2026

    @Chidubemkingsley
    Contributor

    @Chidubemkingsley has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    can i work on this

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Chidubemkingsley to this issue.

  8. DevScoopee commented on Sep 26, 2026

    @DevScoopee

    @DevScoopee has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi i fully understand what needs to be done and can deliver. kindly assign

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @DevScoopee to this issue.

  9. drips-wave commented on Sep 26, 2026

    @drips-wave

    Congratulations, @Chidubemkingsley! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @Chidubemkingsley: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  10. drips-wave commented on Sep 27, 2026

    @drips-wave

    This issue has been completed by @Chidubemkingsley as part of the Stellar Wave Program's 9th Wave 🥳

    😎 @Chidubemkingsley: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  11. removed
    Stellar Wave
    on Oct 15, 2026
  12. added
    Stellar Wave
    on Oct 15, 2026
  13. removed
    Stellar Wave
    on Oct 15, 2026
  14. added
    Stellar Wave
    on Oct 15, 2026
  15. removed
    Stellar Wave
    on Oct 15, 2026
  16. added
    Stellar Wave
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

GrantFox OSSMaybe RewardedOfficial Campaign | FWC26Stellar Wavearchitecturebugvery hard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions