Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
460 commits
Select commit Hold shift + click to select a range
98decb1
Splitting the editor into smaller components
ctoth Jan 1, 2024
48709ac
Editor focus
ctoth Jan 1, 2024
0c42c6e
aider: Fix `parseToElements` to assign unique keys and update tests t…
ctoth Jan 1, 2024
5bd3960
Generate a unique key prefix for each bundle using a random string.
ctoth Jan 1, 2024
8df5b81
aider: Fix unique key prop issue and address test failures in ansiPar…
ctoth Jan 2, 2024
9c61dc0
Refactor testParseToElements to use JSON.stringify for input and expe…
ctoth Jan 2, 2024
c46ebb5
aider: Update `CommandHistory` class to correctly handle unsent input…
ctoth Jan 2, 2024
0d40f50
Fix MCP Multiline to require the message name
ctoth Jan 2, 2024
2ffe2bf
Refactored test cases to use ReactDOMServer for rendering and compari…
ctoth Jan 2, 2024
3e4d98e
aider: Fix failing test and address warning about unique keys for lis…
ctoth Jan 2, 2024
a19a9ab
aider: Fix failing tests in ansiParser.test.tsx by updating expected …
ctoth Jan 2, 2024
71473dc
aider: The expected HTML in the test cases has been updated to match …
ctoth Jan 2, 2024
cf02086
aider: Fix expected HTML in test case for complex message involving b…
ctoth Jan 2, 2024
dacade8
aider: Fix failing test by updating expected HTML to match actual out…
ctoth Jan 2, 2024
bc7d46e
aider: Fix failing test by updating expected HTML to match actual out…
ctoth Jan 2, 2024
1191495
Fix Ansi parser tests (previously output tests)
ctoth Jan 2, 2024
7336317
0.4.0
ctoth Jan 2, 2024
f5b333e
Use setState instead of directly-updating state
ctoth Jan 2, 2024
2a64af6
Added a commit hash plugin to embed the hash in the build
ctoth Jan 2, 2024
d043868
Add version to preferences dialog
ctoth Jan 2, 2024
d3a21dd
Add title to preferences dialog
ctoth Jan 2, 2024
b51f8fb
Cache node_modules between builds
ctoth Jan 2, 2024
d29323d
Updated Client.Keystrokes GMCP spec
ctoth Jan 3, 2024
67b9047
Renamed document
ctoth Jan 3, 2024
e41debe
Refactored GMCP Client.Keystrokes package to follow the spec
ctoth Jan 3, 2024
47e1587
Update hotkey import
ctoth Jan 3, 2024
bec5782
Fix logging
ctoth Jan 3, 2024
2a8d478
Fixing GMCP keystrokes
ctoth Jan 4, 2024
54e0a88
Updated README
ctoth Jan 5, 2024
bad3074
Add .aider* to .gitignore and add focus handling for input in App.tsx.
ctoth Jan 9, 2024
bb57f24
Better attempt to autofocus
ctoth Jan 9, 2024
3d4a3e6
Refactored key binding comparison for case insensitivity and flexible…
ctoth Jan 9, 2024
fe0753b
Fix onSend
ctoth Jan 9, 2024
371408f
Deal with unset modifiers
ctoth Jan 9, 2024
8b6cf2f
0.5.0
ctoth Jan 9, 2024
26eaa01
Ignore empty messages
tspivey Jan 17, 2024
1e66972
event prevent default in Keystrokes.ts
thekettleison Jan 17, 2024
cb3efc7
aider: Ensure the output window maintains a maximum of `MAX_OUTPUT_LE…
ctoth Jan 14, 2024
f1374c6
aider: Added ability to save and load output from LocalStorage.
ctoth Jan 14, 2024
34ad6b7
Refactored Output component to save output to LocalStorage and use Re…
ctoth Jan 14, 2024
a4f72af
Clean up Client.Media package, fix sound adjustment
ctoth Jan 21, 2024
28ef2fc
Reset index after adding to history
tspivey Jan 24, 2024
dfcbfc2
scroll locks on scroll up and notifies for new messages (#8)
thekettleison Jan 26, 2024
2527823
npm update
ctoth Jan 30, 2024
fd993a7
0.5.1
ctoth Jan 30, 2024
e86e997
npm update
ctoth Feb 10, 2024
fa53ebc
aider: Remove sound references completely when stopping them.
ctoth Feb 17, 2024
d828ead
Update dependencies
ctoth Feb 17, 2024
63ffb5b
aider: Change keystroke handling to use keydown event instead of keyup.
ctoth Feb 17, 2024
0a8f6d8
aider: Refactored event handling to use arrow syntax instead of bindi…
ctoth Feb 17, 2024
0347dbd
Clean up GMCP Client.Media package
ctoth Feb 17, 2024
34b365e
Clean up sound stopping
ctoth Feb 17, 2024
f167ae3
Downgrade Cacophony until loop bug is resolved
ctoth Feb 17, 2024
e423475
Cacophony update
ctoth Feb 22, 2024
16c46cf
Cacophony update
ctoth Feb 23, 2024
a4b1a03
Cacophony update.
ctoth Feb 23, 2024
b5a9e58
Log GMCP errors
tspivey Feb 23, 2024
24cd9c0
Only add HRTF panner to 3d sounds
ctoth Feb 24, 2024
d4e86c4
0.6.0
ctoth Feb 24, 2024
14254dc
Cacophony update
ctoth Feb 24, 2024
da8fd02
0.6.1
ctoth Feb 24, 2024
5e08ecf
sendTerminalType Mongoose Client instead of Mongoose React Client
thekettleison Mar 2, 2024
f650200
npm update
ctoth Feb 24, 2024
95d7901
npm update and remove sentry
ctoth Apr 16, 2024
304c046
Fix loading previous output from local storage
tspivey Apr 28, 2024
cc098e0
Refactored state initialization, output loading, and event listeners …
ctoth May 5, 2024
6c14172
Merge branch 'master' of https://github.com/MongooseMoo/react-client
Ghorthalon May 6, 2024
4b98e22
Down arrow should not clear text field accidentally if pressed while …
Ghorthalon May 6, 2024
a1288c9
Move code check to command history
Ghorthalon May 7, 2024
f7b1f89
Remove extra check from input
Ghorthalon May 7, 2024
6a89401
npm update
ctoth May 8, 2024
df33f42
Rewrite command history logic
Ghorthalon May 8, 2024
fbbcaf0
Merge branch 'master' of https://github.com/MongooseMoo/react-client
Ghorthalon May 8, 2024
7915a65
Update Monaco and React-Icons
ctoth Jun 18, 2024
5c72cbd
npm update
ctoth Jun 18, 2024
bd13e56
Fix command history tests
ctoth Jun 18, 2024
9e5eade
Indicate that the commit hash is a virtual import and tsc shouldn't c…
ctoth Jun 18, 2024
bde4d3e
Fixes to volume slider
ctoth Jun 18, 2024
3799902
Switch to using a live announcer instead of a log/aria-live output (#10)
ctoth Jun 29, 2024
c520f49
Don't announce echoed commands
tspivey Jun 30, 2024
3876cb9
Update Cacophony version
ctoth Jul 12, 2024
f0bad3f
npm update
ctoth Jul 12, 2024
6eeaea3
npm update
ctoth Jul 23, 2024
d680d48
npm update
ctoth Jul 28, 2024
f589892
html (#11)
ctoth Aug 12, 2024
4dcb232
0.6.2
ctoth Aug 12, 2024
ec84116
feat: Add Preview button to Speech page
ctoth Sep 6, 2024
b770570
fix: Improve PreviewButton component to handle speech synthesis error…
ctoth Sep 6, 2024
1667e19
fix: Handle speech synthesis voice loading and add more logging
ctoth Sep 6, 2024
9120fc1
Update cacophony
ctoth Sep 23, 2024
ae79172
Compatibility between MCMP and Cacophony methods of counting loops
ctoth Sep 23, 2024
46c0313
update package-lock
ctoth Sep 23, 2024
631533b
npm update
ctoth Sep 23, 2024
2cb788b
fix: Resolve command history navigation issue
ctoth Sep 23, 2024
66d0069
Update Monaco version
ctoth Sep 23, 2024
8f0aaa6
editor manager (#12)
ctoth Sep 23, 2024
511d4f8
Remove completed editor plan
ctoth Sep 23, 2024
ea14172
Include commit message when deploying to GH Pages
ctoth Sep 23, 2024
6560f18
Update cacophony
ctoth Sep 23, 2024
93e3ffe
Remove duplicate volume slider
ctoth Sep 23, 2024
d8b3a37
npm update
ctoth Oct 8, 2024
25d9178
npm update
ctoth Oct 15, 2024
5661736
Update Cacophony
ctoth Oct 15, 2024
a2eaeea
Update Cacophony
ctoth Oct 15, 2024
c4a2276
Update cacophony
ctoth Oct 15, 2024
044ee05
Divide start time by 1,000 to match MCMP spec
ctoth Oct 15, 2024
35efb31
feat: Add Send button to CommandInput component
ctoth Oct 21, 2024
c104d79
npm update
ctoth Nov 7, 2024
5947d9e
feat: Add Markdown support to HTML GMCP handler using marked package
ctoth Dec 8, 2024
81f8408
Add marked package
ctoth Dec 8, 2024
86787d1
feat: Add peer-to-peer file transfer functionality (#13)
ctoth Dec 27, 2024
e89df4d
fix: Update waitForDataChannel method call with hash parameter
ctoth Dec 27, 2024
637c08f
refactor: Improve error handling in WebRTCService sendData method
ctoth Dec 27, 2024
bb6a8cf
refactor: Remove maxRetransmits from WebRTC data channel configuration
ctoth Dec 28, 2024
d1faf76
feat: Improve WebRTC file transfer reliability with flow control and …
ctoth Dec 28, 2024
9f2b3a8
refactor: Simplify file transfer timeout mechanism to use activity-ba…
ctoth Dec 28, 2024
d41903a
feat: Improve accessibility and clean up code formatting
ctoth Dec 28, 2024
46953aa
Fix complete file message
ctoth Dec 28, 2024
7ded11d
Better buffer management
ctoth Dec 28, 2024
f308055
Add autosay
tspivey Jan 9, 2025
483f3a1
Save volume in preferences
tspivey Jan 9, 2025
bc7e625
Increase max output to 7500 lines
ctoth Jan 11, 2025
0fdf58a
feat: Persist command history in LocalStorage with 1000 command limit
ctoth Jan 11, 2025
5c5f547
fix: Move localStorage persistence to input component
ctoth Jan 11, 2025
a905a93
feat: Improve command history persistence and localStorage handling
ctoth Jan 11, 2025
462f589
refactor: Add getter/setter for autosay and new useClientEvent hook
ctoth Jan 11, 2025
83ab436
refactor: Simplify event handling using useClientEvent hook
ctoth Jan 11, 2025
eb03d39
refactor: Improve type safety for client events and remove unused state
ctoth Jan 11, 2025
8bab5d0
fix: Prevent null client event listener errors in useClientEvent hook
ctoth Jan 11, 2025
8ae5488
refactor: Remove non-null assertion operators from client event hooks
ctoth Jan 11, 2025
447f046
fix: Handle null client in useClientEvent and toolbar components
ctoth Jan 11, 2025
f479944
fix: Resolve React hooks conditional call and client event handling
ctoth Jan 11, 2025
df424e9
fix: Update connection state tracking for accurate connection status
ctoth Jan 11, 2025
21347c1
refactor: Improve client connection handling and type safety
ctoth Jan 11, 2025
6d45db6
refactor: Optimize Toolbar component with useCallback and type safety
ctoth Jan 11, 2025
8bc0cf1
refactor: Improve command handler with useCallback and proper context
ctoth Jan 11, 2025
c31ed5e
fix: Resolve React hooks rendering error by moving callback outside JSX
ctoth Jan 11, 2025
8d1000e
fix: improve resource cleanup and memory management
ctoth Jan 11, 2025
8e03299
refactor: Move WebRTC initialization to FileTransferManager and remov…
ctoth Dec 28, 2024
dac2cf3
refactor: improve connection handling and type corrections
ctoth Jan 17, 2025
4e460cc
Don't proxy everything through the client
ctoth Jan 19, 2025
2a9bb39
refactor: improve file transfer signaling interface organization
ctoth Jan 19, 2025
3420e84
feat: implement PWA support using vite-plugin-pwa
ctoth Jan 23, 2025
a599b68
Dependency updates and removing old service worker
ctoth Jan 23, 2025
a13cae0
ci: update artifact actions and add retention policy
ctoth Jan 23, 2025
3d5ce0a
Refactor UI Layout & Styling: Introduce CSS Variables, Grid Layout, a…
ctoth Feb 8, 2025
d474966
Changed aria label of the sidebar to, sidebar.
daiverd Feb 10, 2025
77352e3
Remove the word, complementary' from the sidebar by using aria-rolede…
daiverd Feb 10, 2025
29d8322
fix user list (#15)
ctoth Feb 11, 2025
65c885a
feat: Autofocus command input after sending a command
ctoth Feb 11, 2025
fa9b984
feat: Focus input on page load using useEffect hook
ctoth Feb 11, 2025
8e3f778
add role=none to ul of userlist since it gets confusey broken with th…
daiverd Feb 11, 2025
dd522b8
Remove the tabindex from tabpanel
daiverd Feb 11, 2025
ab205df
Added sr-only and sr-only-focusable css classes to app.css
daiverd Feb 11, 2025
858e2a9
Remove the aria-label for each user list option in favor of using an …
daiverd Feb 11, 2025
0dba542
Stop focusing tabstrip on page load
daiverd Feb 11, 2025
9058fd2
Remove aria-labels from tabstrip and tabpanel
daiverd Feb 11, 2025
a39d868
0.7.0
daiverd Feb 11, 2025
6441239
feat: Add support for Home, End, PageUp, and PageDown keys in userlist
ctoth Feb 23, 2025
de35cdb
refactor: rename user-specific sidebar controls to be more generic
ctoth Mar 1, 2025
baa00c1
feat: Enhance sidebar toggle button with dynamic text state
ctoth Mar 1, 2025
4c32f39
feat: Add sidebar toggle icons and smooth transition
ctoth Mar 1, 2025
7e2fcbc
refactor: Replace inline sidebar display with CSS classes
ctoth Mar 1, 2025
8dca292
fix: Add missing showSidebar prop to Toolbar component
ctoth Mar 1, 2025
d5d244b
Types and tests
ctoth Mar 1, 2025
2982695
Editor manager tests
ctoth Mar 1, 2025
00a19e4
Added input component tests
ctoth Mar 1, 2025
70a08d4
Test setup
ctoth Mar 1, 2025
a6161a5
test: add comprehensive unit tests for file transfer components
ctoth Mar 8, 2025
fdda747
feat: Add volume slider accessKey for keyboard navigation
ctoth Mar 22, 2025
37db6f7
fix: Prevent autosay from adding "say" to commands starting with dash…
ctoth Mar 22, 2025
09434a0
fix: Implement exact modifier matching for keystroke bindings
daiverd Apr 9, 2025
f3b04b5
fix: Improve keystroke binding and unbinding with modifiers
daiverd Apr 9, 2025
af7557a
feat: Add GMCPMessageClientKeystrokesUnbindAll class
daiverd Apr 9, 2025
4c6fea1
feat: Implement handleUnbindAll for Client.Keystrokes.UnbindAll
daiverd Apr 9, 2025
117d706
feat: Handle missing/invalid GMCP data, add JSON parse error handling
daiverd Apr 9, 2025
e8f3eb0
fix: Revert client-side GMCP message type normalization.
daiverd Apr 9, 2025
1f9e38a
feat: Implement ListBindings request and BindingsList response
daiverd Apr 9, 2025
fa3ebb8
feat: Centralize command input state management with InputStore
ctoth Apr 10, 2025
f049b00
Remove previous test fixes changes and improve other tests. Simplify …
ctoth Apr 12, 2025
366895d
npm update
ctoth Apr 12, 2025
39dda98
jsdom
ctoth Apr 12, 2025
bed4866
feat: Implement data-text click handling in output component
daiverd Apr 14, 2025
a90c3cf
feat: Focus input after setting text from output window links
daiverd Apr 14, 2025
09c8cf1
feat: Complete focus input on output link click feature
daiverd Apr 14, 2025
c18b01e
feat: Add copy button to blockquote elements in output window
daiverd Apr 15, 2025
e585cdc
feat: Exclude copy button text and remove redundant aria-label
daiverd Apr 15, 2025
db26e60
fix: Prevent nested divs by saving/loading inner HTML of output.
daiverd Apr 15, 2025
15ea510
fix: Render only children of valid React elements in saveOutput
daiverd Apr 15, 2025
18b5ed4
feat: Convert HTML to Markdown on copy for markdown blockquotes
daiverd Apr 15, 2025
4f89c12
feat: Implement new GMCP packages and UI components
ctoth Apr 25, 2025
e90b69d
Restore previous Client.Media implementation
ctoth Apr 25, 2025
eecbbc9
Change ordering of sidebar
ctoth Apr 26, 2025
1010b05
fix: Always render tab content, hide with CSS to keep state
ctoth Apr 30, 2025
71d88cf
feat: Add "Copy Log" button to toolbar (Alt+Shift+C)
ctoth May 1, 2025
683214c
refactor: improve CSS organization and accessibility across components
ctoth May 1, 2025
a2e4a6f
refactor: improve sidebar animation and responsive layout
ctoth May 2, 2025
f889133
fix: Simplify sidebar overflow handling for Firefox compatibility
ctoth May 3, 2025
01f0dce
Sidebar
ctoth May 6, 2025
ce2604e
feat: Improve sidebar accessibility and toggle behavior
ctoth May 6, 2025
01409a4
feat: Add Home and End key functionality to Tabs component
ctoth May 7, 2025
c32351f
refactor(inventory): Enhance inventory system with item details and i…
ctoth May 18, 2025
0d8d9da
Merge pull request #16 from MongooseMoo/item-card
ctoth May 18, 2025
1e61612
refactor: Move sidebar after input in DOM for a11y
ctoth May 18, 2025
f25b7e2
Update dependencies
ctoth May 21, 2025
c5dc405
feat: Implement typed output lines with styling & persistence (#17)
ctoth May 27, 2025
58553c2
feat: Add room item interaction and display functionality
ctoth May 29, 2025
42a0449
npm update
ctoth May 29, 2025
733f811
feat: Add player name tab completion to command input
ctoth Jun 2, 2025
90ce9ea
Merge pull request #18 from MongooseMoo/tab-completion
ctoth Jun 2, 2025
9f44737
Upgrade Vite
ctoth Jun 10, 2025
8cf8a53
feat: Add option for background audio muting when window/tab loses focus
distantorigin Jun 10, 2025
67dd62c
Migrate volume from general.volume to sound.volume. We also update lo…
distantorigin Jun 10, 2025
2e81383
Merge pull request #19 from distantorigin/master
daiverd Jun 10, 2025
368fd59
npm update
ctoth Jun 25, 2025
3bce94a
npm update
ctoth Jul 4, 2025
50e039f
feat: Create PlayerCard component with action buttons
ctoth Jul 14, 2025
cab1751
feat: Integrate player system into RoomInfoDisplay
ctoth Jul 14, 2025
59d48b2
Update player interaction system with Say To changes and autofocus
ctoth Jul 14, 2025
5a68791
Merge pull request #20 from MongooseMoo/feature/player-system
ctoth Jul 14, 2025
907f138
feat: Add MIDI service and GMCP client package
Aug 24, 2025
7c293f1
feat: Add JZZ and JZZ-synth-tiny
Aug 24, 2025
884920c
feat: allow gmcp packages to enable or disable themselves
Aug 25, 2025
680aba1
fix: prevent MIDI activeNotes timeout collisions across channels
ctoth Aug 26, 2025
9e92e56
feat: Add MIDI device persistence to preferences
Aug 26, 2025
0bbdbe5
feat: Replace Web MIDI API with JZZ.js for enhanced device management
Aug 26, 2025
cd3bc18
feat: Enhance MIDI UI with auto-reconnection and device monitoring
Aug 26, 2025
7be4393
feat: Restore virtual MIDI synthesizer initialization
Aug 26, 2025
12eb2fd
Merge pull request #21 from MongooseMoo/gmcp-midi
ctoth Aug 26, 2025
3a5415e
feat: Add intentional disconnect flags to prevent unwanted MIDI auto-…
Aug 26, 2025
ba9aa4a
Merge pull request #22 from MongooseMoo/gmcp-midi-fix-disconnect
ctoth Aug 28, 2025
a2f33b3
feat: update LiveKit dependencies to latest versions
ctoth Aug 29, 2025
a382f9c
fix: redesign output persistence to support React components
ctoth Aug 29, 2025
a419546
Merge pull request #23 from MongooseMoo/fix/blockquote-persistence-ar…
ctoth Aug 29, 2025
c0166cf
refactor: remove deprecated VirtualMidiService and integrate into Mid…
Sep 4, 2025
2d6a7c6
feat: add TypeScript declarations for MIDI.js integration
Sep 4, 2025
ea4c247
feat: add dynamic MIDI.js script loader utility
Sep 4, 2025
cdff4b0
feat: add enhanced JZZ.synth.MIDIjs bridge with dynamic instrument lo…
Sep 4, 2025
d027e4d
feat: add MIDI.js library for browser-based soundfont synthesis
Sep 4, 2025
ba31c05
feat: integrate virtual synthesizers and MIDI.js into unified MidiSer…
Sep 4, 2025
af7680d
refactor: update MidiStatus component for unified MIDI service
Sep 4, 2025
f9dc43c
feat: Add channel 10 drum routing to JZZ.synth.MIDIjs bridge
Sep 4, 2025
3465f0a
feat: Add support for multiple MIDI.js soundfonts
Sep 4, 2025
3c8972e
feat: add SpessaSynth library support
Sep 6, 2025
549b62d
feat: add MIDI soundfont preferences
Sep 6, 2025
2553069
feat: add MIDI soundfont selection UI
Sep 6, 2025
5b41a95
feat: refactor MIDI synthesis with SpessaSynth integration
Sep 6, 2025
77137cb
docs: add comprehensive MIDI system documentation
Sep 6, 2025
b46974e
refactor: remove SpessaSynth completely from MIDI system
Sep 6, 2025
0c6d63d
docs: merge CLAUDE.md files and enhance project documentation
ctoth Sep 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
39 changes: 39 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
61 changes: 61 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy

on:
push:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

steps:
- uses: actions/checkout@v3

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"

- run: npm install
- run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v4
with:
name: production-files
path: ./dist
retention-days: 1

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
commit_message: ${{ github.event.head_commit.message }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand All @@ -21,3 +22,8 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Sentry Config File
.sentryclirc
dist/
.aider*
.env
101 changes: 101 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Build & Dev Commands
- `npm start` - Start dev server (opens at http://localhost:5173)
- `npm test` - Run all tests with Vitest
- `npm test src/path/to/file.test.ts` - Run specific test file
- `npm run build` - Build for production
- `npm run serve` - Preview production build

## Project Overview
The Mongoose React Client is a MUD (Multi-User Dungeon) client built specifically for Project Mongoose. It connects to the game server via WebSocket and implements various MUD protocols including Telnet, GMCP (Generic MUD Communication Protocol), and MCP (MUD Client Protocol).

## Architecture Overview

### Core Services
- **MudClient (`src/client.ts`)**: Central service managing WebSocket connection, protocol handling, and feature integration
- **TelnetParser (`src/telnet.ts`)**: Handles low-level Telnet protocol negotiation and stream processing
- **WebRTCService (`src/WebRTCService.ts`)**: Manages voice/video chat via LiveKit
- **FileTransferManager (`src/FileTransferManager.ts`)**: Handles file uploads/downloads
- **EditorManager (`src/EditorManager.ts`)**: External editor integration
- **GMCP System** (`src/gmcp/`): Game protocol handlers for GMCP (Generic MUD Communication Protocol) packages
- **MCP System** (`src/mcp.ts`): MUD Client Protocol handlers for server communication
- **Services**:
- `MidiService.ts` & `VirtualMidiService.ts`: MIDI audio support

### Protocol Support

The client supports multiple MUD protocols:
- **GMCP**: For game data exchange (character stats, room info, etc.)
- **MCP**: For MUD Client Protocol features
- **MCMP**: With 3D audio support
- **Telnet**: Base protocol with ANSI color support

### State Management
Uses custom store pattern (not Redux):
- **PreferencesStore**: User settings (volume, TTS, channels)
- **InputStore**: Command input state and management
- **FileTransferStore**: IndexedDB-backed file transfer persistence
- **useClientEvent.ts**: Hook for listening to client events

### GMCP Protocol Structure
Located in `src/gmcp/`, organized hierarchically:
- Base class `GMCPPackage` provides common functionality
- Each package handles specific message types and emits events
- Key packages: Core, Auth, Char/*, Room, Comm/*, Client/*, IRE/*

### Component Communication
- Server → TelnetParser → GMCP/MCP handlers → Event emission → UI components
- Components use custom hooks to subscribe to client events
- User input → CommandInput → MudClient → WebSocket → Server

### Features

- ANSI color rendering with `ansiParser.tsx`
- Text-to-speech with configurable voices
- Desktop notifications
- Session logging
- 3D audio via MCMP
- File transfer between users
- Real-time voice chat via LiveKit
- MIDI music support with virtual synthesizers
- In-game text editor with Monaco Editor

### Key Files

- `src/App.tsx`: Main application component
- `src/client.ts`: Core MudClient implementation
- `src/telnet.ts`: Telnet protocol handling
- `src/components/output.tsx`: Main game output window
- `src/components/input.tsx`: Command input component
- `src/components/sidebar.tsx`: Game info sidebar

### Testing

Uses Vitest with jsdom environment. Test files use `.test.ts` or `.test.tsx` extensions.

## Code Style
- **Formatting**: 2-space indentation, CRLF line endings, UTF-8, trim trailing whitespace
- **Types**: Use explicit TypeScript types & interfaces
- **Components**: Functional components with hooks, props defined with interfaces
- **Naming**:
- PascalCase: React components & classes
- camelCase: variables, functions, instances
- UPPER_SNAKE_CASE: constants
- Handlers: prefix with "handle" (handleClick)
- Booleans: prefix with "is" or "has" (isConnected)
- **Imports**: React first, third-party next, local modules last, CSS imports last
- **Error Handling**: Try/catch blocks with console logging and fallback values
- **React Patterns**: Proper effect dependencies, useRef for DOM references, custom hooks
- **Testing**: Vitest with describe/it pattern, descriptive test names
- **Comments**: Avoid redundant comments that state the obvious (e.g., "// Click handler" above a handleClick function)

## Key Dependencies
- React 18 with TypeScript
- Vite for build/dev server
- Monaco Editor for code editing
- LiveKit for WebRTC
- Cacophony for audio playback
- IndexedDB (via idb) for persistence
Loading