Repository navigation
Conversation
Tiny Code Reviewthe AI provider rate-limited the request This is advice, not a gate. Re-run with the |
unRekable
left a comment
There was a problem hiding this comment.
Code Review
🟢 No findings.
Routes Request::Star for Slack rows through the adapter as stars.add/stars.remove on the channel with no timestamp, consumes star_added/star_removed socket events for conversation items only, and marks rows Slack filed in its stars section when the sidebar is read; other networks keep the local flag via the Unsupported default. The new code copies the repository's own shapes exactly: star() mirrors react()'s swallow of already_starred/not_starred, Context::starred mirrors Context::muted, the server branch mirrors pinned()'s ask() with a bounded recv_timeout, and thread ids are refused before Slack is asked. No wire change, no new host, no unbounded input, secrets untouched. Tests cover the wire shape and the event path, and the e2e scenario is in the diff. I found no defect the diff introduces.
Residual risk
- A star removed in Slack's own app while this client is offline stays starred here forever: the sidebar read only marks rows found in the stars section and never clears the rest, and no star_removed replays on connect. Clearing rows absent from the section would also wipe rows starred here before this feature shipped, so the documented one-way choice is defensible; it just leaves a stale flag until the user re-stars.
- The PR body itself flags the session token's stars.add permission as unverified. If it is missing, every star attempt refuses with Slack's own error and the local flag stays as it was — a refusal, not wrong state.
- The event path assumes star_added/star_removed items carry type channel, im, or group with the conversation in item.channel. If Slack only ever sends those for channels, direct and group stars are still set by the sidebar read but their removal events would be missed — the same stale-flag window as the first bullet.
2aec3a4 to
e8cd7b4
Compare
What changed and why
Starring a Slack conversation now tells Slack, and Slack's own star is the one the row shows.
Request::Staron a Slack row callsstars.addorstars.removewith the channel and no message timestamp. Astar_addedorstar_removedevent for a channel, direct conversation, or group sets the same flag, and a message or file star does not. Channels Slack files in its stars section are marked starred when the sidebar is read, so the Inbox's starred-first order matches. Other networks still star only on this device. The demo has no Slack to call, so a demo Slack row stores the flag and answers.Type
Platforms
Proof
Scenario: e2e/scenarios/slack-star-channel
Lab run:
Compatibility
No protocol change.
Request::Starwas already there. An older client still stars locally; this client asks Slack only for a Slack account.Risk and rollback
If this session's token cannot call
stars.add(that permission is unverified), starring a Slack row fails and the local flag stays as it was. Revert this change to go back to a local star.Release note
Starring a Slack channel or direct conversation stars it on Slack, and Slack removing that star clears it here.