Skip to content

Add contributor shortcuts to me page#543

Open
Juanpablo24-06 wants to merge 1 commit into
ramimbo:mainfrom
Juanpablo24-06:codex/b427-ux-scan
Open

Add contributor shortcuts to me page#543
Juanpablo24-06 wants to merge 1 commit into
ramimbo:mainfrom
Juanpablo24-06:codex/b427-ux-scan

Conversation

@Juanpablo24-06
Copy link
Copy Markdown
Contributor

@Juanpablo24-06 Juanpablo24-06 commented May 27, 2026

Bounty #427

Summary:

  • add signed-in /me shortcuts to the contributor ledger account, accepted-work activity search, account JSON, and linked wallet detail when available
  • keep the change scoped to the authenticated contributor workflow where users decide how to inspect or claim GitHub balance
  • cover the rendered links and context shape with focused tests

Evidence:

  • before this change, /me showed github:<login> balance and linked-wallet state, but users had to manually compose /accounts/github:<login>, /activity?q=github:<login>, or /api/v1/accounts/github:<login> URLs to inspect public history and machine-readable account state
  • this is distinct from account-detail and wallet-detail shortcut work because it starts from the signed-in contributor page and connects the claim/linking workflow to the public inspection workflow
  • live bounty Handle malformed bounty API JSON #73 / issue MRWK bounty: site UX and functional improvements #427 preflight returned status=open, awards_remaining=2, available_mrwk=250, and no active attempts
  • no wallet material, private keys, cookies, OAuth state, access tokens, signatures, browser storage, private data, price claims, liquidity claims, exchange claims, bridge promises, or fabricated payout claims are included
  • no screenshot attached because this is a small navigation-link addition, not a visual layout redesign; rendered HTML assertions cover the behavior

Verification:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_me_page.py tests/test_wallet_api.py::test_me_page_shows_signed_in_github_claim_balance tests/test_wallet_api.py::test_me_page_prefills_claim_address_for_linked_wallet -q -> 4 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_me_page.py tests/test_wallet_api.py tests/test_account_routes.py tests/test_activity.py -q -> 40 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest -q -> 414 passed
  • uv run --extra dev ruff check app/me.py tests/test_me_page.py tests/test_wallet_api.py -> passed
  • uv run --extra dev ruff format --check app/me.py tests/test_me_page.py tests/test_wallet_api.py -> passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev mypy app/me.py -> success
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python scripts/docs_smoke.py -> docs smoke ok
  • git diff --check -> clean

Summary by CodeRabbit

  • New Features
    • Added "Contributor account shortcuts" section on the profile page with links to ledger account, activity, and account information.
    • Profile page now displays a linked wallet link when a wallet address is available.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2e4595b6-e4bb-4b06-aba8-06a56675e7d3

📥 Commits

Reviewing files that changed from the base of the PR and between d8532d4 and b1dc1af.

📒 Files selected for processing (4)
  • app/me.py
  • app/templates/me.html
  • tests/test_me_page.py
  • tests/test_wallet_api.py

📝 Walkthrough

Walkthrough

The PR extracts a github_account identifier in the /me endpoint context builder, exposes it to the template, and uses it to render contributor account shortcuts including ledger, activity, account JSON, and linked wallet links, with supporting test updates for both the context and rendered HTML.

Changes

GitHub account shortcuts and links

Layer / File(s) Summary
Extract and expose github_account in context
app/me.py, tests/test_me_page.py
me_page_context now computes github_account from login (empty string if not provided, "github:{login}" if provided), uses it for balance lookup, and includes it in the returned context dict. Unit tests updated to assert github_account is empty for anonymous users and "github:alice" for authenticated users.
Render account shortcuts and verify links
app/templates/me.html, tests/test_wallet_api.py
The me.html template renders a new "Contributor account shortcuts" section with links to the ledger account, accepted work activity, and account JSON endpoint when github_login is present, plus a conditional "Linked wallet" link. Integration tests verify the presence of /accounts/github:alice, /activity?q=github%3Aalice, account JSON, and /wallets/{address} links in the rendered HTML.

