Repository navigation
host: a group settings line names the local user, not Someone - #1975
Conversation
|
@Birfy review request — PR #1975 at Product code, 6 files: What it does:
This head computes to a tier that needs a formal Verdict ( |
|
Verdict: PASS at 668caeb Ran at this tip: Red first: with only Scope, checked against base 2dfc1c3: exactly the six files the body names, and Check-runs on this tip: 15 success, 1 cancelled ( Checkpoint block in the body: 1205 characters, summary 493, files 6 (all in the diff), checks at this tip. Not reviewed as blockers: the client still writes no member session (out of scope per #1967), and the line can read a member id when the owner record carries no display name — the body says so and the test asserts the named display case. |
Rebased onto main 90b880e (ThinkFlowLab#1972/ThinkFlowLab#1974) — this commit only re-plays ThinkFlowLab#1975 there: the one conflict was both sides inserting tests at the same spot in core/test/remote-room.test.js, so main's ThinkFlowLab#1965 tests and this PR's ThinkFlowLab#1967 test are both kept.
668caeb to
b5c90c4
Compare
…ab#1967) showSettings fell back to 'Someone' when neither a signed-in actor nor a Bot id reached it, which is the only path the web UI takes: nothing writes its member-session key. It now takes the room's implicit owner, then the host's wording for the local person, after the actor and the Bot that already win. core-host.md records the order, and one case drives the unsigned-in save through the real updateRoom route.
b5c90c4 to
5d69e26
Compare
|
Verdict requested for this tip: 5d69e26 Supersedes my request at 668caeb. Fact, for the record: the tip moved because #1972 and #1974 merged into main first, which left this branch conflicting in At this tip: base Checks at this tip are still finishing (the Written-by: FlyBot Lead |
|
Verdict: PASS at 5d69e26 Ran at this tip: Red first: with only Scope against base 90b880e: exactly the six files the body names (+56/−5) — Check-runs at this tip: Not a blocker: the client still writes no member session (out of scope per #1967), and the line can read a member id when the owner record carries no display name — the body states this and the test asserts the named-display case. |
Fixes #1967
Owner: Dev-2
Reviewer: Birfy
Written-by: Dev-2
Claim-Id: 29db8c1809d04d729b9f1375e39f4148
Branch: dev/2-settings-line-attribution
Base: 90b880e
Tip SHA: 5d69e26
Tree: 2d19f679273461dbbbf6f45c293af24617b9eb14
Verified commit
fa5df5b577a43b79f73d2995a8ce412bb2f0c434(tree2d19f679…); the pushed head5d69e268…was rebuilt from that same tree by the fork push, so the checks describe that tree, not that commit sha.What the line says today
showSettings(core/src/host/roster.js:503on base90b880e7;:504here, after the comment and the import) names the actor of a settings save with three steps:actoris the signed-in member session andactorIdis the Bot asking; both come from the room route (core/src/host/channel.js:742), whereactoris built only from thex-flybot-member-sessionheader andactorIdisundefinedfor the user. The web client sends that header only whenlocalStorage['flybot-member-session']exists (core/src/client/api.js:14), and nothing in this repository ever writes that key —grep -rn "flybot-member-session" core/srcfinds that read,member-auth.js's comment, the route and the tests, and no writer. So on the default single-user deployment every rename, notice edit, mode or admin/task-lead change runs withactorandactorIdbothundefined, and the line that is the whole value of #1964 reads:The change
One fallback step in the same expression, using the host's own answer for exactly this case —
implicitRoomOwner(core/src/host/room-membership.js:116), whose comment is "Unsigned-in cloud UI has no member session. A face room still has one local owner…" and which returns the primary human owner of the room, or the team's first member, with itsdisplayNameForname:The order is the issue's: a signed-in
actor.displayNamestill wins, a Bot acting through its own tool (rt.updateRoom(room, patch, botId), no actor) still wins, and this change only fills the hole they leave. When neither exists — a room with no owner and no member at all — the line falls back to the host's own wording for the local person,the user, so it never reads as a third party. Nothing else moves: the wording of each change, the one-line-per-save rule, the "only when a value moved" rule, and thequiet: true, notice: trueflags are untouched. The change is one import (room-membership.jsimports nothing fromroster.js, so there is no cycle) and one expression; nothing else in the file changes.What the line says in practice
implicitRoomOwnerreturns the room's human owner (or the team's first member) and names it throughdisplayNameFor, which reads, in order: the member session'sdisplayName, a human participant of that room,members[<id>].displayName, and only then the member id. So the sentence the room shows is one of three:Alice updated the group notice;displayName— the bootstrapowner-1record does not (core/src/host/member-auth.js:95-103), and nothing writes one back — → the member id, e.g.owner-1 updated the group notice;the user updated the group notice.The
Someoneof the "today" section is gone in all three cases. What replaces it is the author's real identity in the host's records, which in a default install can be an id rather than a person's name: putting a person's name there is the profile/identity line, and this change does not reach it.Docs and changelog
docs/subsystems/core-host.mdrecords the order on the #1962 sentence that describes the settings line: signed-in member, else the acting Bot, else the room's implicit owner (#1967), elsethe user— so the doc says where the name comes from, not only that the line names someone.changelog.d/1967-settings-line-attribution.fixed.mdis the user-visible entry: every local save used to read "Someone".Test
One case in
core/test/remote-room.test.js(:2574), driven through the realupdateRoomroute with no session header and no Bot id — the same setup asa settings patch leaves one visible line in the room:a settings save with no session names the room owner, not Someone— one save, one line, the text isAlice updated the group notice, noSomeoneanywhere in it, and the line is still the quietface-noticeevent.Red first, on base
90b880e7(the case run against the unmodifiedroster.js):The full file is
97 tests / 96 pass / 1 failin that state, and97 tests / 97 passwith the fix.Ran
On the committed tree with a clean
git status, once:TZ=UTC ARCH_DOCS_BASE=90b880e788a5438577c834a969f4b612905f27e7 npm run verify— exit 0.2375pass /0fail (base90b880e7runs2374; this one case is the difference)541(540pass,1skip) · tree127(126,1) · timeline135(134,1) · workflow336·.github/scripts563· interop37· live-e2e24, all0failOK (6 changed file(s)); lint73core +36social +9timeline +2tree +16workflow warnings,0errors; interop lint1warning (dev/interop/isolation/probe.mjs:130), live-e2e lint0warnings,0errorsnpm --prefix core run build→ no diff (this is a host-side string);node scripts/ds-bot-patches.mjs generate→ no diff after it;check→ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70,10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/;canonical→generate is a no-opnode .github/scripts/changelog.mjs check→10 fragment(s) in changelog.d/ are well formedcmp core/test/remote-room.test.js patches/ds-bot/files/test/remote-room.test.js→ byte-identicalNot run: the smoke test (this checkout has no running FlyBot instance to drive), the CI
packagejob, typecheck and actionlint. No manual browser check was made; the case drives the real route throughrt.postToRoom.Not in scope (as the issue says)
implicitRoomOwner's own semantics; this only reads it.Checkpoint
{
"pr": 1975,
"claim": "Dev-2",
"issue": 1967,
"summary": "The room line a group-settings save posts named its actor
Someonewhenever neither a signed-in member session nor a Bot id reachedshowSettings— the only path the web UI takes, since nothing writes the client'sflybot-member-sessionkey. It now falls back to the room's implicit owner, then tothe user, after the actor and the acting Bot that still win.core-host.mdrecords the order and one case drives the unsigned-in save through the realupdateRoomroute, red first on base.","files": [
"core/src/host/roster.js",
"core/test/remote-room.test.js",
"docs/subsystems/core-host.md",
"changelog.d/1967-settings-line-attribution.fixed.md",
"patches/ds-bot/0002-flybot-api-host.patch",
"patches/ds-bot/files/test/remote-room.test.js"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=90b880e788a5438577c834a969f4b612905f27e7 npm run verify; node scripts/ds-bot-patches.mjs check; node .github/scripts/changelog.mjs check",
"result": "green",
"at": "5d69e268958d2c8cdb1ee27c71b06a11886c8bf7"
},
"next": "none — ready for review"
}