Repository navigation
feat: implement destroy asset feature and transfer enhancements - #199
Merged
Merged
Conversation
BioForest chain timestamps are relative to the genesis block's beginEpochTime, not absolute Unix timestamps. This fix adds the epoch time offset to correctly display transaction times. Before: timestamps showed 1970 (only relative seconds * 1000) After: timestamps show correct dates (relative seconds * 1000 + epochTime) Changes: - Add getBeginEpochTime() to fetch and cache epoch time from SDK - Add toAbsoluteTimestamp() helper for timestamp conversion - Fix getTransaction() to use absolute timestamps - Fix getTransactionHistory() to use absolute timestamps
- Add top-level await to load labels from GitHub at startup - Add getLabels() to list all available labels with colors - Add createLabel() and ensureLabels() for label management - Add --create-labels flag to auto-create missing labels - Add --list-labels flag to display available labels grouped by prefix - Update createIssue/createPr to validate labels before creation Usage: pnpm agent task start --list-labels pnpm agent task start --type service --title 'Feature' --create-labels
Add [skip ci] to initial commit message to avoid triggering CI runners for draft PRs. CI will run normally when task submit is called.
- Document workflow stages (start → develop → submit) - Explain CI skip behavior for draft PRs - Document label management features - Add color inference rules for new labels
Rename the MCP tool from 'workflow' to 'use' for cleaner API: - workflow___workflow -> workflow___use - Update examples in dynamic description
- Add RuntimeContext to detect MCP vs CLI mode
- Support async description: string | () => string | () => Promise<string>
- Add formatScenarios() and formatDataSection() mode-aware formatters
- MCP mode set automatically in buildToolDescription and executeWorkflow
Usage example:
description: async () => {
const labels = await getLabels();
return `Task management\n\n${formatScenarios('task', scenarios)}\n\n${formatDataSection('Labels', labels)}`;
}
- Add AssetSelector component for selecting transfer/destroy assets - Add TokenItem renderActions slot for custom action menus - Create useBurn hook with bioforest-specific destroy logic - Add DestroyPage with confirmation flow - Enhance SendPage with AssetSelector for non-native assets - Add WalletTab token menu (transfer/destroy options) - Add bio_destroyAsset miniapp ecosystem handler - Add MiniappDestroyConfirmJob sheet - Add i18n translations (zh-CN, en) - Add unit tests (25 new tests passed)
- str`...` returns () => Promise<string> - str.scenarios(args) returns () => string - str.data(title, items) returns () => string - Remove StrPlaceholder wrapper, just use functions
…s, and more button - Add onContextMenu prop to TokenItem with (event, token, context) signature - Add long-press support (500ms) for touch devices - Add more button (IconDotsVertical) when onContextMenu is provided - Refactor WalletTab to use Sheet-based action menu instead of DropdownMenu - Add token-item-actions.test.tsx with 9 tests for the feature
- str`` tagged template returns () => Promise<string> - str.scenarios(args) formats commands based on runtime mode (CLI vs MCP) - str.data(title, items) formats data sections by mode - Resolve async descriptions in meta.mcp.ts with WorkflowNameContext - Update task.workflow.ts to use str template for start workflow
- Add WithContextMenu and ContextMenuList stories to token-item.stories.tsx - Fix DestroyPage story to remove non-existent imports - Create token-item-context-menu.spec.ts with 3 tests for context menu feature - Add baseline screenshots for visual regression testing
- Add token-context-menu.mock.spec.ts with 14 tests - Test more button click, long press, right click triggers - Test transfer and destroy action navigation - Test main asset restriction (no destroy option for BFM) - Add baseline screenshots for visual regression
- Fix SendPage: move useSend hook before code that references state/setAsset (fixes 'Cannot access state before initialization' error) - Add menuItems prop to TokenItem for DropdownMenu-based actions - Export TokenMenuItem type from token components - Update TokenList and WalletAddressPortfolioView to support menuItems - Refactor WalletTab to use tokenMenuItems instead of Sheet-based menu - Remove Sheet import and action sheet state from WalletTab
…le UX - Replace div-based layout with shadcn Item component (ItemMedia, ItemContent, ItemTitle, etc.) - Replace DropdownMenu with ContextMenu for touch-friendly interaction - ContextMenu triggered by right-click (desktop) or long-press (mobile) - Entire item becomes the context menu trigger (no small button to tap) - Add context-menu.tsx and item.tsx from shadcn base-ui - Update tests to use new data-slot selectors - Remove deprecated more button test (no longer applicable)
- Remove ContextMenu and long-press logic for simpler UX - Use DropdownMenu triggered by more button (⋮) click - Keep Item component from shadcn for consistent styling - Update tests to reflect new menuItems behavior
- Remove ItemActions wrapper from DropdownMenu for proper flex layout - Increase more button touch target to 44x44px (size-11) - Add overflow-visible to ItemMedia to prevent ChainIcon clipping - Use percentage-based sizing for ChainIcon (40% of parent)
This reverts commit 27f3d11.
- Add fixedDecimals='auto' mode that adapts decimals based on container width
- Use ResizeObserver pattern from AddressDisplay for responsive behavior
- Canvas-based text measurement for performance (no reflow)
- Three display modes: auto (default), true (full), false (hidden)
- Update AnimatedNumber/AnimatedAmount to support auto mode
- Add fixedDecimals={true} to confirmation dialogs and FeeDisplay
- Update tests to use aria-label queries for auto mode
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
This PR implements the destroy (burn) asset feature for BioForest chain and includes several UI/UX improvements.
Features
UI/UX Improvements
fixedDecimals='auto'mode for responsive amount displayTechnical Changes
Files Changed
src/components/asset/asset-selector.tsx- Refactored to use Selectsrc/components/common/amount-display.tsx- Added auto modesrc/components/token/token-item.tsx- Added dropdown menusrc/pages/destroy/- New destroy page