Show neoirc-cli's own messages, joins and parts from the server's events (closes #186) #188

Open
clawbot wants to merge 1 commits from issue-186-cli-own-events into next
Collaborator

neoirc-cli wrote its own line when it sent a message, joined or parted, and ignored the server's PRIVMSG and PART events from its own nick. Its own JOIN event was not ignored, so a join showed twice, and a message or part the session made from another client (the web client or an IRC listener connection) never showed. Since #183 the HTTP API queues the sender's own PRIVMSG, NOTICE, JOIN and PART to every client of its session, the sending one included, so that event is now the one copy.

internal/cli/app.go no longer writes a line of its own when it sends a message, joins or parts, and ignores nothing by nick. The error lines for a failed send, join or part stay. A direct message the user sent shows in the recipient's buffer, as in the web client.

cmdPart switches to the status buffer before the server's PART event arrives, so that event's line would mark the channel just left as unread. The new UI.AddLineAsRead in internal/cli/ui.go adds a line without marking the buffer unread, and handlePartEvent uses it for the user's own part.

NOTICE needed no change: neoirc-cli has no command that sends one, and it already showed every notice it received.

  • Judgement call: a part the session makes from another client also leaves the channel unmarked, since the event does not say which client sent it.

Model: opus-5-5

neoirc-cli wrote its own line when it sent a message, joined or parted, and ignored the server's PRIVMSG and PART events from its own nick. Its own JOIN event was not ignored, so a join showed twice, and a message or part the session made from another client (the web client or an IRC listener connection) never showed. Since https://git.eeqj.de/sneak/neoirc/pulls/183 the HTTP API queues the sender's own PRIVMSG, NOTICE, JOIN and PART to every client of its session, the sending one included, so that event is now the one copy. `internal/cli/app.go` no longer writes a line of its own when it sends a message, joins or parts, and ignores nothing by nick. The error lines for a failed send, join or part stay. A direct message the user sent shows in the recipient's buffer, as in the web client. `cmdPart` switches to the status buffer before the server's PART event arrives, so that event's line would mark the channel just left as unread. The new `UI.AddLineAsRead` in `internal/cli/ui.go` adds a line without marking the buffer unread, and `handlePartEvent` uses it for the user's own part. NOTICE needed no change: neoirc-cli has no command that sends one, and it already showed every notice it received. - Judgement call: a part the session makes from another client also leaves the channel unmarked, since the event does not say which client sent it. Model: opus-5-5
clawbot added the needs-review label 2026-10-21 18:12:49 +02:00
clawbot added 1 commit 2026-10-21 18:12:49 +02:00
neoirc-cli wrote its own line when it sent a message, joined or parted,
and ignored the server's event for its own nick, except a JOIN, so a
join showed twice and what the session did from another client never
showed. The HTTP API queues these events to every client of the
session, so the CLI now writes no line of its own when it sends and
shows the event as it shows anyone else's. A direct message the user
sent goes in the recipient's buffer. The user's own part does not mark
the channel unread, as the user has just left it.

Model: opus-5-5
clawbot self-assigned this 2026-10-21 18:12:53 +02:00
Author
Collaborator

Stopped by the top-level manager at 16:36 UTC on 21 October, when the primary reached sneak's 60% guard: the independent review of this PR was running and did not report. The next manager reruns it from current next; nothing else on the branch changed.

Model: opus-5-5

Stopped by the top-level manager at 16:36 UTC on 21 October, when the primary reached sneak's 60% guard: the independent review of this PR was running and did not report. The next manager reruns it from current `next`; nothing else on the branch changed. Model: opus-5-5
Some checks are pending
check / check (push) Waiting to run
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-186-cli-own-events:issue-186-cli-own-events
git checkout issue-186-cli-own-events
Sign in to join this conversation.