Feat/issues 662 663 664 665 - #708
Merged
Austinaminu2 merged 4 commits intoAug 30, 2026
Merged
Conversation
…sferEvent - Add timestamp field to TopUpEvent struct for event-shape consistency - Add timestamp field to StreamTransferEvent struct for event-shape consistency - Update both emit calls to capture and include the current ledger timestamp - This ensures all stream lifecycle events have a timestamp field for proper event indexing
…dmin checks - Create private require_admin(env: &Env) -> Result<Address, StreamError> helper - Replace repeated admin validation pattern in pause(), unpause(), and migrate() - Consolidates retrieval of admin address, NotInitialized error, and auth requirement - Reduces code duplication and improves maintainability
…n component - Create .storybook directory with main.ts and preview.ts configuration - Configure Storybook for Next.js with Tailwind CSS support - Add Storybook and related dependencies to package.json - Create comprehensive button.stories.tsx covering all variants and sizes - Include stories for: default, ghost, secondary, destructive variants - Cover all size options: xs, sm, default, lg, icon variants - Add disabled state examples and documentation
- Create comprehensive badge.stories.tsx with all color and variant combinations - Cover all badge variants: default, secondary, destructive, outline, ghost, link - Include practical examples for status badges (active, inactive, error, warning) - Add tag-like badge examples for common use cases - Include showcase story displaying all variants and common patterns - Provide reference documentation for component usage
|
@OZILSOLAR Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 four interconnected improvements across the FlowStar smart contract and frontend UI component library:
🔗 Smart Contract Enhancements (Soroban/Rust)
TopUpEventandStreamTransferEventfor proper downstream eventindexing
require_admin()helper to consolidate repeated admin validation logic across contract functions🎨 Frontend Infrastructure
component stories covering all variants and sizes
Detailed Changes
Issue #662: Add timestamp field to TopUpEvent and StreamTransferEvent
Problem: While most stream lifecycle events (StreamCreatedEvent, WithdrawEvent, CancelEvent, etc.) included timestamp fields, TopUpEvent and
StreamTransferEvent were missing this property. This inconsistency broke event indexing for downstream consumers.
Solution:
timestamp: u64field toTopUpEventstructtimestamp: u64field toStreamTransferEventstructenv.ledger().timestamp()and include it in the event payloadFiles Modified:
contracts/streaming/src/lib.rs(struct definitions + emit calls)Issue #663: Extract require_admin() helper and replace repeated validation
Problem: Four functions (
initialize(),pause(),unpause(), andmigrate()) contained repeated admin-check and initialization validationlogic, leading to code duplication and harder maintenance.
Solution:
require_admin(env: &Env) -> Result<Address, StreamError>helper function that:NotInitializederror if admin not foundpause(),unpause(), andmigrate()Files Modified:
contracts/streaming/src/lib.rs(new helper function + updated function implementations)Issue #664: Set up Storybook and add first stories for button component
Problem: The project lacked Storybook configuration and isolated component browsing capabilities, making it difficult for developers to view
components in different states.
Solution:
.storybook/main.ts- Main Storybook configuration for Next.js with proper story resolution and addon setup.storybook/preview.ts- Global preview configuration with Tailwind CSS and globals stylingpackage.json:storybook(dev) andstorybook:build(production)components/ui/button.stories.tsxwith comprehensive coverage:Files Created/Modified:
.storybook/main.ts(new).storybook/preview.ts(new)components/ui/button.stories.tsx(new - 180 lines)package.json(updated with Storybook deps and scripts)Issue #665: Add Storybook stories for badge component
Problem: No Storybook stories existed for the badge component, making it difficult to explore all color and variant combinations.
Solution:
components/ui/badge.stories.tsxwith complete documentation:Files Created:
components/ui/badge.stories.tsx(new - 178 lines)Testing Recommendations
Smart Contract Changes
Storybook
npm run storybookto start Storybook dev serverSummary of Files Changed
.storybook/main.ts | 19 +++++++++++++++++++
.storybook/preview.ts | 16 +++++++++++++++
components/ui/badge.stories.tsx | 178 ++++++++++++++++++++++++++++++++
components/ui/button.stories.tsx | 180 ++++++++++++++++++++++++++++++++
contracts/streaming/src/lib.rs | 41 +++++---
package.json | 10 +-
6 files changed, 425 insertions(+), 19 deletions(-)
Commits Included
d5b53ef- feat(Add a timestamp field to TopUpEvent and StreamTransferEvent for event-shape consistency #662): Add timestamp field to TopUpEvent and StreamTransferEvent2e1b215- feat(Extract require_admin() helper in the contract and replace repeated init/pause/migrate panics with typed errors #663): Extract require_admin() helper and consolidate admin checks603f621- feat(Set up Storybook and add first stories for components/ui/button.tsx #664): Set up Storybook and add first stories for button component8c5eb97- feat(Add Storybook stories for components/ui/badge.tsx #665): Add Storybook stories for badge componentCloses #662
Closes #663
Closes #664
Closes #665