feat(channels): add channel creation - #138
klopez4212 wants to merge 22 commits into
Conversation
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
…lish Signed-off-by: klopez4212 <klopez4212@gmail.com> # Conflicts: # src/bundled/channels/ChannelSidebarRow.tsx # src/bundled/channels/Channels.module.css # src/bundled/channels/ChannelsPage.tsx # src/bundled/channels/useSidebarView.ts # tests/browser/navigation-scroll-intent.spec.mjs # tests/browser/navigation-sidebar.spec.mjs # tests/browser/session-search.spec.mjs # tests/browser/sidebar-unread.spec.mjs
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e33dc625f
ℹ️ 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".
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d50ace6462
ℹ️ 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".
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Changes requested
Reviewed head d50ace64625147ec0dafdf85297696375ade4f5c against stacked base 7c36465d7ebf3295ef20f6698ce90e3e075fb27c. Contract: create ordinary public/private, ongoing/temporary channels through the existing durable outbox and relay authority, then navigate to the joined channel; use private-channel icons consistently. No new relay protocol, ACL model, or metadata-round-trip requirement is needed.
P1: Preserve the pending create identity across dialog and session lifecycles
src/features/relay/session.ts:715–757
The kind-9007 command is durable, but its channel UUID, operation ID and input signature live only in pendingChannelCreation. If publication commits but acknowledgement is lost, reconnecting/reloading replaces this closure while the outbox restores the original operation as unknown. Submitting the same details then calls crypto.randomUUID() and sends a second create instead of confirming/retrying the saved event. Both channels can exist, with the original operation still unresolved. service.ts:50–98 replaces the session; outbox.ts:201–252,501–514 preserves and can retry the original event.
The same missing recovery owner also strands the form without reconnecting: after an uncertain error, close/reopen resets every field (CreateChannelDialog.tsx:48–55), while the retained coordinator rejects any signature different from the now-hidden old values. Preserve a scope-bound pending intent and restore its form values/UUID/operation, using the existing exact-event outbox recovery rather than a new retry subsystem. Regression coverage should include uncertain publication followed by reconnect/reload and dialog close/reopen, asserting no second create identity.
P2: Reject truncated mandatory tag prefixes before indexing them
dev/session-commands.mjs:40–51
For kind 9007 with empty content, a valid timestamp and only [["h", "11111111-1111-1111-1111-111111111111"]], optional-tag validation succeeds and .slice(0, 4).every(...) validates only the present prefix. The following tags[1][1] throws; valid h/name and h/name/visibility prefixes fail similarly at the next missing tag. Both broker sign/publish endpoints call this predicate, so malformed input now reaches the outer 500 Local relay broker failed path instead of the intended 400 rejection. The base's exact-length check prevented this. This is a validation regression, not a signing/ACL bypass. Check mandatory arity before dereferencing and cover all truncated prefixes at the predicate and broker boundary.
Evidence and limits
Source-only review on pinned bare objects with independent authority and UI lanes plus targeted adjudication; no repository code, tests, builds, or live writes were executed by this review. Existing CI run 35763069455 succeeded: its browser jobs checked out synthetic merge bd8479038ae91f58ee5dbaf286e9ef7cb56b09c6, merging this exact head into the pinned base, rather than checking out the head directly. JavaScript reported 201 files / 2,110 tests, and Chromium/WebKit both passed the sidebar dialog journey. That journey opens/closes the dialog; it does not submit through the new recovery coordinator. These green checks do not cover the failure paths above. Native packaging, real-relay TTL behavior, and live create/reconnect acceptance remain unverified here. All three outgoing commits have DCO trailers, and the hosted DCO check passed.
Exit criteria are the two bounded repairs above with regression coverage. Do not expand completion to require matching name/description/TTL readback: the existing contract intentionally applies authoritative membership before optional metadata. The open reserved-description hypothesis is not an open-Session/ACL defect: Session classification also requires relay-authored private metadata.
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
|
🤖 Addressed both requested changes and pushed d2af0dc.\n\n- Pending channel creation now survives reconnect/reload through the durable outbox, restores the modal after close/reopen, and retries the exact saved event identity.\n- Truncated kind-9007 mandatory tag prefixes now return 400 instead of reaching an internal error, with predicate and sign/publish boundary coverage.\n- Merged current main and retained its current session-search coverage.\n\nValidated with pnpm check, 53 focused unit/integration tests, two affected Chromium sidebar journeys, and the pre-push gate (89 files / 1,288 tests plus design-system guards). |
Summary
Snapshots
Private channel and sidebar actions
Create channel
Testing
Dependency