fix(storybook): resolve molecules layer rendering issues#240
Merged
Conversation
- Add viteFinal config to inherit define/alias from vite.config.ts - Fix emoji mock data to use hex codes instead of Unicode characters - Add missing channel mocks (toolbar-test, test, unknown-channel) - Fix TextMenu.stories.tsx import path for InputContext - Convert MessageToolbar and Reactions stories to render pattern to ensure loaders run before app.getMessages() is called - Add useFileUrl hook and isUserActive utility - Refactor LoggedUser to base/connected pattern - Remove unnecessary observer wrappers from Files and NavUserButton - Update Storybook deps to v10.2.3 and add playwright for testing - Add check-storybook.mjs for automated story validation Storybook pass rate improved from 0% to 97.5% (119/122 stories) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename useFileUrl.ts to fileUrl.ts and functions to getFileUrl, getThumbnailUrl, getDownloadUrl (they're not React hooks) - Extract magic number to ACTIVE_USER_THRESHOLD_MS constant in utils.ts - Add proper TypeScript types to Attachments.stories.tsx - Add proper TypeScript types to TextMenu.stories.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Fixes Storybook configuration issues that were causing molecules and atoms stories to fail rendering. The pass rate improved from 0% to 97.5% (119/122 stories now render correctly).
Changes
Storybook Configuration
viteFinalconfig to.storybook/main.tsto inheritdefine(API_URL, APP_VERSION, APP_NAME) andresolve.aliassettings from vite.config.tsStory Fixes
InputContextfrominput.tsxinstead of incorrectuseInput.tsxargstorenderpattern to ensureapp.getMessages()is called at render time after loaders runArchitectural Refactoring
useFileUrlhook for centralized URL generationisUserActiveutility function to utils.tsobserverwrappers from Files and NavUserButton componentsNew Stories
Dependencies
Testing
check-storybook.mjsPlaywright script for automated story validationnode check-storybook.mjs(requires Storybook running on port 6006)