Commit Graph

75 Commits

Author SHA1 Message Date
congsh ceafc873c7 feat: game cover file upload + fix game visibility rules
- Change game cover field from URL text to file upload (PocketBase migration)
- AddGameDialog now supports drag-and-drop image upload instead of URL input
- Add getGameCoverUrl() helper using pb.files.getUrl() for cover display
- Fix games listRule/viewRule: group.members.id syntax doesn't work in PB 0.22,
  changed to group.members ~ @request.auth.id for correct member visibility
- Update changelog with all v0.3.5 entries

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 19:09:57 +08:00
congsh 625645dad4 fix: approval queue loading timing and sync issues
- Fix GroupMembersPanel join requests not loading when navigating
  from homepage (onMounted timing issue), replaced with watch
- Fix GroupView pending count not syncing after reject/approve,
  added requestHandled event communication between components
- Update changelog with all v0.3.5 fixes and new features

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 17:21:04 +08:00
congsh a762a5bb4c feat: improve join request visibility for admins and applicants
- Add prominent pending join request badge on GroupView header
  with pulse animation for admins/owners
- Clicking badge smoothly scrolls to request list with highlight
- Add "My Join Requests" section on Profile page
- Show status (pending/approved/rejected), timestamp, and reject reason
- Add API: getMyJoinRequests() to fetch user's full request history

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:46:29 +08:00
congsh a062889a11 fix: bug fixes and UX improvements (v0.3.5)
- Fix clipboard copy error in HTTP environment with execCommand fallback
- Fix team invite page not loading user groups, always showing "join group first"
- Fix JoinGroupPage isMember check using group object instead of user ID
- Fix cancelRSVP deleting all users' RSVP records instead of current user's
- Fix event detail not loading event data itself
- Fix event comment avatar URL missing PocketBase baseUrl prefix
- Fix event creation missing endTime > startTime validation
- Fix event manage/delete permission split (creator+owner vs creator+owner)
- Fix event create button only visible to admins, now all members can create
- Fix event expand not subscribing to comments/RSVP realtime updates
- Fix event relative time not using status field
- Remove duplicate create/join group buttons from header and welcome bar
- Refactor team invite link to use API function

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 22:19:18 +08:00
congsh 2fec2108ca feat: onboarding optimization, invite links, admin roles, and event board
- Home: hide duplicate create/join buttons when user has no groups
- Invite links: /join/group/:id and /join/team/:id pages for one-click joining
- Admin: group admins field, ownership transfer, member management toggle
- Events: new events collection with RSVP (going/interested/maybe) and comments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 17:27:24 +08:00
congsh 0cde794c85 chore: update gitignore for electron-update and docs/plans
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 16:14:33 +08:00
congsh 7f17dc826e refactor(deploy): separate Dev/UAT into independent full-stack environments
- Each environment now runs its own PB + LiveKit + Voice Token + frontend
- UAT LiveKit: 7890, Voice Token: 7893 (separate from Dev 7880/7883)
- Remove docker-compose.backend.yml, merge into dev compose
- Delete duplicate bulletin migration files that caused PB crash on startup
- Update CLAUDE.md, nginx configs, and .env files accordingly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 16:12:18 +08:00
congsh 01412a0a94 feat(electron): separate dev/uat build targets with isolated update channels
- Add build.dev.json to override publish.url for dev environment
- Add build:dev and build:uat scripts; each sets its own feed URL
- copy-to-nas.js now accepts env argument; outputs to
  electron-update/{dev|uat}/ locally and on NAS
- docker-compose volume mounts updated to serve from env subdirs
- Remove stale artifacts from electron-update root

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:35:07 +08:00
congsh 671933d960 fix(electron): place update files in GameGroup2/electron-update subdir
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:18:38 +08:00
congsh 6b3cd288b1 feat(electron): add persistent auth, auto-updater, and NAS copy script
- Integrate electron-store for persistent PocketBase auth backup
  across localStorage clears and app reinstalls