Possibly related PRs

  • ramimbo/mergework#376: Both PRs modify me_page_context in app/me.py, with this PR extending the context extraction and exposing the github_account field for template rendering.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Bounty Pr Focus ❓ Inconclusive Check applies "when PR references Bounty #N or Refs #N", but commit message lacks explicit reference. Branch name suggests possible Bounty #427 context but unconfirmed by PR metadata. Confirm PR contains Bounty #N or Refs #N field in submission to establish check applicability.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically names the main change: adding contributor shortcuts to the me page, which matches the primary surface modified (me.html template and supporting context).
Description check ✅ Passed The description includes all required template sections (Summary, Evidence, Test Evidence, MRWK) with substantive content, verification results, and clear scope boundaries.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Mergework Public Artifact Hygiene ✅ Passed PR adds navigation shortcuts to public pages with no investment, price, cash-out claims, fabricated payouts, or improper security details. MRWK described as native ledger coin.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@Baijack-star Baijack-star left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR #543 at head b1dc1af for the signed-in /me contributor-shortcuts slice.

Evidence checked:

  • Diff is limited to app/me.py, app/templates/me.html, tests/test_me_page.py, and tests/test_wallet_api.py.
  • app/me.py builds github_account once from the authenticated login and reuses it for balance lookup and template links.
  • app/templates/me.html adds the contributor shortcut links only inside the signed-in branch, so anonymous users do not get empty /accounts/ links.
  • The activity shortcut URL-encodes github:alice as github%3Aalice, matching the public activity query contract, and the linked-wallet shortcut is conditional on linked_wallet_address.
  • Existing wallet/link/claim forms stay below the shortcut section and the new tests cover both linked and unlinked states.

Validation run locally on the PR branch:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_me_page.py tests/test_wallet_api.py::test_me_page_shows_signed_in_github_claim_balance tests/test_wallet_api.py::test_me_page_prefills_claim_address_for_linked_wallet -q -> 4 passed
  • uv run --extra dev ruff check app/me.py tests/test_me_page.py tests/test_wallet_api.py -> All checks passed
  • git diff --check origin/main...HEAD -> clean

Assessment: no code blocker found in this focused navigation addition. The GitHub status shows the main Quality/readiness/docs/image check successful; CodeRabbit was still processing at review time, so maintainers may still get automated follow-up. No private cookies, tokens, wallet material, production mutation, payout guarantees, liquidity/exchange/off-ramp claims, or private data were used.

@tinyopsstudio
Copy link
Copy Markdown

Reviewed PR #543 at b1dc1af2c2ca16bc86d2843475e9eaa93c7fd12b for the signed-in /me contributor shortcut flow.

Evidence checked:

  • inspected app/me.py, app/templates/me.html, tests/test_me_page.py, and tests/test_wallet_api.py;
  • confirmed github_account is only populated from the authenticated login and reused for the balance lookup plus shortcut links;
  • confirmed the new ledger/account/activity/API links only render inside the signed-in branch, so anonymous /me users keep the existing sign-in path;
  • confirmed the activity shortcut URL-encodes github:alice as github%3Aalice, while the linked-wallet shortcut only appears when a linked wallet address exists.

Validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_me_page.py tests/test_wallet_api.py::test_me_page_shows_signed_in_github_claim_balance tests/test_wallet_api.py::test_me_page_prefills_claim_address_for_linked_wallet -q -> 4 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest -q -> 414 passed
  • uv run --extra dev ruff check app/me.py tests/test_me_page.py tests/test_wallet_api.py -> passed
  • uv run --extra dev ruff format --check app/me.py tests/test_me_page.py tests/test_wallet_api.py -> 3 files already formatted
  • git diff --check origin/main...HEAD -> clean

Assessment: no blocker found. The change is scoped to the authenticated contributor page and gives the user direct inspection links without changing the wallet signing/claim flow.

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.

3 participants