Ideas for cleanup, refactoring, and features. Not prioritized - pick what makes sense.
Goal: Unify all 58 story files with consistent patterns, fix broken config, add missing features.
- Remove broken theme.tsx - References non-existent
my-theme-folder - Enable modes.ts - Mobile/desktop viewport modes defined but not wired up
- Move styles import to preview.tsx - Stop requiring manual import in every story
- Add default layout parameter - Set global
centeredorpaddedlayout
Create standard story template with:
- Explicit
titlefollowing{Category}/{ComponentName}pattern -
parameters.layout(centered for atoms/molecules, fullscreen for pages/organisms) -
argTypeswith controls and descriptions - Multiple stories showing variants (not just
Primary)
Atoms (25 files): ✅
- ActionButton.stories.tsx - Added title, argTypes
- Badge.stories.tsx - Added title, argTypes, multiple variants
- BaseButton.stories.tsx - Added title, argTypes
- CollapsableColumns.stories.tsx - Added title, argTypes, fullscreen layout
- DateSeparator.stories.tsx - Added title, argTypes, multiple variants
- File.stories.tsx - Added title, argTypes
- FormInput.stories.tsx - Already good
- Icon.stories.tsx - Added title, argTypes, AllIcons gallery
- Image.stories.tsx - Added title, argTypes
- Link.stories.tsx - Added title, argTypes, multiple variants
- LinkPreview.stories.tsx - Added title, argTypes
- Loader.stories.tsx - Added title
- Logo.stories.tsx - Added title, argTypes, LogoPic variants
- MessageHeader.stories.tsx - Added title, argTypes
- Modal.stories.tsx - Already good
- ProfilePic.stories.tsx - Added title, argTypes
- Resizer.stories.tsx - Added title, fullscreen layout, interactive demo
- SearchBox.stories.tsx - Added title, argTypes, multiple variants
- StatusLine.stories.tsx - Added title
- Tag.stories.tsx - Added title, argTypes, multiple variants
- Text.stories.tsx - Added title, argTypes, size variants
- ThemeButton.stories.tsx - Added title, argTypes, theme variants
- Toolbar.stories.tsx - Added title, argTypes, demo with icons
- Tooltip.stories.tsx - Added title, argTypes, multi-line variant
- Wrap.stories.tsx - Added title, argTypes
Molecules (25 files): ✅
- Attachments.stories.tsx - Added title
- Button.stories.tsx - Added title, argTypes, variants
- ButtonWithEmoji.stories.tsx - Added title, argTypes, variants
- ButtonWithIcon.stories.tsx - Added title, argTypes, variants
- ChannelCreateForm.stories.tsx - Already good
- ChannelLink.stories.tsx - Added title
- DescriptionBar.stories.tsx - Added title, argTypes, variants
- DiscussionHeader.stories.tsx - Added title
- Emoji.stories.tsx - Added title, argTypes, variants
- Files.stories.tsx - Added title
- LoadingIndicator.stories.tsx - Added title
- LoggedUser.stories.tsx - Added title, argTypes
- MessageBody.stories.tsx - Added title, argTypes
- MessageToolbar.stories.tsx - Added title
- NavButton.stories.tsx - Added title, argTypes, variants
- NavChannel.stories.tsx - Added title, argTypes, variants
- NavChannels.stories.tsx - Added title, argTypes
- NavUsers.stories.tsx - Added title, argTypes
- Reactions.stories.tsx - Added title
- ReadReceipt.stories.tsx - Added title
- TextMenu.stories.tsx - Added title, argTypes
- TextWithIcon.stories.tsx - Added title, argTypes, variants
- ThreadInfo.stories.tsx - Added title, argTypes
- ThreadLink.stories.tsx - Added title, argTypes
- UserMention.stories.tsx - Added title, argTypes, variants
Organisms (4 files): ✅
- EmojiSearch.stories.tsx - Added title
- Input.stories.tsx - Added title, loader, container wrapper
- Message.stories.tsx - Added title, argTypes
- Workspaces.stories.tsx - Added title, fullscreen layout
Pages (4 files): ✅
- ErrorPage.stories.tsx - Added title, argTypes, variants, fullscreen layout
- LoginPage.stories.tsx - Added title, argTypes, fullscreen layout
- PasswordResetPage.stories.tsx - Added title, argTypes, variants, fullscreen layout
- RegistrationPage.stories.tsx - Added title, argTypes, fullscreen layout
Audit completed: 12 components without stories identified, 3 added, 9 skipped (internal/complex).
Added:
- PasswordResetPage.stories.tsx
- Workspaces.stories.tsx
- DescriptionBar.stories.tsx
Skipped (not practical): InputChannelSelector, InputEmojiSelector, InputUserSelector (internal input selectors), Conversation, MessageListRenderer, MessageListScroller, Pins, Search, Sidebar (heavy context/router dependencies)
- EmojiSearch infinite loop - cached Fuse instance (PR #252)
- Input organism story - added loader and container wrapper
- Message story broken images - mocked getUrl for placeholder images (PR #254)
- Fix pre-existing TypeScript errors (16 errors in base)
- Remove
anytypes from backend core (serializers, bus, command/query, repos, HTTP/CLI) — PR #272 - Remove
anytypes from storage, encryption, config, migrate, tools modules — PR #273 - Remove
anytypes from API module (deno/api/) — PR #274 - Remove
anytypes from frontend — client, plugins, utils, models, components — PR #275 - Remove
anytypes from test files (chat.ts helper, 14 test files, users.ts) — PR #276 - Fix
style: anyprop inActionButton.tsx— typed asstring(PR #275) - Remove
@ts-ignorecomments indeno/api/files.ts(5+ instances) - Standardize Props interface naming
- Remove unused
styleprop fromActionButton.tsx - Audit and remove
window.Chat = pluginsexposure incore/plugins.ts - Clean up unused imports across component files
- Address TODO/FIXME comments (4 remaining):
deno/api/messageTypes.ts:105- "make this a separate entity"deno/server/core/message/flatten.ts:9- mentions/channel links searchdeno/server/inter/http/routes/auth/getSession.ts:13-14- 2 FIXMEs marked "remove"
- React version mismatch - ESLint now uses 'detect' instead of hardcoded 18.2 (PR #255)
- npm packages updated - Updated within semver range: Sentry, Storybook, Vite, React Router, etc. (PR #255)
- @std library aligned - Server @std versions now match root (assert, path, uuid) (PR #255)
- MongoDB aligned - Server now uses 6.19.0 matching root (PR #255)
- deno.lock regenerated - Clean lock file with aligned versions (PR #255)
- Valibot version aligned - Server updated from 0.31.1 to 1.1.0 (BaseSchema→GenericSchema, transform type fixes)
- Chromatic major update - 13.3.5 → 15.0.0 (DEFERRED - review changelog first)
- @planigale versions - Audited: 5 packages at latest versions, no conflicts (different packages, not version conflicts)
- Replace ~41
console.*calls in app source with structured logging - Replace ~27
console.*calls in deno/server with proper logger - Add proper logging abstraction
- Update
.eslintrc.cjsReact version - Now uses 'detect' for auto-detection (PR #255) - Add TypeScript-specific ESLint rules
- Re-enable
no-unused-varsindeno.jsonc(currently excluded) - Review
skipLibCheck: truein tsconfig - masks type issues - Add
.prettierrcfor consistent formatting
- React components - 0 test files for 90+ components (63 have stories)
- Add unit tests for core models (
app/src/js/core/models/) - Add tests for context providers
- Deno backend - 23 test files exist (all integration tests in
inter/http/routes/__tests__/), but gaps remain:deno/server/core/— no unit tests for commands, queries, or domain logic- Core models (channel.ts, message.ts, user.ts)
- Encryption module utilities
- Set up visual regression testing with Storybook
Problem: Users and channels in the side panel have inconsistent hover styles - one has rounded corners, the other does not.
- Investigate all hover styles in NavChannels and NavUsers components
- Identify other potential inconsistencies (padding, colors, transitions, border-radius)
- Unify the styling to create a consistent look and feel
Files to check:
app/src/js/components/molecules/NavChannel.tsxapp/src/js/components/molecules/NavChannels.tsxapp/src/js/components/molecules/NavUsers.tsx
Problem: deno/api/mod.ts is 660+ lines with 80+ methods (God object pattern)
- Split into domain-specific modules (auth, channels, messages, users)
- Separate SSE management from HTTP requests
- Extract event handling into dedicated module
- Remove direct localStorage/fetch dependencies (inject instead)
Problem: 10 context providers with similar patterns
- Audit which contexts are actually needed
- Create generic hook factory for common
useContext+ error pattern - Consider unified state management (MobX is already used, consolidate)
Problem: 3 button components with overlapping functionality
BaseButton.tsx(88 lines)Button.tsx(45 lines) - wraps BaseButton with tooltipActionButton.tsx(33 lines)- Consolidate into single flexible Button component
Problem: Multiple error types without consistent handling
- Fix blank screen on non-existent/loading channels —
getThread()/getMessages()now return null instead of throwing, Router gates onisLoading, channels upserted into store on navigation - Audit error classes in
deno/server/core/errors.tsanddeno/server/inter/http/errors.ts - Create unified error handling pattern
- Standardize error responses across API
Problem: 57 instances of direct repo.* calls scattered throughout
- Add abstraction for common operations (exists check, batch ops)
- Centralize query logic
Problem: Component hierarchy (atoms/molecules/organisms/pages) is inconsistent
Audit Results: 72 components (25 atoms, 30 molecules, 10 organisms, 7 pages)
- Move
ActionButton.tsx→molecules/(has business logic) (PR #257) - Move
Toolbar.tsx→molecules/(provides context) (PR #257) - Split
ProfilePic.tsx(192 lines) →ProfilePicBase+ProfilePicWithStatus - Split
SearchBox.tsx→ pureSearchBoxInput(atom) +SearchBox(molecule) (PR #260)
- Extract
TooltipTagatom from DiscussionHeader + NavChannel (50+ LOC saved) (PR #257) - Extract
SectionHeaderatom from NavChannels + NavUsers (30+ LOC saved) (PR #257) - Extract
FlexRowutility atom (used in 6+ molecules) (PR #260) - Extract
MessageInfomolecule from Message organism (PR #260)
- Create
BaseInputSelectorfrom InputChannelSelector/UserSelector (200+ LOC saved) (PR #257) - Extract
FileListSectionfrom Files.tsx
- Refactor
Modal.tsx— currently exports separate styled components (ModalOverlay,ModalContainer,ModalHeader,ModalCloseButton); consider proper compound component pattern - Review
Tooltip.tsxcontext complexity (currently 46 lines, low-medium) - Consider splitting
Message.tsx(230 lines) into sub-organisms
- Define and document project architecture rules (
docs/ARCHITECTURE.md) - Establish coding conventions and patterns (
docs/CONVENTIONS.md) - Create decision records for key architectural choices (
docs/adr/— 14 ADRs, including ADR 014 repository pattern via PR #258) - Add CLAUDE.md with project guidance and git workflow rules (PR #261)
- Add linting/tooling to enforce rules where possible (PR #259 open — ESLint atomic design import rules)
Problem: Entity shapes are defined in 5 places (API types, backend types, Valibot command schemas, HTTP JSON schemas, frontend models). Adding/removing a property requires updating multiple files — frequent source of bugs. Goal: Use Valibot entity schemas as the single source of truth. Repos validate data through schemas on read/write, replacing hand-written serializers.
- Define canonical Valibot schemas for all entities (Message, Channel, User, Session, Badge, Invitation, Emoji)
- Derive TypeScript types via
v.InferOutput— replace hand-written types indeno/server/types.tsanddeno/api/types.ts - Use
v.parse(schema, raw)in repo read path — replacesdeno/server/infra/repo/serializer.tsdeserialize - Use schema-derived types in repo write path — replaces serializer serialize
- Derive command/query input schemas from entity schemas via
v.pick/v.partial - Remove
deno/server/core/serializer.ts(EntityId→string conversion) — no longer needed with string IDs - Frontend models
implementsderived types for compiler-enforced sync
Goal: Extract file/attachment metadata from messages into dedicated database structure with proper relations.
- Scan all database messages - Iterate through existing messages to identify attachments
- Design file database structure - Create schema for file metadata (type, size, url, mime, thumbnail, etc.)
- Implement file entity/table - Add database model for files
- Create relations - Establish message <-> file <-> channel relationships
- Migration script - Extract attachment info from messages into new file structure
- Update message handling - Modify message creation/retrieval to use new file relations
- Verify data integrity - Ensure all attachments migrated correctly
- Markdown support in messages - Parse and render markdown formatting when sending/displaying messages
- Web/desktop notifications - Push notifications for new messages and mentions
- Channel files browser - Dedicated view to browse/search all files shared in a channel
- Frontend observability - Error reporting, logging, stats, and diagnostics dashboard
- Splash screen - Add proper loading/splash screen on app startup
- Smooth channel loading transition - Replace full-screen "Loading..." text with inline loading indicator in channel view to avoid screen blink when switching channels
- Release process - Fix release workflow, consider bundled/binary distribution
- Created: 2026-02-06
- Last updated: 2026-02-09
- Progress:
- ✅ Section 1: Storybook Cleanup - COMPLETE
- PR #249: Config fixes
- PR #250: Atom stories (25 files)
- PR #251: Molecule/organism/page stories (28 files)
- PR #252: EmojiSearch infinite loop fix
- PR #253: Missing stories (DescriptionBar, Workspaces, PasswordResetPage)
- PR #254: Message story image fix
- 🔄 Section 2: Code Cleanup - IN PROGRESS
- PR #255: Dependency updates (npm packages, @std alignment, ESLint React version) <<<<<<< HEAD
- PRs #272-276: Remove
anytypes across codebase (~120 instances) ======= - PR #272: Remove
anytypes from backend core - PR #273: Remove
anytypes from storage, encryption, config, migrate, tools <<<<<<< HEAD - PR #274: Remove
anytypes from API module =======
- ✅ Section 1: Storybook Cleanup - COMPLETE
origin/dev origin/dev
- 🔄 Section 3: Architecture Refactoring - IN PROGRESS
- ✅ 3.7 Documentation: ARCHITECTURE.md, CONVENTIONS.md, 14 ADRs, CLAUDE.md
- PR #256: Architecture docs
- PR #258: ADR 014 repository pattern
- PR #261: CLAUDE.md
- ✅ 3.6 Atomic Design Phases 1-3 complete:
- PR #257: ActionButton/Toolbar moved, TooltipTag/SectionHeader/BaseInputSelector extracted
- PR #260: SearchBoxInput/FlexRow atoms, MessageInfo molecule extracted
- 🔄 PR #259 (open): ESLint atomic design import rules + CI integration
- ✅ 3.7 Documentation: ARCHITECTURE.md, CONVENTIONS.md, 14 ADRs, CLAUDE.md