TUI theme plug + bulletin attestation on dot init#21
Merged
UtkarshBhardwaj007 merged 2 commits intomainfrom Apr 18, 2026
Merged
TUI theme plug + bulletin attestation on dot init#21UtkarshBhardwaj007 merged 2 commits intomainfrom
UtkarshBhardwaj007 merged 2 commits intomainfrom
Conversation
…ation on dot init. All screens now render through `src/utils/ui/theme/` — one folder holds every color, glyph, and layout token used anywhere in the CLI. Swap the folder to reskin; stub the exports to strip styling. No color literals, glyph literals, or spacing constants live outside this directory. `dot init` now queries bulletin attestation on every run — even for already-signed-in users — and renders how long the upload quota is valid for in human form (e.g. `~13d 4h · #14,582,331`), switching to warning color under 24h and danger color when expired. Terminal tab title updates during long deploys via OSC 0 (building → uploading → publishing → ✓/✕), so `dot deploy` shows progress in the tab strip while the user tabs away. TTY-gated so CI/pipe output stays clean; cleared on process shutdown.
Contributor
|
Dev build ready — try this branch: |
Biome collapses whitespace in JSX text children, which broke the " · " separator rhythm in Hint rows. Wrapped those hints and the AppBrowser column rows in template literals so biome leaves the spacing alone; ran biome --write to fix the remaining visually-neutral line-length issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/utils/ui/theme/plug — every screen renders through this single folder. Swap it to reskin, stub it to strip styling. No color/glyph/spacing literals outside this directory.dot initnow surfaces bulletin attestation status on every run (even for already-signed-in users):~13d 4h · #14,582,331, with warning color under 24h and danger when expired.Behavior changes
dot init→AccountSetupthird row readsbulletin · ~13d 4h · #14,582,331(ornot attested/expired · #N) plus a dim quota hint underneath.dot deployrunning screen shows the OSC tab-title progression; the completion screen shows a chunk-upload sparkline.Header(breadcrumb + hairline rule) and use uniform marks:✓✕⚠·⠋….Implementation notes
src/utils/account/attestation.tsreadsTransactionStorage.Authorizations+ current block height and returns a pureAttestationStatus.formatAttestationis a pure function of status + block time; 14 unit tests cover the formatter's thresholds (>30d, 1–30d, 1–24h, <1h, expired, unauthorized). Block time is derived fromAura.SlotDurationand cached per process.Headerwrites the OSC title on mount;DeployScreenalso callssetWindowTitleon phase transitions and on finish/error.src/index.tsregistersclearWindowTitleviaonProcessShutdownso exit hands the tab back to the shell.checkAllowancebehavior is unchanged — attestation is a separate read that surfaces expiry without touching the refresh threshold.Test plan
pnpm test— 161 passpnpm exec tsc --noEmit— no errorsdot initwith a freshly-onboarded account — bulletin row shows~Nd Mh · #blockdot initwith an expired attestation — bulletin row showsexpired · #blockin reddot initwhen attestation refresh is needed — spinner → new~Nd · #blockdot deploy --signer dev— banner renders, tab title updates through phases, completion shows sparkline + success tab titledot deploy | cat(piped) — no OSC escape codes leak into stdoutFollow-ups not in this PR
@polkadot-apps/*chain client writesConnecting to: …/SS58 Address: …to stdout during domain validation, which bleeds into Ink's render frame and stacks banners in scrollback.Headernow reserves a top margin so the banner always has a blank line above it, but the proper fix is to capture that output and route it through the theme'sLogTail. Flagged in CLAUDE.md conventions as a known rough edge.