Skip to content

Wire UI to database instead of mock data#26

Open
technophile-04 wants to merge 10 commits intomainfrom
dynamic-ui
Open

Wire UI to database instead of mock data#26
technophile-04 wants to merge 10 commits intomainfrom
dynamic-ui

Conversation

@technophile-04
Copy link
Member

@technophile-04 technophile-04 commented Feb 27, 2026

Summary

Closes #25

Handled the wiring of the UI till now. The subsection from #25 still remaining.

Subissues from #25:

  • UI: display multiple voting stages per proposal (likely ordered by date desc), showing the latest by default with an expand/collapse to reveal older ones.
  • Decide how to handle snapshot votes that aren’t tied to proposals. For now they remain unlinked (we should probably not show in the UI, but worth aligning with Patrick)
    • currently since we are doing join from proposals, we are implicitly not fetching the snapshopt and tally's which has proposalId = null
  • Improve matching input by using snapshot author name instead of just address, to give the LLM more context (tracked here: Snapshot import #12).
  • Edge case: a single tally vote that merges multiple forum proposals. Currently results in null proposal_id. Decide whether tally/snapshot items should support linking to multiple proposals. Example: "[CONSTITUTIONAL] Remove Cost Cap, Update Executors, Disable Legacy USDT Bridge",

Test plan

  • Verify dashboard loads with real DB data
  • Confirm search, status filter, and category filter work
  • Check "Show forum proposals" toggle shows forum-only proposals
  • Verify vote counts display correctly (formatted as M/K)
  • Verify time display shows Xd ago for recent, Xy Xmo ago for older
  • Confirm stats cards compute from real data
  • Test empty state when no proposals match filters

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arbitrum-dashboard Ready Ready Preview, Comment Mar 3, 2026 11:56am

Request Review

Pabl0cks added 2 commits March 3, 2026 11:51
… and exclude Defeated from active onchain stats
…, replace Category column with Last Activity, fix tooltip styling
Copy link
Member

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

Awesome job Shiv! I've been playing with the dashboard with "real" data, and have done some tweaks "on the fly". Please take a look to make sure everything makes sense and the code pushed is not too bad.

Bug fixes

  • Recognize crosschainexecuted Tally status: map to "Cross-chain Executed" in Tally column, "Executed" globally
  • Handle "Defeated" tally status explicitly instead of falling through to "Awaiting On-chain Vote"
  • Fall back to Snapshot votes in the Votes column when Tally stage does not exist
  • Use startsWith matching for Snapshot vote labels (e.g. "For DVP Quorum") => Maybe for this one is just to show the multi-choice? Maybe this is too hacky?
  • Display multi-choice Snapshot votes (truncated labels + hover tooltip) instead of "No votes yet"
  • Show "Active On-chain Vote" for Tally proposals with Active status instead of "Draft"
  • Show "Active Off-chain Vote" for Snapshot proposals with Active/Pending status instead of "Draft"
  • Exclude "Defeated" from "Active Onchain Votes" stats count
  • If a proposal has several tally or snapshot stages, sort tally stages by last_activity and snapshot stages by voting_end instead of updated_at (import timestamp)

Tweaks

  • Sort table rows by most relevant stage date: tally > snapshot > forum
  • Group status filter options by stage: Forum → Snapshot → Tally
  • Add filter options for Active On/Off-chain Vote
  • Rename fallback status from "Draft" to "Unknown" (draft was missleading for a fallback, unless you did it for a reason 🙏)
  • Replace "Category" column with "Last Activity" (relative timestamps). Let's not overcomplicate having to catalog the proposals, last activity is a useful field to have, so you know how fresh each proposal is.
  • Make vote stage badges clickable links to their Snapshot/Tally pages. That's specially useful when there is more than 1 tally or snapshot stage.
  • Count "Cross-chain Executed" in "Executed / Pending Execution" stats
  • Add clarification on "Active Discussions" dashboard stat and checkbox

Haven't done a deep testing, but I think this is good enough for the demo, we can continue testing and fixing whatever looks not OK.

Was thinking about what was the best "Proposal title" to show in the table, if the one linked to proposal (current) or the snapshot/tally title, was not sure so did not change it

@technophile-04
Copy link
Member Author

TYSM Pablo! Everything looks great to me and more readable UI 🫶!

Rename fallback status from "Draft" to "Unknown" (draft was missleading for a fallback, unless you did it for a reason 🙏)

Ohh it was just AI :( "Unknown" makes more sense actually!

Was thinking about what was the best "Proposal title" to show in the table, if the one linked to proposal (current) or the snapshot/tally title, was not sure so did not change it

I just compared the different title from proposal with the stages and it seems like most of them were almost 50% were almost exact match, 30-45% differed just because of html entities (& → &) or prefix differences ([CONSTITUTIONAL]), not real content differences, and the remaining 5-10% were a bit differnt for example:

PROPOSAL: AIP: Timeboost + Nova Fee Sweep
SNAPSHOT: Approve the Nova Fee Sweep Action
TALLY: [CONSTITUTIONAL] - Adopt Timeboost + Nova Fee Sweep

So I think maybe the forum proposal is best canonical choice. Maybe in future the expanded history items can show the stage specfic titles if we want 🙌

Copy link
Member

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

TYSM Pablo! Everything looks great to me and more readable UI 🫶!

Great!

So I think maybe the forum proposal is best canonical choice. Maybe in future the expanded history items can show the stage specfic titles if we want 🙌

Yep! Let's start like this, approving 🙏

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.

Update UI to read from the database instead of mock data

2 participants