TR
apps/caramail-chat / AGENTS.md · commit 6eebcdb
# caramail-chat — notes for agentsThe 2002 chat applet recreated with JumPHP\Gui. The server is the sibling project caramail-server (same frames).- `src/Chat/ChatClient.php`: the protocol (frames "code TAB fields LF"; empty fields are dropped as the applet's  StringTokenizer did). Events for the window. `Styled`: the coded text ("FFCC" segments joined by "\r", wave 03,  rainbow 11). `Smileys`: the applet's smiley parser. `Member`: sex 0 = woman (pink), 1 = man (blue).- `src/Gui/ChatList.php` (the applet's list canvas a.g), `TabBar.php` (a.d), `SmileyPainter.php` (draws the smileys  from `assets/smileys/ops.json`, the applet's drawing code as data), `SmileyGrid.php`.- `src/Form/LoginForm.php`, `ChatForm.php` (+ `forms/*.form.yaml`), `SmileyForm.php` (dialog), `Demo.php` (a scripted  server for the smoke test and the site's screenshots: `JUMPHP_SCENE_PARAMS='{"demo":true}'`).- `src/Net/`: `Link` — WsLink (default: wss://caramail.jumphp.net/ws, php-wasm-network, the server is peer 0 of room CHAT), TcpLink ($engine->tcp()), FakeLink (tests).- `src/Gui/Awt*.php`, `Etched`: the AWT look of the applet (bevels, Windows controls); `Awt::theme()` is called in each form's loaded(). `ChatForm::adapt()` stacks the pages on phones: the room shows one view at a time (bar `roomSwitch`: Dialogue / Membres / Smileys), the line and "Envoyer" side by side under the talk, and while the line has the focus (on-screen keyboard) the talk keeps the upper 36 % so the line stays above the keyboard (not when the browser shrank the page itself). No automatic focus on a phone (it would open the keyboard).- Demo screenshots of a tab: `JUMPHP_SCENE_PARAMS='{"demo":true,"tab":"search"}'` (rooms, search, info, private).- Tests: `tests/ChatWindowTest.php` drives the windows against a FakeLink (English texts: setLang('en')).- Texts: `config/lang.yaml` (13 languages + English keys). Combobox items are translated in ChatForm::loaded().- Site: `site/` + `tools/site/shots.sh` (screenshots) and `make_images.py`.