Skip to content

Add wallet detail shortcuts#492

Open
tinyopsstudio wants to merge 2 commits into
ramimbo:mainfrom
tinyopsstudio:tinyops-wallet-detail-shortcuts
Open

Add wallet detail shortcuts#492
tinyopsstudio wants to merge 2 commits into
ramimbo:mainfrom
tinyopsstudio:tinyops-wallet-detail-shortcuts

Conversation

@tinyopsstudio
Copy link
Copy Markdown

@tinyopsstudio tinyopsstudio commented May 27, 2026

Bounty #427

Summary:

  • add wallet-detail shortcuts to search activity for that wallet and open its public wallet JSON
  • keep the change wallet-specific and reuse existing public routes
  • cover the rendered shortcut links in the wallet page smoke test

Evidence:

  • current /wallets/<address> pages already link transfer, GitHub linking, and the ledger account, but users still have to manually compose the wallet API URL or activity search
  • this is distinct from account-detail shortcut work because it targets the wallet detail workflow and /api/v1/wallets/<address>
  • no private keys, cookies, tokens, wallet JSON, browser storage, OAuth state, or private material are added

Verification:

  • .venv/bin/python -m pytest tests/test_wallet_api.py::test_wallet_pages_expose_transfer_and_github_claim_flows -q
  • .venv/bin/python -m pytest tests/test_wallet_api.py -q
  • .venv/bin/python -m pytest -q
  • .venv/bin/python -m ruff check tests/test_wallet_api.py
  • .venv/bin/python -m ruff format --check tests/test_wallet_api.py
  • .venv/bin/python -m mypy app
  • .venv/bin/python scripts/docs_smoke.py
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added wallet activity link to the wallet detail page for easy access to transaction history.
    • Added wallet JSON API link to the wallet detail page for viewing wallet data in JSON format.
  • Tests

    • Updated tests to verify the new wallet activity and API data links are present on the wallet detail page.

Review Change Stack

Bounty ramimbo#427: app/templates/wallet_detail.html
Bounty ramimbo#427: tests/test_wallet_api.py
@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: bd240b00-7435-488d-8446-4f0572737a08

📥 Commits

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

📒 Files selected for processing (2)
  • app/templates/wallet_detail.html
  • tests/test_wallet_api.py

📝 Walkthrough

Walkthrough

This PR adds two navigation links to the wallet detail template: one to view the wallet's activity and another to access its JSON API representation. Test assertions verify both links render correctly with proper encoding.

Changes

Wallet Detail Links

Layer / File(s) Summary
Wallet detail template links
app/templates/wallet_detail.html
The actions menu adds an "View activity" link (with URL-encoded wallet address) and a "Wallet JSON" link pointing to the /api/v1/wallets/{address} API endpoint.
Detail page link verification
tests/test_wallet_api.py
Test assertions confirm the detail page HTML contains both the activity and API endpoint links.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Bounty Pr Focus ⚠️ Warning Commit references Bounty #427 but includes 129 files (21,878 insertions total) initializing entire repository, not just wallet detail shortcuts. Scope vastly exceeds stated bounty work. Separate the full repository initialization from Bounty #427 work, or remove the bounty reference if initializing the complete project intentionally.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly names the changed surface (wallet detail) and the main change (shortcuts), directly matching the summary of added links.
Description check ✅ Passed Description includes summary, evidence, verification steps, and related bounty. All required template sections are present and substantively filled.
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 UI shortcuts to existing public wallet endpoints. No investment, price, cash-out, payout, or security claims found. PR confirms no private material exposed.

✏️ 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
Contributor

@GHX5T-SOL GHX5T-SOL left a comment

Choose a reason for hiding this comment

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

Reviewed current head eea0aa2f2e0f654cb3a4c08a20b0de3575b91936 as a non-author reviewer.

I inspected the wallet-detail shortcut change in app/templates/wallet_detail.html and the coverage in tests/test_wallet_api.py. The added actions use existing public routes: /activity?q=<wallet> reuses accepted-work search for the wallet account, while /api/v1/wallets/<wallet> opens the existing public wallet JSON endpoint. Wallet addresses are normalized by app/wallets.py to mrwk1 plus lowercase hex, so the direct API href does not introduce path confusion, and the activity link applies URL encoding for the query string.

Validation:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_wallet_api.py::test_wallet_pages_expose_transfer_and_github_claim_flows -q -> 1 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_wallet_api.py -q -> 32 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest -q -> 414 passed
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python scripts/docs_smoke.py -> docs smoke ok
  • uv run --extra dev ruff check tests/test_wallet_api.py -> passed
  • uv run --extra dev ruff format --check tests/test_wallet_api.py -> already formatted
  • uv run --extra dev python -m mypy app -> success
  • git diff --check origin/main...HEAD -> clean
  • diff Gitleaks scan over origin/main..HEAD -> no leaks
  • GitHub CodeRabbit check -> success, no actionable comments

No blocker found.

@tinyopsstudio
Copy link
Copy Markdown
Author

Quick scope note for the CodeRabbit warning: I rechecked the current GitHub PR metadata for #492.

The PR is based on ramimbo/mergework main at d8532d4, and the current Files changed list is only:

  • app/templates/wallet_detail.html (+2/-0)
  • tests/test_wallet_api.py (+2/-0)

Total current diff: +4/-0. The "129 files / repository initialization" warning appears to be a stale or fork-initialization false positive, not the current PR diff. No code changes needed for that warning.

Copy link
Copy Markdown
Contributor

@tolga-tom-nook tolga-tom-nook left a comment

Choose a reason for hiding this comment

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

Reviewed current head eea0aa2f2e0f for rolling review bounty #447. No blockers found.

Evidence checked:

  • Diff is intentionally small: app/templates/wallet_detail.html adds wallet-detail shortcuts to filtered activity and the wallet JSON endpoint; tests/test_wallet_api.py extends test_wallet_pages_expose_transfer_and_github_claim_flows to lock both links.
  • The activity link uses urlencode on the wallet address query value, and the wallet-address format is already route-safe for the JSON path.
  • Existing transfer/GitHub-claim actions and wallet-empty/funded-empty assertions remain covered by the same route test, so this is additive navigation only.

Validation run locally:

  • uv run --extra dev python -m pytest tests/test_wallet_api.py::test_wallet_pages_expose_transfer_and_github_claim_flows -q -> 1 passed
  • uv run --extra dev python -m pytest tests/test_wallet_api.py -q -> 32 passed
  • uv run --extra dev ruff check tests/test_wallet_api.py -> All checks passed
  • uv run --extra dev ruff format --check tests/test_wallet_api.py -> 1 file already formatted
  • uv run --extra dev mypy app -> Success
  • uv run --extra dev python scripts/docs_smoke.py -> docs smoke ok

Verdict: approve; the shortcuts are low-risk, useful on the wallet detail page, and have focused regression coverage.

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