Repository navigation
Sort graduated launches by price; keep the last 200 chat messages - #58
Merged
Merged
Conversation
Market cap folds in effective supply, so a launch that burned part of its supply ranks below one that did not at the same per-token price. Add a Price sort that orders by XCP per whole token: SORT_SQL's `price` for the indexed path and a matching comparator for the live fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkjKD3QZivr3Qr2cKdjfbz
…a day A quiet room used to delete every message 24 hours after it was posted, so low chat volume meant visitors opened an empty transcript. History is now bounded by count alone: the newest 200 messages stay until newer posts push them out. Retry receipts, which hold no text and only back retries and the cooldown, keep their 24-hour expiry. The client drops its age filter and the history frame size limit scales with the new cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkjKD3QZivr3Qr2cKdjfbz
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.
Two small changes from the XCP Wallet Telegram discussion.
Sort graduated launches by price
Market cap folds in effective supply, so a launch that burned part of its supply (e.g. HONDACIVIC, ~15% burnt) ranks below one at the same per-token price. Adds a Price option to the Graduated sort menu, ordering by XCP per whole token (pool XCP reserve ÷ pool token reserve).
apps/api/src/queries/launches.ts:pricekey inSORT_SQL; launches with no pool sort last.apps/web/src/app/[lang]/_components/launch-sections.tsx: matching comparator for the live fallback path. "Price" is already translated in every locale.Chat: keep the last 200 messages instead of expiring them after a day
Every message was deleted 24 hours after posting, so at low volume the room opened empty. History is now bounded by count only: the newest 200 messages stay until newer posts push them out.
packages/chat/src/protocol.ts:CHAT_MAX_MESSAGES50 → 200;CHAT_TTL_MSremoved; history frame size limit scales with the cap.apps/api/src/durable/chat-room.ts: messages are pruned by the cap alone. Retry receipts (no text; they back retries and the cooldown) keep a 24h expiry, and the alarm now tracks receipts only.apps/web/src/hooks/use-chat.ts: drops the client-side age filter and its 30s timer.Deploy order: web before API. Browsers on the old bundle reject a history frame over 50 messages, so if the API goes first they miss the backlog on connect until they reload (live messages still arrive).
Testing
tsc, eslint, numeric and i18n checks pass for both apps; render-reads passes.tests/websocket-lifecycle.test.tsand fail identically onmainin the sandbox, so they're environmental.🤖 Generated with Claude Code
https://claude.ai/code/session_01LkjKD3QZivr3Qr2cKdjfbz
Generated by Claude Code