Skip to content

fix(delivery): a repository row is not a pull request - #6459

Open
vivekchand wants to merge 2 commits into
mainfrom
fix/delivered-row-labels
Open

vivekchand wants to merge 2 commits into
mainfrom
fix/delivered-row-labels

Conversation

@vivekchand

Copy link
Copy Markdown
Owner

Why

Found by looking at the rendered tab in a browser, which is the one check six rounds of fixes to this tab had not done. The Repositories view showed:

vivekchand/clawmetry #vivekchand/clawmetry      explored   94   not measured
vivekchand/clawmetry-cloud #vivekchand/clawmetry-cloud  explored 85  not measured

and the summary above it read "100 pull requests" over a table of repositories.

One cause for both: query_delivery carries kind on the envelope, not on each row, so the renderer's !r.kind test was true for every row and every row was drawn in pull-request form, where the label is the repository followed by # and the reference. A repository row's reference is its name, so the name printed twice with a # wedged between.

Every audit in this effort was run against the rows, and the rows were right. Only the rendering was wrong, which is why six rounds of data checks never saw it.

What

  • The row label follows the kind of the view when the row carries none of its own.
    • a pull request still reads owner/name #number
    • a repository reads its name
    • a branch, commit or path reads its reference, under its repository when the row knows one and it is not the same string
  • The count chip names what the table actually lists: repositories, branches, commits, files, or pull requests.

Verified

3 browser tests against the shipped templates/tabs/delivery.html and static/js/app.js with synthetic fixtures, no live store and no user browser, following the existing _shared_chromium pattern.

  • test_a_repository_row_is_not_rendered_as_a_pull_request — red against released 0.12.927
  • test_a_branch_row_shows_the_branch_and_no_hash — red against released 0.12.927
  • test_a_pull_request_row_still_reads_repo_then_number — passes both ways on purpose: the half a kind-aware label could quietly break

Also read in a real browser against the live node before and after: 100 rows rendered, 0 console errors, 0 page errors, and no undefined, NaN, null, [object Object] or unescaped entity in any rendered cell.

Limits

The renderer still has no per-row kind to trust, so a response mixing kinds in one list would label them all by the view. Nothing produces such a response today: the store is asked for one kind at a time.

Product record: https://factory.8090.ai/project/b415065f-ab2f-4f53-8864-0c009fd098cb/requirements/eedac1ad-764f-4f9c-bb00-f51c8d47618d

🤖 Generated with Claude Code

vivekchand and others added 2 commits October 16, 2026 02:51
The Repositories view rendered `vivekchand/clawmetry
#vivekchand/clawmetry` on every line, and the summary said "100 pull
requests" over a table of repositories. query_delivery carries `kind` on
the envelope, not on each row, so `!r.kind` was true for every row and
every row was drawn in pull-request form, where the label is the repo
followed by `#` and the ref. A repo row's ref IS its name.

The label now follows the view's kind when the row carries none: a PR
still reads `owner/name #number`, a repository reads its name, and a
branch, commit or path reads its ref under its repository when that is a
different string. The count chip names what the table lists.

Found by looking at the rendered tab in a browser. Six rounds of fixes
here were measured against the data, where this was invisible: the rows
were right and only their rendering was wrong.

3 browser tests against the shipped template and app.js with synthetic
fixtures; 2 are red against the released 0.12.927, and the third pins
the pull-request label that a kind-aware change could quietly break.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@8090-software-factory

Copy link
Copy Markdown

✅ Drift Bot (ClawMetry): no drift detected

Drift Bot analyzed the changed files against this project's blueprints and requirements and found no drift.

@8090-software-factory

Copy link
Copy Markdown

⚠️ Drift Bot (ClawMetry): 1 potential drift finding(s)

1. Blueprint: Delivery attribution: which pull request the spend bought, split and never copied

File: clawmetry/static/js/app.js:23474

The blueprint specifies that each SessionArtifact model row should have a required 'kind' field (one of pr/repo/branch/commit/file), but the API implementation places 'kind' only on the response envelope, requiring rows to fall back to the view-level kind during rendering.

var label = (r.kind === 'pr' || !r.kind)
? ((r.repo ? escHtml(r.repo) + ' ' : '') + '#' + escHtml(r.ref))
: escHtml(r.ref);
// The row carries no kind of its own: query_delivery puts it on the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Drift Bot (ClawMetry) — Blueprint: Delivery attribution: which pull request the spend bought, split and never copied

