diff --git a/ERRORS.md b/ERRORS.md new file mode 100644 index 0000000..7c4f4e7 --- /dev/null +++ b/ERRORS.md @@ -0,0 +1,80 @@ +# Monkey Test Report + +Date: 2025-12-29 + +## Summary + +Tested all pages and interactive elements across the application. + +## Issues Found and Fixed + +### ~~High Priority~~ ✅ FIXED + +#### ~~1. "untitled page" text displayed on all pages~~ + +- **Location**: Bottom of every page (svelte-announcer accessibility element) +- **Root cause**: No page titles set, causing SvelteKit's screen reader announcer to say "untitled page" +- **Fix**: Added `...` to all pages + +### ~~Medium Priority~~ ✅ FIXED + +#### ~~2. "Loading messages..." persists in empty channels~~ + +- **Location**: `apps/desktop/src/components/chat/MessageList.svelte` +- **Root cause**: Condition checked `messagesData.length > 0` instead of checking loading state +- **Fix**: Added proper `isLoading` check from useQuery hook + +#### ~~3. Add Member uses browser prompt() dialog~~ + +- **Location**: `apps/desktop/src/routes/orgs/[orgId]/settings/` +- **Root cause**: Used native `prompt()` and `confirm()` for user input +- **Fix**: Created proper DaisyUI modal in MemberList.svelte + +### ~~Low Priority~~ ✅ FIXED + +#### ~~4. DM search shows no results indication~~ + +- **Location**: `apps/desktop/src/components/dms/UserSearch.svelte` +- **Root cause**: No else condition for empty results +- **Fix**: Added "No users found" message when search completes with no results + +## Features Tested (All Working) + +- [x] Organization selection page +- [x] Organization switching +- [x] Channel navigation (general, test-channel) +- [x] Channel creation modal +- [x] Message input and sending +- [x] Message reactions (add/remove) +- [x] Message menu (Reply, Add Reaction, Show Reactions, Pin, Edit, Delete) +- [x] Message pinning +- [x] Search messages +- [x] Poll creation form +- [x] Emoji picker (all tabs, search, favorites) +- [x] User profile/personalization settings (name change, profile picture) +- [x] Organization settings (edit name/description) +- [x] Organization member list +- [x] New organization creation page +- [x] Signin redirect (when already logged in) + +## Files Modified + +1. `apps/desktop/src/routes/+page.svelte` - Added page title +2. `apps/desktop/src/routes/signin/+page.svelte` - Added page title +3. `apps/desktop/src/routes/signout/+page.svelte` - Added page title +4. `apps/desktop/src/routes/orgs/new/+page.svelte` - Added page title +5. `apps/desktop/src/routes/orgs/[orgId]/+page.svelte` - Added page title +6. `apps/desktop/src/routes/orgs/[orgId]/settings/+page.svelte` - Added page title, updated onAddMember callback +7. `apps/desktop/src/routes/orgs/[orgId]/personalization/+page.svelte` - Added page title +8. `apps/desktop/src/routes/orgs/[orgId]/chat/[channelId]/+page.svelte` - Added page title +9. `apps/desktop/src/components/chat/MessageList.svelte` - Fixed loading state logic +10. `apps/desktop/src/routes/orgs/[orgId]/settings/MemberList.svelte` - Added modal for Add Member +11. `apps/desktop/src/routes/orgs/[orgId]/settings/member-utils.ts` - Refactored to throw errors instead of using alerts +12. `apps/desktop/src/routes/orgs/[orgId]/settings/settings-controller.svelte.ts` - Updated to accept email parameter +13. `apps/desktop/src/components/dms/UserSearch.svelte` - Added "No users found" message + +## Test Environment + +- Browser: Chrome (via DevTools MCP) +- URL: http://localhost:5173 +- User: Dev User (dev@example.com) - Admin role diff --git a/TODOS.md b/TODOS.md new file mode 100644 index 0000000..5b0c610 --- /dev/null +++ b/TODOS.md @@ -0,0 +1,46 @@ +# TODOS + +Generated: 2025-12-24 + +## Batch 1: Critical Security Fixes + +- [ ] Fix SQL injection in message search (`apps/server/src/domains/messages/service.ts` - escape `ilike` pattern) +- [ ] Add file path sanitization (`apps/server/src/domains/files/service.ts` - prevent `../` traversal) +- [ ] Add WebSocket auth re-validation on subscribe (`apps/server/src/ws/index.ts` - check permissions on subscribe) +- [ ] Add rate limiting middleware (`apps/server/src/middleware/` - create rate-limit.ts) + +## Batch 2: High-Impact Performance Fixes + +- [ ] Fix N+1 query in message list (`apps/server/src/domains/messages/service.ts` - include reactions/attachments in query) +- [ ] Remove duplicate useQuery per message (`apps/desktop/src/components/MessageItem.svelte` - pass reactions as props) +- [ ] Deduplicate permission checks (`apps/server/src/domains/permissions/service.ts` - cache within request context) +- [ ] Lazy load CodeMirror and emoji-picker (`apps/desktop/src/components/` - use dynamic imports) + +## Batch 3: Code Quality & Dead Code Removal + +- [ ] Delete unused example/ directory (`.storybook`, `apps/desktop/src/example/`) +- [ ] Remove console.log/error statements (9 files - use proper logger or delete) +- [ ] Split large components: `MessageItem.svelte` (143 lines → ~50 lines each) +- [ ] Split large components: `ChannelList.svelte` (141 lines → ~50 lines each) + +## Batch 4: Accessibility Fixes + +- [ ] Add aria-labels to icon buttons (`apps/desktop/src/components/` - all IconButton components) +- [ ] Replace alert() with toast notifications (`apps/desktop/src/` - create toast utility) +- [ ] Add form labels for WCAG compliance (`apps/desktop/src/routes/` - all form inputs) +- [ ] Standardize placeholder text language (`apps/desktop/src/` - choose Japanese or English consistently) + +## Deferred (Needs User Confirmation) + +- [ ] DISABLE_AUTH flag - clarify production usage policy (`apps/server/src/middleware/auth.ts`) +- [ ] Add CSRF protection - confirm if needed for API-only backend (`apps/server/src/middleware/`) +- [ ] Add security headers - confirm headers policy (`apps/server/src/index.ts`) +- [ ] shadow-2xl usage - confirm if Clarity design principles apply (`apps/desktop/src/components/`) +- [ ] Empty state CTAs - requires design decisions (multiple files) + +## Rejected (Low Value / Out of Scope) + +- Duplicate logic in unread.ts - minimal impact, refactor during feature work +- Test coverage improvements - separate test-focused sprint needed +- Flaky waitForTimeout(500) - address when writing new E2E tests +- Page Object Model - requires significant test refactoring diff --git a/apps/desktop/src/components/app/ChatApp.svelte b/apps/desktop/src/components/app/ChatApp.svelte index b7cf318..9a4c6aa 100644 --- a/apps/desktop/src/components/app/ChatApp.svelte +++ b/apps/desktop/src/components/app/ChatApp.svelte @@ -53,9 +53,9 @@ {:else}
-

チャンネルを選択

+

Select a Channel

- 左のサイドバーからチャンネルを選んでください + Choose a channel from the sidebar

diff --git a/apps/desktop/src/components/app/OrganizationSidebar.svelte b/apps/desktop/src/components/app/OrganizationSidebar.svelte index 72014fb..ab8b004 100644 --- a/apps/desktop/src/components/app/OrganizationSidebar.svelte +++ b/apps/desktop/src/components/app/OrganizationSidebar.svelte @@ -16,25 +16,25 @@