- Switch build target from portable to nsis to generate latest.yml
  for electron-updater generic provider
- Add user confirmation dialogs before download and before install
- Add post-build script to copy .exe/.yml/.nupkg to NAS share and
  local electron-update/ directory for nginx volume mount
- Mount ./electron-update into frontend nginx containers via
  docker-compose for automatic update file serving

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:38:48 +08:00
congsh d3ef22f06e feat(bulletin): add detail dialog for full bulletin content viewing
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 14:07:51 +08:00
congsh 068708bbd7 Merge branch 'uat' of http://jiulu-gameplay.com.cn:13001/congsh/gamegroup2 into uat 2026-04-21 13:00:33 +08:00
congsh f99c44f716 feat(bulletin): add group bulletin board (信息公示板)
- Add bulletin_posts and bulletin_reads PocketBase collections with migrations
- Add BulletinPost/BulletinRead types and priority levels (low/normal/high/urgent)
- Add bulletin API (CRUD, read tracking, realtime subscription)
- Add bulletin Pinia store with pinned/normal sections and expiration filtering
- Add BulletinPinned header component for pinned announcements
- Add BulletinBoard tab component with sectioned list layout
- Add BulletinPostCard with priority tags, unread dots, and hover actions
- Add CreateBulletinDialog with title, content, priority, pinned, expiresAt
- Integrate bulletin tab into GroupView with Bell icon and real-time updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 12:46:35 +08:00
congsh 860ad7cbd8 docs: add v0.3.3 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 20:00:27 +08:00
congsh 3c2b68bbc3 fix(electron): enable mediaDevices on HTTP origins and fix voice auth
- Add --unsafely-treat-insecure-origin-as-secure flag for dev/uat URLs
- Set auto-granted permission handlers for mic/camera in main process
- Adapt useVoiceRoom error message for Electron (no Chrome flags hint)
- Add debug logging to voice-token service and frontend voice API

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 18:08:05 +08:00
congsh 4c7152ff50 feat(electron): add Electron desktop wrapper
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:54:27 +08:00
congsh 10574845f6 docs: add v0.3.2 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:48:35 +08:00
congsh 6b9fef1d69 fix(voice): add clear error message for HTTP mediaDevices restriction
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:42:29 +08:00
congsh c01aef48bd fix(voice): set LiveKit node-ip to host IP for WebRTC ICE connectivity
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:39:01 +08:00
congsh 2ed582faf0 fix(voice): upgrade LiveKit server from v1.7 to v1.10 for client v2 compatibility
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:36:01 +08:00
congsh f96652a8aa fix(voice): fix LiveKit LIVEKIT_KEYS env format in docker-compose
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:29:47 +08:00
congsh 5d434ead6f feat(voice): add real-time voice room with LiveKit
- LiveKit WebRTC SFU container in docker-compose
- Voice token microservice (Node.js + Express)
- VoiceRoom page with member grid and controls
- useVoiceRoom composable for LiveKit connection
- Voice entry button in TeamSessionPanel
- Nginx proxy for voice-token service API

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:24:28 +08:00
congsh 9d224e2fcd feat(voice): add livekit-client dependency
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:12:51 +08:00
congsh 81abb4b220 feat(voice): add LiveKit server container to docker-compose
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 21:06:21 +08:00
congsh c3d34c4660 docs: add v0.3.1 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:30:55 +08:00
congsh d528358867 feat: 玩家黑名单 - 记录外部平台坑玩家
- 新增 player_blacklist collection 迁移
- 添加 PlayerTag/PlayerBlacklistEntry 类型定义和 API
- 创建 PlayerBlacklistMain + CreatePlayerBlacklistDialog 组件
- BlacklistView 支持 Tab 切换游戏/玩家黑名单
- 支持搜索、标签筛选、严重程度筛选、实时订阅

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:03:55 +08:00
congsh 60ad9a04cd feat: phase 4 - 积分竞猜和游戏黑名单 v0.3.0
竞猜功能:发起竞猜、下注、关闭、开奖、奖池分配
黑名单功能:标记游戏、按原因/严重程度筛选、详情展开
修复:双重结算、TOCTOU竞态、订阅泄漏、选项选择兼容性

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 00:21:43 +08:00
congsh 2d56df940d docs: add v0.2.0 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:44:07 +08:00
congsh fdd1ae0929 fix: add $autoCancel:false to games API calls
GamesLibrary auto-cancellation error was caused by missing
$autoCancel:false on all games.ts PocketBase SDK calls.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:40:55 +08:00
congsh 19bf317d85 fix(phase3): description optional, restore nginx to host IP
- Make ledger description field optional (was required, caused 400)
- Revert nginx.conf back to 192.168.1.14:8090 (host IP, reliable)
- Keep docker-compose port mapping as 8090:8090
- Add $autoCancel:false to ledger/asset API calls

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:32:06 +08:00
congsh 221a8d7108 fix: restore Dev PocketBase port mapping to 8090
Was 8711:8090 but Dev PB should be on host port 8090 per CLAUDE.md
environment table. UAT remains on 8712.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:22:43 +08:00
congsh 09a7fe7708 fix: remove duplicate migrations, fix Dev nginx proxy target
- Remove 6 duplicate Phase 2 migration files (1776500001-0006) that
  failed on restart and blocked Phase 3 migrations from running
