Skip to content

fix(web): show a nested session's own group badge and allow moving it to a group - #347

Merged
bk-agent-01 merged 2 commits into
stagefrom
tushar/sidebar-child-group-badge
Oct 23, 2026
Merged

bk-agent-01 merged 2 commits into
stagefrom
tushar/sidebar-child-group-badge

Conversation

@bk-agent-01

@bk-agent-01 bk-agent-01 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  1. Group badge on nested rows (Custom view). In Custom mode, the sidebar places a whole session tree by its root. So a child session renders under its parent, in the parent's group. Before this change, a child in another group showed no sign of its own group. Now a nested row shows its own group chip when its group differs from its direct parent's group. The check compares the normalised group ids (phaseSidebarCustomGroupIdForRow), so "Today" and "today" are the same group. A nested row in its parent's group, or with no group, shows no chip. Top-level rows keep the old behaviour. In Custom mode, the chip shows the group's registry label (the same spelling as the section header). Other modes are unchanged.
  2. "Move to group" on every row. The row menu now offers "Move to group" (and "Remove from group") on all rows. Note: the old gate was treeParentKey == null. treeParentKey comes from node.orphanedFrom, which is set only on top-level rows whose parent is not rendered. So the old gate hid the item on those orphaned rows, not on nested rows as its comment said. The new code removes the gate and updates the comment.
  3. No layout change. There is no new section, no duplicate row and no count change. The child still renders under its parent.
  4. AGENTS.md merge authority. Tushar's Manager session may merge a green, reviewed PR into stage by its own judgement, then verify it on stagebkt3.dev.beknown.live. A merge or promotion to bkmain still needs Tushar. The Manager asks once, as one item on its batched Toolyard decision card, because a bkmain deploy restarts bkt3 and stops live sessions. The expbkmain pre-authorisation text stays.
  5. Docs. docs/user/thread-sidebar.md explains the nested chip.

The decision is a small pure helper, phaseSidebarNestedRowShowsCustomGroup, in apps/web/src/components/sidebar/PhaseGroupedSidebar.logic.ts, with unit tests. Scope is web and desktop (desktop shows the web UI). Mobile is out of scope.

Why

Tushar's Manager session files the sessions it drives as children under itself (t3_link_session). Each child keeps its own custom group, for example "Today". Tushar, 2026-10-23: "currently when a session is under a another group because its a child sesion of a parent belonging to the parent its now showing that small group things what you can do is create a small PR for bkt3 to enable this and make sure to follow this as it is".

For AGENTS.md, Tushar approved this rule on 2026-10-23: "the Manager merges a green PR to stage by its own judgement, after a check on stagebkt3. Each promotion to bkmain is one item on the batched Toolyard decision card, because it stops your live sessions. You then pick the time."

How I tested

  • CI on the head runs the unit tests (new phaseSidebarNestedRowShowsCustomGroup cases), typecheck, lint and the fork-marker check.
  • I did not run tests, typecheck or a build locally. The host policy for dev-server-1 forbids it.
  • After the merge to stage, check on stagebkt3.dev.beknown.live:
    1. Set Group by to Custom.
    2. Link a child session under a parent in group A, and put the child in group B with Move to group.
    3. The child row stays under its parent and shows a "B" chip.
    4. Move the child to group A. The chip goes away.
    5. Check that section counts and rows do not change.

🤖 Generated with Claude Code

… to a group

In Custom mode a subtree is placed by its root, so a child session renders
under its parent in the parent's section. A child filed in another group had
no visible sign of that group. A nested row now shows its own group chip when
its normalised group id differs from its direct parent's
(phaseSidebarNestedRowShowsCustomGroup, with unit tests).

"Move to group" is offered on every row. The old gate (treeParentKey == null)
hid it on orphaned top-level rows, whose parent is not rendered, not on
nested rows as its comment said.

AGENTS.md: Tushar's Manager session may merge a green, reviewed PR into
stage by its own judgement and verify it on stagebkt3; bkmain still needs
Tushar, asked once on the Manager's batched Toolyard decision card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 23, 2026
In Custom mode, a row chip (Running shelf rows and nested rows filed in
another group than their parent) now shows the group's registry label, the
same spelling as the section header, and falls back to the row's own label.
Other modes are unchanged. Adds helper tests for whitespace and case
normalisation and for two rows with no group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 18fa096.

This comment will update automatically after the next completed run.

@bk-agent-01

Copy link
Copy Markdown
Collaborator Author

Manager merge to stage by judgement (Tushar, 2026-10-23, in his Manager session: the Manager merges a green PR to stage by its own judgement, then checks it on stagebkt3).

  • Head: 18fa0965f28040c0dc7e40a6c2ef85d9c2f5bbb5
  • Checks: 21 success, 5 skipped, 0 failed (one superseded Native fingerprint diff run was cancelled; its newer run on the same head passed).
  • Review: an independent agent review found no P0/P1; two of its P2 points (registry label on the chip, two more helper tests) are in this head.
  • Next: verify the nested group chip and "Move to group" on stagebkt3 after the stage deploy. bkmain promotion waits for Tushar on the Manager's decision card.

@bk-agent-01
bk-agent-01 merged commit 42207ec into stage Oct 23, 2026
26 of 27 checks passed
@bk-agent-01

Copy link
Copy Markdown
Collaborator Author

Production evidence (2026-10-23, after the bkmain promotion #348)

Verified with tools

Not verified visually

  • The agent's browser stops at bkt3 sign-in (/pair), so nobody has checked the nested badge or "Move to group" on a nested row in the live UI yet. CI covers the decision logic with 7 helper tests, but that is not a visual check.

Remaining check (Tushar, about 2 minutes, on https://bkt3.dev.beknown.live)

  1. Set the sidebar grouping to Custom, open the "PBDD Oct'26 plans" tree, and confirm that each "Budget increase — …" child shows a CO badge.
  2. Right-click any nested row, and confirm that it shows Move to group.

@bk-agent-01

Copy link
Copy Markdown
Collaborator Author

Visual acceptance on production (supersedes the earlier note that no visual check was done): Tushar checked bkt3 after the cdf2769 deploy and selected "Both sidebar checks passed" (Toolyard rq_6d3dd26d11de4c28, 2026-10-24 09:46 UTC). Under Custom grouping, the nested children show their own group badge, and right-click on a nested row shows "Move to group".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant