Skip to content

fix(social): label Manage access grantees from object handle fields (#164) - #165

Merged
Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:cursor/grant-object-label-dae8
Oct 17, 2026
Merged

Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:cursor/grant-object-label-dae8

Conversation

@Birfy

@Birfy Birfy commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes #164.

Bot Social's list_bot_grants returns grantee as a publicBot object (handle, display_name, owner_display_name), not a string. grantPersonView was doing String(grantee) → [object Object] → @objectobject.

  • grantPersonView / normalizeGrant read handle and owner_display_name (then display_name) from that object.
  • The same unwrap is applied in related social normalization paths.
  • Regression test covers an object-shaped grantee.

ARCH_DOCS_BASE=upstream/main npm run verify passes.

Fixes #164

cursoragent and others added 2 commits October 17, 2026 05:08
Bot Social returns grant.grantee as a publicBot object, not a string.
String(grantee) became "[object Object]" and the handle sanitizer
turned that into @objectobject.

grantPersonView / normalizeGrant now read handle and
owner_display_name (then display_name). The same unwrap is applied
in social.js norm(), hidden-remotes, and face-room handle helpers.

Regression tests cover grantPersonView, listGrants, and social/access
with an object-shaped grantee.

ARCH_DOCS_BASE=upstream/main npm run verify passes.

Co-authored-by: Danyang Chen <birfychen@gmail.com>
Point the changelog fragment and social subsystem note at the filed
issue so the PR can close it with Fixes ThinkFlowLab#164.

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-10-17T05:17:34.236422Z fa3d5ec 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.

@Birfy
Birfy added this pull request to the merge queue Oct 17, 2026
Merged via the queue into ThinkFlowLab:main with commit 22d09ac Oct 17, 2026
6 checks passed

@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: fa3d5ecceb

ℹ️ 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 member = memberHandleOf(raw)
const home = personHomeOf(raw)
const rawName = String(grant?.name ?? '').trim()
const rawName = personNameOf(grant?.name) || personNameOf(peer) || personNameOf(grant)

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 owner names across grant resynchronization

When an object grantee's owner_display_name differs from its home slug (for example, Alice Smith for @helper.account42.home), normalizeGrant first produces Alice Smith (@account42.home), but syncOutgoingGrants immediately passes that normalized grant through grantPersonView again. This line then reads the already-formatted label, the following /@/ check treats it as handle text, and the stored/access label becomes Account42 (@account42.home), so the new owner field is only displayed correctly when it happens to match the slug as in the added Bob fixture. Preserve the raw person name or recognize an already-formatted label before re-normalizing it.

Useful? React with 👍 / 👎.

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.

Manage access labels grantees as Objectobject ([object Object])

2 participants