Commit graph

85 commits

Author SHA1 Message Date
8eb311e54b i18n: restore code-based language syntax 2026-05-24 11:09:17 +08:00
a693d281f8 ux: collapse help surface around manual 2026-05-24 10:17:25 +08:00
86e1ec8e32 i18n: tolerate whitespace in language parsing 2026-05-24 08:58:51 +08:00
ddf1242b17 test: wait for connection limit readiness 2026-05-24 08:53:08 +08:00
84e26e3f74 test: wait for basic health readiness 2026-05-24 08:47:36 +08:00
998da4288f test: stabilize stress test runner 2026-05-24 08:42:39 +08:00
fa16beb7a6 test: stabilize anonymous access checks 2026-05-23 23:30:43 +08:00
095491927a test: cover connection limit regressions 2026-05-23 21:38:27 +08:00
6ec86eb016 i18n: localize idle timeout notice 2026-05-23 20:10:51 +08:00
73655d0e70 i18n: localize startup cli text 2026-05-23 20:08:18 +08:00
fd6cdbf627 i18n: localize exec guidance text 2026-05-23 20:03:31 +08:00
81c3f45864 support: move guide copy into text module 2026-05-23 19:55:44 +08:00
0cf8ac6759 i18n: centralize command guidance text 2026-05-23 19:45:53 +08:00
4fb531771b help: move bilingual help text into module 2026-05-23 19:41:38 +08:00
8009887be9 i18n: localize welcome screen 2026-05-23 19:33:21 +08:00
07e47e65c8 i18n: module system event messages 2026-05-23 19:30:11 +08:00
1d8fcea3fa i18n: localize title bar status 2026-05-23 19:21:01 +08:00
aca68824ac i18n: centralize command output text 2026-05-23 19:11:29 +08:00
9159586716 i18n: localize command usage errors 2026-05-23 18:36:44 +08:00
4c8ef99880 i18n: localize modal screen chrome 2026-05-23 18:32:26 +08:00
22ab85acef i18n: localize common command outputs 2026-05-23 18:29:30 +08:00
92123d208d i18n: localize help screen chrome 2026-05-23 18:25:30 +08:00
f535b928d1 i18n: localize command mode guidance 2026-05-23 18:17:53 +08:00
2e69283e5c i18n: add session language command 2026-05-23 18:10:54 +08:00
0c27976763 i18n: select interactive language from locale 2026-05-23 18:06:39 +08:00
36dbe8d549 tui: guide first-time users 2026-05-21 12:36:06 +08:00
169ba1a150 tui: preserve ansi styling when truncating output 2026-05-21 12:12:14 +08:00
67d21ad0e9 tui: improve history browsing and support guide 2026-05-21 11:57:59 +08:00
e319c7aa42 fix: remove committed test binaries and add them to .gitignore
macOS-compiled test binaries were tracked by git, causing CI failures
on Linux where they're executed as shell scripts instead of ELF binaries.
2026-04-19 18:27:34 +08:00
e10b43074c feat: consolidated improvements, manpage, and deployment prep
Bug fixes:
- Fix data race on client->width/height (now _Atomic int)
- Persist join/leave system messages via message_save()
- Make room_add_message static to enforce lock contract
- Fix execute_command mutating command_input directly
- Increase help_copy buffer from 4096 to 8192 for CJK safety

New features:
- Add :msg/:w whisper command for private messaging
- Add command history with UP/DOWN arrows in command mode
- Add Ctrl+D/U/F/B page scrolling in normal mode
- Add :q/:quit/:exit Vim-style disconnect

Unix community:
- Add tnt.1 manpage (roff format) with full documentation
- Add manpage install/uninstall to Makefile
2026-04-19 17:49:06 +08:00
ecc45f285c test: add chat_room unit tests and integrate into build
- Add 11 unit tests for chat_room.c covering: create/destroy, message
  add/overflow, broadcast sequence, get_message bounds, client
  add/remove/capacity, and null argument handling
- Add unit-test target to root Makefile so `make test` runs unit tests
  before integration tests
- Add common.c to unit test link dependencies (needed for tnt_state_path)
- Guard _DARWIN_C_SOURCE define to prevent -Wmacro-redefined warning
2026-04-19 15:22:01 +08:00
cb106de31b fix: separate per-ip concurrency from connection rate 2026-03-10 19:08:28 +08:00
e473b26e0d refactor: stabilize SSH runtime and add exec interface 2026-03-10 18:52:20 +08:00
2535d8bfd4 test: add comprehensive unit tests for UTF-8 and message functions
Add 31 unit tests covering core functionality:
- UTF-8 byte length detection
- UTF-8 character decoding (1-4 byte sequences)
- Character width calculation (ASCII, CJK, Hangul, Hiragana, Katakana)
- String width calculation
- Character/word removal functions
- UTF-8 validation
- Message formatting and edge cases

Test results: 31/31 passed ✓

Files:
- tests/unit/test_utf8.c (20 tests)
- tests/unit/test_message.c (11 tests)
- tests/unit/Makefile (build configuration)
2026-02-08 10:29:19 +08:00
07fd7b1513
refactor: optimize rendering, log loading, and migrate to libssh callback API (#9)
This PR addresses critical performance bottlenecks, improves UX, and eliminates technical debt.

### Key Changes

**1. Performance Optimization:**
- **Startup**: Rewrote `message_load` to scan `messages.log` backwards from the end
  - Complexity reduced from O(FileSize) to O(MaxMessages)
  - Large log file startup: seconds → milliseconds
- **Rendering**: Optimized TUI rendering to use line clearing (`\033[K`) instead of full-screen clearing (`\033[2J`)
  - Eliminated visual flicker

**2. libssh API Migration:**
- Replaced deprecated message-based API with callback-based server implementation
- Removed `#pragma GCC diagnostic ignored "-Wdeprecated-declarations"`
- Ensures future libssh compatibility

**3. User Experience (Vim Mode):**
- Added `Ctrl+W` (Delete Word) and `Ctrl+U` (Delete Line) in Insert/Command modes
- Modified `Ctrl+C` behavior to safely switch modes instead of terminating connection
- Added support for `\n` as Enter key (fixing piped input issues)

**4. Project Structure:**
- Moved all test scripts to `tests/` directory
- Added `make test` target
- Updated CI/CD to run comprehensive test suite

### Verification
-  All tests passing (17/17)
-  CI passing on Ubuntu and macOS
-  AddressSanitizer clean
-  Valgrind clean (no memory leaks)
-  Zero compilation warnings

### Code Quality
**Rating:** 🟢 Good Taste
- Algorithm-driven optimization (not hacks)
- Simplified architecture (callback-based API)
- Zero breaking changes (all tests pass)
2026-02-07 23:17:55 +08:00