- Fix Dev nginx.conf proxy target from 192.168.1.14:8090 to
  gamegroup-pb:8090 (Docker internal DNS) since host port 8090 is
  not exposed (mapped as 8711:8090)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:14:11 +08:00
congsh dc11ef90fd fix(phase3): add $autoCancel:false to prevent SDK auto-cancellation
PocketBase JS SDK auto-cancels pending requests when a new request
targets the same collection. This causes errors when loadLedgers and
getLedgerSummary run in parallel via Promise.all. Added $autoCancel:false
to all API calls in ledgers.ts and assets.ts, matching project convention.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:05:27 +08:00
congsh e4b730c8db fix(phase3): subscription leak, image mime type validation
- Ledger store: add stopSubscription() to properly clean up realtime
  subscriptions, matching asset store pattern
- LedgerList: call stopSubscription on unmount
- Assets migration: restrict image upload to image/* mime types
  (C3 updateRule is a known tradeoff — PocketBase lacks field-level
  permissions, frontend enforces edit restrictions instead)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 19:52:34 +08:00
congsh c5413644f9 feat: phase 3 - ledger and asset management
Add group expense tracking (ledger) and public asset inventory (asset) features.
Ledger supports income/expense recording with monthly summary. Asset tracks
group equipment with free-form holder transfer. Both are independent pages
accessible from GroupView navigation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 19:42:04 +08:00
congsh 625d0baf7d feat: v0.1.1 - poll editing, notifications, fixes
- Poll editing by creator (title, options, deadline)
- Notification panel with app notifications and click-to-navigate
- Poll creation notifies group members
- Invitation rejection notifies inviter
- Fix: notification createRule, timezone, autocancel, nginx, tab timing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 18:51:23 +08:00
congsh c5d3ac01ca feat: phase 2 - polls, memories, notifications, stats v0.1.0
- Group polls with option/rollcall modes, edit by creator, auto-settle
- Multimedia memories with upload, preview, inline video playback
- In-app notifications for poll/team/group events
- Points system and group stats dashboard
- Group detail tabs with icons (activity/polls/memories/stats)
- Fix: nginx file upload size, static cache blocking API, timezone, auto-cancel

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 18:19:46 +08:00
congsh 71742da600 docs: add v0.0.3 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 13:36:02 +08:00
congsh 3173525a2e feat: support nickname login and nickname uniqueness check v0.0.3
- Login: query user by name field, authenticate with username
- Register: add blur-triggered nickname uniqueness validation
- Requires PocketBase users collection listRule/viewRule set to public

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 13:35:41 +08:00
congsh 0a7dcbb6b8 fix: login page uses email only since username is auto-generated
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 13:11:54 +08:00
congsh 5cec2101af feat: support Chinese nickname in registration
- User input "昵称" stored in `name` field (supports Chinese)
- `username` auto-generated (PocketBase requires ASCII)
- Password rules displayed inline with real-time validation
- All UI displays prefer `name` over `username`

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 13:01:41 +08:00
congsh 262f946a4e feat: add changelog page with v0.0.1 and v0.0.2 entries
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 12:30:49 +08:00
congsh cfdbaf1095 feat: UI redesign v0.0.2 — color unification, navigation improvements, mobile support
- Unify color palette from mixed green/blue/purple to consistent green theme
- Sidebar: add text labels to create/join group buttons for discoverability
- Header: add quick action buttons (create group, join group, notifications)
- Mobile: add hamburger menu with slide-out sidebar and overlay
- Home: add prominent CTA buttons, onboarding card for empty state
- Join group dialog: add search-by-name mode alongside existing ID lookup
- Games library: inline group selector dropdown instead of external selection

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 12:24:20 +08:00
congsh 277a484f60 feat: UAT environment setup with separate PocketBase instance
- Add UAT PocketBase on port 8712 with separate pb_data_uat
- Add UAT nginx config proxying to UAT PB (port 8712)
- Update Dockerfile to support NGINX_CONF build arg
- Add .gitignore for .playwright-mcp/
- Auto-generated team_sessions migration

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 11:11:38 +08:00
congsh 7299128a34 fix: resolve SSE realtime ERR_INCOMPLETE_CHUNKED_ENCODING error
Add dedicated nginx location block for /api/realtime with:
- proxy_buffering off to prevent response buffering
- gzip off to avoid chunked encoding issues
- proxy_read_timeout 86400s for long-lived SSE connections
- Connection '' instead of 'upgrade' for SSE protocol

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 11:05:40 +08:00
congsh 12b2cdbc02 fix: sync user status changes across team lifecycle
- Accept invitation: update local userStore status to in_team
- Start game: update userStore status to in_team
- End game: update userStore status to idle, simplify endGame logic
- Add $autoCancel:false to endGame session fetch

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 10:59:10 +08:00
congsh 8d3cce814a fix: team invitation acceptance 404 error
- Relax team_sessions collection rules to allow authenticated users to view/update
- Reorder respondInvitation: join session before marking invitation as accepted
- Add $autoCancel: false to prevent request cancellation during invitation flow

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 10:52:48 +08:00
congsh 3ae141ba56 fix: member status visibility, team creation improvements, join approval flow
- Fix other members' status not visible due to users collection viewRule restriction
- Fix empty status treated as 'away' instead of 'idle' in membersByStatus
- Auto-set creator to 'in_team' status when creating team session
- Filter current user from idle members invite list
- Fix group store isGroupOwner using pb.authStore instead of localStorage
- Add nginx no-cache headers for index.html
- Add join_requests collection migration and join approval flow
- Update groups collection rules and add requireApproval field
- Add Memory types for Phase 2 planning

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 10:42:11 +08:00
congsh 4dac4bc751 fix: disable PocketBase SDK auto-cancellation on group API calls
SSE subscriptions trigger concurrent requests to the same endpoints,
causing auto-cancellation errors. Add $autoCancel: false to group
queries that get called from realtime event handlers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 10:04:26 +08:00
congsh 6b684f8600 fix: login persistence, username login, realtime refresh, group name uniqueness
- Remove loadFromCookie that overwrites valid localStorage auth data
- Set user status to idle on first login (was empty string)
- Default empty status to idle instead of away

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 09:56:11 +08:00