283 Commits

Author SHA1 Message Date
david_bai 87ff5aab44 feat: add visual feedback for copy buttons in ShareCard
Add check icon feedback when copying RoomID and URL to clipboard:
- RoomID copy button now shows check icon for 2 seconds after copy
- URL copy button now shows check icon for 2 seconds after copy
- Consistent with existing QR code copy button behavior
v1.2.0
2026-03-28 10:36:34 +08:00
david_bai e4ca70d758 fix: resolve React hydration mismatch in ThemeToggle
The ThemeToggle component was causing hydration errors because the server
and client rendered different icons (Sun/Moon) based on the theme state.

Changes:
- Render a placeholder button until component is mounted
- Only render the actual theme icon after client-side hydration
- This ensures server and client HTML match during initial render

Fixes console error: 'Expected server HTML to contain a matching <circle> in <svg>'
2026-03-28 10:23:43 +08:00
david_bai c791c0820e chore: update backend package-lock.json
Update backend/package-lock.json to ensure dependency consistency.
This file should be committed to the repository as per npm best practices
for reproducible builds across all environments.
2026-03-28 08:02:10 +08:00
david_bai b81e39ac65 fix: restore QR code rendering and improve paste button label
- Restored QRCodeSVG component rendering in ShareCard for QR code display
- Fixed copy QR code and download QR code functionality
- Changed paste button label in SendTabPanel from 'Paste RoomID' to generic 'Paste'
- Keep 'Paste RoomID' label in RetrieveTabPanel where it's contextually appropriate
2026-03-28 08:02:04 +08:00
david_bai 7e781631bb chore(ui): clear remaining frontend warnings
Resolve the remaining lint warnings without changing behavior by fixing hook dependency lists, removing the icon naming false positive, and switching the YouTube thumbnail to next/image for compliant rendering.
2026-03-27 17:20:49 +08:00
david_bai 7a1ab18657 refactor(i18n): stabilize schema and restore locale translations
Align the next-intl message schema across components, hooks, and locale files so the frontend uses one canonical structure instead of compile-first workarounds. Restore Spanish, French, German, Japanese, and Korean translations to the new schema while narrowing clipboard hook dependencies to translation contracts.
2026-03-27 17:13:31 +08:00
david_bai 29897bea87 refactor(i18n): convert remaining useMessages to useTranslations
- FAQSection: useTranslations with dynamic keys via type assertion
- ClipboardApp: useTranslations for JSX, keep useMessages for hooks
- SendTabPanel: useTranslations for html and roomStatus namespaces
- RetrieveTabPanel: useTranslations for html, roomStatus, and ClipboardApp
- FileListDisplay: useTranslations for FileListDisplay namespace
- FileUploadHandler: useTranslations for fileUploadHandler namespace

Only ClipboardApp.tsx retains useMessages for hooks requiring full messages object.
2026-03-27 15:09:15 +08:00
david_bai 131d1e12f5 refactor(i18n): use native messages in clipboard panels
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:21:53 +08:00
david_bai 362a805c9b refactor(i18n): use native messages in faq section
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:21:53 +08:00
david_bai 2012412bc1 refactor(i18n): remove translation provider facade
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:21:53 +08:00
david_bai b1b663e1ce refactor(i18n): migrate clipboard action hook translations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:16:17 +08:00
david_bai d72f3d3860 refactor(i18n): migrate clipboard widgets to useTranslations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:16:08 +08:00
david_bai 529024eed7 refactor(i18n): migrate legal content translations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:16:08 +08:00
david_bai c0826c7d34 refactor(i18n): migrate about and help content translations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:16:08 +08:00
david_bai b364ef3c16 refactor(i18n): migrate blog list item translations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:15:46 +08:00
david_bai c845399856 refactor(i18n): migrate home sections to native next-intl hooks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:15:46 +08:00
david_bai 0ccefbd0c1 refactor(i18n): migrate shared chrome to useTranslations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:15:45 +08:00
david_bai b6193b662f refactor(i18n): migrate server routes to next-intl messages
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:04:28 +08:00
david_bai 6c93b1d995 build(i18n): add next-intl routing infrastructure
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:04:28 +08:00
david_bai cf529eed64 refactor(i18n): replace prop drilling with translation context
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:04:28 +08:00
david_bai 57004b3a1f refactor(i18n): normalize translation keys
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-27 14:04:28 +08:00
david_bai 8f6f0a9266 docs: add low-memory deployment guidance
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-26 07:24:03 +08:00
david_bai 83b835f19c docs: sync docker deployment guide with full-mode runtime behavior 2026-03-26 07:17:34 +08:00
david_bai 0e2cf068c8 fix(deploy): use same-origin API and include www CORS origin
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-26 07:09:03 +08:00
david_bai ae06c45324 fix(deploy): refresh full-mode edge config and frontend healthcheck
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-26 00:14:28 +08:00
david_bai fa8ca13283 chore: remove temporary docker-only cleanup notes 2026-02-28 13:36:43 +08:00
david_bai 201b36ed19 docs: require explicit --mode in Docker deployment guide 2026-02-28 13:36:26 +08:00
david_bai 927e227c29 docs: record docker-only cleanup execution 2026-02-28 12:39:04 +08:00
david_bai fd70fa35ca chore: remove PM2-based deploy scripts 2026-02-28 12:38:14 +08:00
david_bai de6199bbf2 chore: remove bare-metal ops assets under backend/docker 2026-02-28 12:37:57 +08:00
david_bai 3ce1ca58ea chore: remove bare-metal deployment guides 2026-02-28 12:37:30 +08:00
david_bai 0dfe627e25 docs: remove PM2/bare-metal references 2026-02-28 12:37:11 +08:00
david_bai 2b24dbef0e docs(playbook): remove bare-metal deployment entries 2026-02-28 12:35:59 +08:00
david_bai e0c31957cc docs: make Docker the only supported deployment path 2026-02-28 12:35:06 +08:00
david_bai 5c8df1867c docs: add docker-only cleanup plan 2026-02-28 12:35:02 +08:00
david_bai 1a0467b439 chore(doc):Fix the issue of missing content in some language blog posts 2025-12-30 12:06:34 +08:00
david_bai bb90d0c0fd chore(doc):Apply a unified bold underline style to the links 2025-12-27 10:50:04 +08:00
david_bai 4328cd0a1c chore(doc):Add blog cover image 2025-12-27 10:11:16 +08:00
david_bai 0b82fc2d47 chore(doc):Polish the blog and translate it 2025-12-26 20:51:06 +08:00
david_bai 49e20edd80 chore(merge):merge sub-branch into main 2025-12-24 12:14:52 +08:00
david_bai 30d7a6c27b chore(doc):rename AGENTS.md to AGENTS.en.md;Add a blog draft 2025-12-22 12:38:58 +08:00
david_bai 52bb56501e chore(doc):Add an English version of documents such as AGENTS.md and ai-playbook 2025-12-18 12:28:29 +08:00
david_bai cb9797d0e8 chore(doc):Split docs/ai-playbook/flows.zh-CN.md into multiple documents
- Simplify flows.zh-CN.md to an entry + quick reference, add "Quick Navigation" and in-depth reading links, original sections 6/7/9/10 are retained in the entry page with titles but changed to links.

  - Add in-depth reading sub-document:
      - docs/ai-playbook/flows/frontend.zh-CN.md
      - docs/ai-playbook/flows/backpressure-chunking.zh-CN.md
      - docs/ai-playbook/flows/resume.zh-CN.md
      - docs/ai-playbook/flows/reconnect-consistency.zh-CN.md
  - docs/ai-playbook/index.zh-CN.md add "Process (In-depth reading split)" index