The blueprint specifies that each SessionArtifact model row should have a required 'kind' field (one of pr/repo/branch/commit/file), but the API implementation places 'kind' only on the response envelope, requiring rows to fall back to the view-level kind during rendering.

@github-actions

Copy link
Copy Markdown
Contributor

Visual diff

Comparing f89a4b3fda85 (head) against the PR base branch.

No flagged differences (running with ALWAYS_POST=1).

View Before After Diff
desktop overview before after diff · 0.00%
desktop flow before after diff · 0.03%
desktop brain before after diff · 0.00%
desktop usage before after diff · 0.00%
desktop crons before after diff · 0.00%
desktop memory before after diff · 0.02%
desktop security before after diff · 0.02%
desktop subagents before after diff · 0.00%
desktop transcripts before after diff · 0.00%
desktop logs before after diff · 0.00%
desktop skills before after diff · 0.02%
desktop models before after diff · 0.01%
desktop approvals before after diff · 0.00%
desktop alerts before after diff · 0.00%
desktop notifications before after diff · 0.01%
desktop limits before after diff · 0.00%
desktop history before after diff · 0.00%
desktop channels before after diff · 0.01%
desktop harness before after diff · 0.00%
desktop inventory before after diff · 0.00%
desktop node-activity before after diff · 0.00%
desktop assistant before after diff · 0.00%
desktop setup before after diff · 0.01%
desktop improve before after diff · 0.03%
desktop nemoclaw before after diff · 0.00%
desktop guard before after diff · 0.00%
desktop signals before after diff · 0.00%
desktop policy before after diff · 0.00%
desktop selfevolve before after diff · 0.01%
desktop swimlane before after diff · 0.01%
desktop tool-catalog before after diff · 0.00%
desktop tracing before after diff · 0.00%
desktop turn-anatomy before after diff · 0.06%
desktop version-impact before after diff · 0.00%
desktop context-economics before after diff · 0.01%
desktop agents before after diff · 0.01%
desktop dives before after diff · 0.00%
desktop evals before after diff · 0.00%
desktop bench before after diff · 0.01%
desktop trail before after diff · 0.01%
desktop compliance before after diff · 0.00%
desktop price-book before after diff · 0.01%
desktop delivery before after diff · 0.00%
mobile overview before after diff · 0.00%
mobile flow before after diff · 0.00%
mobile brain before after diff · 0.00%
mobile usage before after diff · 0.00%
mobile crons before after diff · 0.00%
mobile memory before after diff · 0.03%
mobile security before after diff · 0.00%
mobile subagents before after diff · 0.00%
mobile transcripts before after diff · 0.00%
mobile logs before after diff · 0.61%
mobile skills before after diff · 0.01%
mobile models before after diff · 0.00%
mobile approvals before after diff · 0.08%
mobile alerts before after diff · 0.00%
mobile notifications before after diff · 0.00%
mobile limits before after diff · 0.00%
mobile history before after diff · 0.00%
mobile channels before after diff · 0.00%
mobile harness before after diff · 0.00%
mobile inventory before after diff · 0.00%
mobile node-activity before after diff · 0.00%
mobile assistant before after diff · 0.00%
mobile setup before after diff · 0.00%
mobile improve before after diff · 0.06%
mobile nemoclaw before after diff · 0.00%
mobile guard before after diff · 0.00%
mobile signals before after diff · 0.00%
mobile policy before after diff · 0.00%
mobile selfevolve before after diff · 0.00%
mobile swimlane before after diff · 0.00%
mobile tool-catalog before after diff · 0.00%
mobile tracing before after diff · 0.00%
mobile turn-anatomy before after diff · 0.05%
mobile version-impact before after diff · 0.00%
mobile context-economics before after diff · 0.00%
mobile agents before after diff · 0.00%
mobile dives before after diff · 0.00%
mobile evals before after diff · 0.00%
mobile bench before after diff · 0.00%
mobile trail before after diff · 0.00%
mobile compliance before after diff · 0.00%
mobile price-book before after diff · 0.00%
mobile delivery before after diff · 0.00%

Folder: f89a4b3fda85. Full PNGs also attached as a workflow artefact.

Generated by visual-diff bot. Pixel diffs >1% flagged; eyeball the table before merging. This check is non-blocking — fail = bot bug, not a code problem.

This branch has not been deployed

No deployments
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.

1 participant