Repository navigation
fix(rooms): say the invite link was copied only when the clipboard took it, else show it to copy by hand - #330
Conversation
…ok it, else show it to copy by hand navigator.clipboard?.writeText completed quietly when the clipboard was missing, so the card claimed a copy that never happened and showed no link. copiedToClipboard reports a real copy; otherwise the link is shown in a read-only field.
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. |
Birfy
left a comment
There was a problem hiding this comment.
Fresh review at tip a9ddb43 (posted from the author's account, so it is not an independent PASS and records none).
Verdict: needs change (rebase only; no code defect found). The branch conflicts with main (mergeStateStatus DIRTY), so it cannot enter the queue as is.
Findings
- Merge conflict in generated files only.
git merge-treeagainst current main conflicts inpatches/ds-bot/0001-core-fixes.patchandpatches/ds-bot/0008-client-bundle.patch(the #321 squash landed after this branch's base). Follow the AGENTS.md conflict recipe: merge main,git checkout origin/main -- patches/ds-bot,npm run buildincore/,node scripts/ds-bot-patches.mjs generatethencheck,npm run verify. The new tip will need a fresh review. - Minor (non-blocking): the second new test is a source-text assertion on
new-chat.js(regexes oncopyInvite). It guards the wiring but would not catch a behavior regression; the first test (copiedToClipboardwith no clipboard / non-function / sync throw / rejected write) is behavioral and is the real guard. The repo already uses this style elsewhere, so I would not block on it.
Checked
- Logic is correct: "copied" is said only when
writeTextreally resolved; a missing clipboard or refusal shows the link in a read-only, select-all field with a clear note. Create-invite failure keeps its separate message. Retrying or "Leave out" clears the link. A latecreateInviteafter unmount only sets state on a closed card. - The invite link is shown only to the owner who just made it, in their own UI (it was already copied to the clipboard before); nothing is logged or stored. No grant is written by the client, per-Bot default deny unchanged.
- UI is simple and uses existing classes (
bt-input); both new strings have zh entries (邀请链接,无法自动复制…) and a test asserts the dictionary keys. core/andpatches/are consistent at this tip (ds-bot-patches.mjs checkok);build-client.mjs --checkok.- New
copiedToClipboardtest cannot pass on base (the export does not exist there).
Ran at this tip: core full suite (853 pass, 0 fail, Node 24, TZ=UTC); ds-bot-patches.mjs check; build-client.mjs --check; git merge-tree against main.
Not run: clicking Copy in a real browser/WebView (no clipboard case), smoke.
Codex: completed at this tip with no findings.
CI: all checks green at this tip; mergeability DIRTY. Risk tier T3 (core/src/shared/remote-label.js).
Still needed: rebase/regenerate, then an independent PASS on the new tip from a login in review-policy.json other than the author, and Danyang's one-click (T3).
Conflicts were only in generated patches/ds-bot/0001 and 0008: took main's patches and regenerated from core/ (AGENTS.md conflict recipe).
|
Maintenance check at tip 815db7c (posted from the author's account, so this is not an independent PASS). The rebase finding from the last review is resolved: Still blocked only on the gate: risk tier T3 ( |
|
Main moved to d6203fd (#341) and conflicted again in the generated |
# Conflicts: # core/client.js # patches/ds-bot/0008-client-bundle.patch
Follow-up to #321 (Codex P2 on new-chat.js: a missing or failed clipboard counted as a copy). Ran ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify at the tip.