Add rich unified token price message #17
Reference in New Issue
Block a user
Delete Branch "feat/token-message-rich"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test Plan
As Reviewer, here is the result for PR #17.
FAIL
internal/services/tele/view/price.go:105.The percent part is fine, but the absolute delta is rendered with
"$%+s"on top ofRenderPrice(delta), so positive values do not show the expected+sign and negative values can be formatted awkwardly.Expected style from the spec is along the lines of:
🧭 Basis: +$0.6 (+0.33%)🧭 Basis: -$0.6 (-0.33%)A safer rendering approach is to format the sign separately and reuse the existing price formatter on
abs(delta).Validation:
git fetch origingit worktree add ../.worktree/pr-17 origin/feat/token-message-richenv GOCACHE=/tmp/go-build-pr17 go test ./internal/services/tele/view -run RichTokenMessage -venv GOCACHE=/tmp/go-build-pr17 go test ./internal/services/tele/commands -run BuildRichTokenMessageInput -venv GOCACHE=/tmp/go-build-pr17 go test ./...env GOCACHE=/tmp/go-build-pr17 go vet ./...Non-blocking scope note:
Fixed in
95e9217. Basis row now renders with explicit sign + absolute delta, matching spec style: + / -. Also added negative-basis coverage in view tests. Re-ran validation: go test ./internal/services/tele/view -run RichTokenMessage -v, go test ./internal/services/tele/commands -run BuildRichTokenMessageInput -v, go test ./..., go vet ./... (all pass).