2025-12-18 12:28:29 +08:00
david_bai 7a027a27b8 chore(doc):Added multi-receiver support bullets in both READMEs and indexed the Chinese README in the AI playbook. 2025-12-18 12:28:25 +08:00
david_bai dceaae8efa fix(ssr): guard DOM/window access and client-only listeners
- Prevent server-side exceptions (Application error) on mobile after redirects
  - useOneShotSlowHint: guard document; use global setTimeout; conditionally attach visibilitychange
  - useConnectionFeedback: guard document.visibilityState; register/remove listeners only on client
  - usePageSetup: guard window before tracking referrer and parsing roomId
  - tracking: early return when window is undefined
  - docs(flows): add “SSR & DOM access guard (must-read)” checklist; renumber next section
2025-12-06 12:00:03 +08:00
david_bai 0d830114cd feat(ui): extract reusable one-shot slow-hint hook; refactor join(3s) and RTC negotiate(8s) hints; share rtcPhase mapper; update docs 2025-12-06 11:05:39 +08:00
david_bai 761921684c feat(ui): add 8s P2P slow-connect hint + i18n; document full connection feedback flows
- Hook (useConnectionFeedback):
      - Add SLOW_RTC_MS=8000 timer when entering negotiating
      - Foreground-only; pending while hidden; show once per negotiation attempt
      - Clear timers on connect/disconnect; reset attempt flags when leaving negotiating
      - Cleanup timers on unmount
  - i18n:
      - Add required key ClipboardApp.rtc_slow to types
      - Provide translations for zh, en, ja, es, de, fr, ko
  - Docs:
      - flows.zh-CN: add UI connection feedback state machine covering
        join_inProgress (immediate), join_slow (3s), join_timeout (15s),
        rtc_negotiating, rtc_slow (8s), rtc_connected, rtc_reconnecting, rtc_restored;
        document equivalent success signals and visibility gating
      - code-map.zh-CN: outline responsibilities/locations for useRoomManager (join slow/timeout)
        and useConnectionFeedback (negotiation slow, reconnect/restored)
2025-12-05 19:10:00 +08:00
david_bai 621d65bdfd doc(webrtc): sync flows/code-map 2025-11-26 12:17:53 +08:00
david_bai a0befd06f4 fix(webrtc): avoid false "Join room timeout" with 15s timeout + early success
- Increase joinRoom timeout to 15s for slow networks/polling.
  - Early-resolve join on handshake signals:
      - Initiator: ready / recipient-ready
      - Recipient: offer
  - Single-settle guard; cleanup listeners/timer to prevent leaks.

  File: frontend/lib/webrtc_base.ts
2025-11-25 23:31:06 +08:00
david_bai 27375c1a4d refactor(theme): use design tokens and fix dark mode visuals
- Replace hardcoded Tailwind colors (bg-white, bg-gray-50/100, text-gray-, border-gray-, divide-gray-*, text-blue-600/800, bg-blue-50) with design tokens (bg-card, bg-muted, text-foreground, text-muted-foreground, border-
    border, text-primary, hover:bg-accent, bg-primary/10).
  - ClipboardApp: update RichTextEditor toolbar/editor, FileUploadHandler, ShareCard, FileListDisplay, SendTabPanel, RetrieveTabPanel, FileTransferButton.
  - Blog UI: unify styles in list page, tag page, post page, ArticleListItem, and TableOfContents.
  - MDX/prose: normalize pre/code/table/blockquote/lists and figure captions; switch rehype table divider to theme token.
  - Misc: adjust HomeClient and HowItWorks copy colors to tokens.
  - No functional changes; light mode parity; improved contrast and consistency in dark mode.
v1.1.1
2025-11-25 21:52:45 +08:00