Skip to content

feat(web): Kanidm sign-in, sharing and person-grouped sidebar (fork) - #4

Closed
caniko wants to merge 4 commits into
feat/principal-runnerfrom
feat/session-ui
Closed

caniko wants to merge 4 commits into
feat/principal-runnerfrom
feat/session-ui

Conversation

@caniko

@caniko caniko commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Fork-only, stacked on #3.

  • Sign-in: "Sign in with Kanidm" on the pairing screen when the server advertises oidcSignIn. On web it is a browser redirect; on desktop it opens the system browser and comes back through t3code://pair. Pairing still works.
  • Sidebar: your own threads stay in the existing project view. A new "Shared with me" section groups threads by owner, then session group.
  • Sharing: Share… in the thread menu and the command palette adds viewers and participants, removes shares, and picks a session group. Settings → General shows the signed-in person and manages groups.
  • Attribution: messages from other people show their name. Viewers get a disabled composer with an explanation.
  • Single-user installs: under the default owner principal nothing changes and no session-access queries run.

Contract additions: an optional AuthSessionState.principal. sessionAccess.list and sessionAccess.threadShares move from client-guarded methods to server-required read scopes; the server check is unchanged.

CI now typechecks the web and client-runtime packages and runs the new unit and browser tests. The browser test could not run on the dev host, where Playwright's Chromium has no system libraries.

Known gap: a newly shared thread reaches the recipient's sidebar on its next update or reconnect. The client polls the access list every 30 s, but the shell has no push for this yet.

Council review

Rounds: 1 (question: close as superseded by #6)

Delegate Round 1
Claude Opus 5.5 8/10
GPT-6.1 Sol 9/10

🤖 Generated with Claude Code

Signed-in people need to see their own work first and bring each other
in. With OIDC configured, the pairing screen offers "Sign in with Kanidm"
(browser redirect, or the system browser plus t3code://pair on desktop).
The sidebar keeps your own threads in the existing project view and adds
"Shared with me", grouped by owner and session group. Share… in the
thread menu and command palette invites a principal as viewer or
participant and files the thread in a session group; Settings shows who
you are and manages groups. Messages from someone else carry their name,
and viewers get a disabled composer. With the default owner principal
nothing changes.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T10:42:56.680345Z abeaa40 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abeaa404e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const isSessionViewer =
useThreadAccessRole(routeKind === "server" ? scopeThreadRef(environmentId, threadId) : null) ===
"viewer";
const canOperateThread = hasOperateScope && !isSessionViewer;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply viewer roles to the mobile composer

When a recipient opens a viewer-shared thread in the mobile app, this role check applies only to web ChatView. Mobile ThreadRouteScreen still derives canOperateThread from the environment scope, which principal sessions have, so ThreadComposer enables Send; the server then rejects the dispatch because viewers may only read. Apply the shared role check on mobile too, so viewers aren't shown an action that always fails.

AGENTS.md reference: AGENTS.md:L69-L73

Useful? React with 👍 / 👎.

}
const target = ownedGroups.find((group) => group.id === groupId);
if (target !== undefined) {
await mutate({ type: "group.thread.add", groupId: target.id, threadId });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the old group when moving fails

When moving a thread from one group to another, the old-group removal commits before this add is sent. If the add fails, for example because the connection drops or the target group was deleted concurrently, the thread is left in no group and the old group's members lose access even though the owner selected a new group. Make the move atomic or restore the old membership when the add fails.

Useful? React with 👍 / 👎.

Comment on lines +104 to +108
void mutate({
type: "thread.unshare",
threadId,
principal: share.principal,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Revoke active thread subscriptions when unsharing

When the recipient already has this thread open, removing the share only deletes the access row. The server checks visibility when subscribeThread starts (apps/server/src/ws.ts:2352-2362) but does not recheck the live stream, so the recipient can continue receiving new conversation events after removal until reconnecting. Revoke active subscriptions or otherwise invalidate the recipient's open thread when its share is removed.

Useful? React with 👍 / 👎.

@caniko

caniko commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

Note

🤖 Claude Opus 5.5 responding on behalf of caniko

Superseded by #6, which rebased these commits onto the 20261104 nightly and merged them into main. Open review findings are carried in #2 (comment).

@caniko caniko closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant