Bounty #427: Add ledger entry navigation#535
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds previous/next navigation to ledger entry detail pages. A new ledger_entry_page_context computes previous/next boundaries (previous only when >1, next with 404 fallback), the route passes this expanded context to the template, the template renders conditional navigation links, and tests validate the UI elements. ChangesLedger entry page navigation
Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
aiautotool
left a comment
There was a problem hiding this comment.
Reviewed current head e648ea6e121dd80d61e60f1664f8f663317416ae as a non-author.
Scope checked:
app/public_routes.pynow builds a ledger-entry page context from the existing API serializer, keeps the original entry lookup/error behavior, and only probes the next sequence to suppress a dead next link on the current chain tip.app/templates/ledger_entry.htmladds bounded navigation back to/ledger, adjacent entry links, and the matching JSON endpoint without changing ledger/API output.tests/test_bounty_pages.pycovers the rendered navigation on an actual bounty payment ledger entry, including previous, next, and JSON links.
Validation run locally on this head:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m pytest tests/test_bounty_pages.py::test_ledger_and_proof_pages_make_bounty_payments_scannable -q-> 1 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m pytest tests/test_bounty_pages.py tests/test_public_routes.py tests/test_api_mcp.py::test_ledger_api_rejects_out_of_range_limits -q-> 11 passed.venv/bin/python -m ruff check app/public_routes.py tests/test_bounty_pages.py-> passed.venv/bin/python -m ruff format --check app/public_routes.py tests/test_bounty_pages.py-> 2 files already formattedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m mypy app/public_routes.py-> successPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python scripts/docs_smoke.py-> docs smoke okgit diff --check origin/main...HEAD-> clean
I did not find a blocker. The change is focused on the public ledger detail navigation surface and avoids private data, wallet material, payout guarantees, or off-ramp claims.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d9cbf1d6-bf54-4dbe-93d7-e31daeb3fe8d
📒 Files selected for processing (3)
app/public_routes.pyapp/templates/ledger_entry.htmltests/test_bounty_pages.py
|
Reviewed current head Scope checked:
Validation:
I did not find a blocker. This current-head review is distinct from the earlier review on |
aiautotool
left a comment
There was a problem hiding this comment.
Current-head follow-up on d59c18b79e7a63a1643b16e1bf36b34de383ed88: the new boundary coverage addresses the gap CodeRabbit raised.
What changed since my prior review:
tests/test_bounty_pages.pynow verifies the genesis ledger entry does not render a/ledger/0previous link.- The test also verifies the latest ledger entry does not render a dead next-entry link.
- Implementation scope remains unchanged: public ledger detail navigation only, with REST output unchanged.
Validation rerun locally on current head:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m pytest tests/test_bounty_pages.py::test_ledger_and_proof_pages_make_bounty_payments_scannable -q-> 1 passed.venv/bin/python -m ruff check app/public_routes.py tests/test_bounty_pages.py-> passed.venv/bin/python -m ruff format --check app/public_routes.py tests/test_bounty_pages.py-> 2 files already formattedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m mypy app/public_routes.py-> successgit diff --check origin/main...HEAD-> clean
No blocker found on the current head.
weilixiong
left a comment
There was a problem hiding this comment.
APPROVED — Adds ledger entry navigation (previous/next/all). Clean helper function with proper 404 handling for next sequence. Test covers first entry (no prev), last entry (no next), and middle entry. +41/-1, well-scoped.
Summary
Refs #427 / Bounty #427.
This adds focused navigation to public ledger entry detail pages so contributors and maintainers can audit adjacent ledger entries without manually editing URLs.
/ledger/{sequence}now shows links back to the full ledger, previous entry, next entry when it exists, and the matching/api/v1/ledger/{sequence}JSON.actionsstyling and does not alter REST API output.Before / after
Before: ledger detail pages showed hashes and account/proof links, but users had to manually edit the URL to inspect adjacent hash-chain entries or find the JSON endpoint.
After: the detail page exposes direct previous/next ledger navigation and an entry JSON shortcut in the page header area.
No screenshot artifact is attached because this is a small functional navigation addition using the existing action-link style, not a visual layout redesign.
Evidence
/ledger/{sequence}detail navigation, not/ledgerrow limits or type filters.73/ issue#427:status=open,awards_remaining=2,available_mrwk=250, and active attempts[].Validation
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_bounty_pages.py::test_ledger_and_proof_pages_make_bounty_payments_scannable -q-> 1 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_bounty_pages.py tests/test_public_routes.py tests/test_api_mcp.py::test_ledger_api_rejects_out_of_range_limits -q-> 11 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest -q-> 414 passeduv run --extra dev ruff check app/public_routes.py tests/test_bounty_pages.py-> passeduv run --extra dev ruff format --check app/public_routes.py tests/test_bounty_pages.py-> 2 files already formattedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev mypy app/public_routes.py-> successPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python scripts/docs_smoke.py-> docs smoke okgit diff --check-> cleanSafety
No wallet material, private keys, cookies, OAuth state, access tokens, signatures, private data, price/off-ramp claims, liquidity claims, exchange claims, bridge promises, or fabricated payout claims are included.
Summary by CodeRabbit
New Features
Tests