M1 step 5: IRC App

- Chat: header (Buffer n/N, unread elsewhere, topic or connection
  state), wrapped hh:mm <nick> lines (own in accent, Mentions green,
  info grey), input line; Tab cycles Buffers, Fn+Up/Down scrolls back,
  Enter sends, Back leaves while the IRC Service keeps running
- /settings: server form (host, port, TLS, self-signed pinning, nick,
  SASL, NickServ, auto-join); Save & reconnect restarts the session
- Opening the App starts the IRC Service; viewing a Buffer clears its
  unread count; IrcSession gains a revision counter for redraws

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-02 15:14:59 +02:00
co-authored by Claude Opus 5.5
parent 74a341418e
commit 076baa77d1
8 changed files with 397 additions and 3 deletions
@@ -333,6 +333,16 @@ void test_server_buffer_never_counts_as_unread() {
TEST_ASSERT_EQUAL(0, f.session->totalUnread());
}
void test_revision_changes_when_something_visible_changes() {
Fixture f;
f.registerNow();
uint32_t r = f.session->revision();
f.recv("PING :x"); // nothing visible
TEST_ASSERT_EQUAL_UINT32(r, f.session->revision());
f.recv(":roro!u@h JOIN #roro");
TEST_ASSERT_TRUE(f.session->revision() != r);
}
int main() {
UNITY_BEGIN();
RUN_TEST(test_plain_registration_sends_nick_and_user);
@@ -360,5 +370,6 @@ int main() {
RUN_TEST(test_buffer_keeps_only_recent_lines);
RUN_TEST(test_quit_is_forgotten_once_disconnected);
RUN_TEST(test_server_buffer_never_counts_as_unread);
RUN_TEST(test_revision_changes_when_something_visible_changes);
return UNITY_END();
}