Skip to content

Beacon Atlas: add selected-agent contract history timeline - #8216

Open
SageHaven wants to merge 1 commit into
Scottcjn:mainfrom
SageHaven:bounty/1524-contract-history
Open

Beacon Atlas: add selected-agent contract history timeline#8216
SageHaven wants to merge 1 commit into
Scottcjn:mainfrom
SageHaven:bounty/1524-contract-history

Conversation

@SageHaven

Copy link
Copy Markdown

Summary

  • replace the selected-agent contract rows with an always-visible terminal-style history timeline
  • order contracts deterministically by creation time, newest first, with unknown timestamps last
  • show UTC time, contract type, incoming/outgoing direction, counterparty, current lifecycle state, amount, currency, term, and contract ID
  • add pure data-normalization helpers and focused behavior/integration coverage

Bounty acceptance criteria

  • Contract history — timeline view of all contracts for a selected agent: buildContractHistory() selects contracts in both directions and the agent panel renders every result as a chronological timeline entry.
  • Useful history context: each entry exposes direction, counterparty, current state, amount/currency, term, ID, and a machine-readable UTC timestamp when available.
  • Deterministic and resilient: seconds, milliseconds, and ISO timestamps are normalized consistently; tied entries have a stable lexical order; malformed or missing timestamps render as TIME UNKNOWN without breaking the panel.
  • Retro terminal aesthetic: the timeline uses the existing terminal palette, state colors, glow treatment, and responsive wrapping.
  • Focused scope: the changes are confined to Beacon Atlas contract-history rendering, styling, a pure helper module, and matching tests; no other RIP-306: SophiaCore Attestation Inspector — Sophia Elya validates your hardware #1524 track is claimed.

Validation

  • node --test tests/beacon_contract_history.test.mjs — PASS, 4 tests
  • python3 -m unittest tests.test_beacon_contract_history_ui — PASS, 2 tests
  • python3 -m unittest tests.test_beacon_atlas — PASS, 14 tests
  • PYTHONWARNINGS=ignore::ResourceWarning python3 -m unittest tests.test_beacon_atlas_behavior — PASS, 31 tests
  • node --check site/beacon/contract-history.mjs — PASS
  • node --check site/beacon/ui.js — PASS
  • existing agent-panel and panel-path frontend-security assertions — PASS, 5 assertions
  • python3 tools/bcos_spdx_check.py --base-ref origin/main — PASS
  • git diff --check — PASS

Limitations

  • The contracts API exposes each contract's creation time and current state, not a separate state-transition event log, so each contract appears once with its current lifecycle state.
  • Chrome, Firefox, and mobile Safari are not installed on the VPS, so manual browser rendering was not claimed.
  • The existing Beacon behavior suite emits SQLite ResourceWarning messages after its passing tests when warnings are not suppressed; this frontend change does not alter that database lifecycle.

Bounty: Scottcjn/rustchain-bounties#1524 — Track C, Contract history (15 RTC).

Payout: RTC on RustChainRTC90182c386cc09a24c03ffd58e62c39ac4ea750bc

Implemented and validated with autonomous AI assistance under the @SageHaven agent identity.

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) tests Test suite changes labels Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Non-doc PRs have a BCOS-L1 or BCOS-L2 label
  • Doc-only PRs are exempt from BCOS tier labels when they only touch docs/**, *.md, or common image/PDF files
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added the size/L PR: 201-500 lines label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) size/L PR: 201-500 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant