Skip to content

fix(session-ingest-contracts): keep card step text to drawn characters - #8178

Merged
iscekic merged 12 commits into
mainfrom
drain/session-card-text-display
Oct 26, 2026
Merged

iscekic merged 12 commits into
mainfrom
drain/session-card-text-display

Conversation

@iscekic

@iscekic iscekic commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Evidence

Evidence: demonstrated — signed batches through the local session-ingest Worker persisted the projected live summary, and the authenticated widgets route returned the expected display title.

  • On this VM, the Next.js widgets route and session-ingest Worker ran against isolated local Postgres and a fake test account. The first ingest batch persisted a projected step target and plan step; a later batch persisted a null step target. The widgets route returned the expected title in details.primaryTitle.
  • pnpm --filter @kilocode/app-shared exec vitest run src/home-widget.test.ts — 15 tests passed.
  • pnpm --filter cloudflare-session-ingest exec vitest run src/dos/session-live-text.test.ts — 6 tests passed.
  • oxfmt and git diff --check passed for the changed files.

Change

The Home widget title builder uses the shared display projection while retaining its existing title filter and length limit.

Production prerequisites

None.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: How should the projection treat the selected characters? Answer: Remove them.
  2. Question: Where should coverage live? Answer: In the service Vitest suite.
  3. Question: What should be in scope? Answer: The selected set only.
  4. Question: Which shaping characters should remain? Answer: Keep the shaping joiners.
  5. Question: How should the session proceed while the shared build is pending? Answer: Wait for that build, then rerun once.

@iscekic iscekic added drain Work item from the findings drain janitor:trust Janitor finding: trust boundary hardening labels Oct 19, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change adds a widget title test asserting that line separators and a NUL in a stored title become spaces and that the widget keeps the result on one line; the expectation matches sessionDisplayLine plus the NON_PRINTING_TITLE_CHARACTERS pass in safeTitle, and no new defects were found.

Assumptions: [INFERENCE] sessionDisplayLine leaves runs of white space intact, so the widget title keeps the three spaces this test asserts while sessionLiveText collapses them on the session card; that difference is documented in session-live-summary.ts and unchanged by this PR.

Files Reviewed (3 files)
  • packages/app-shared/src/home-widget.test.ts
  • packages/app-shared/src/home-widget.ts
  • packages/session-ingest-contracts/src/session-live-summary.ts
Previous Review Summaries (8 snapshots, latest commit 7ea09eb)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 7ea09eb)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change adds a notifications test covering content-state behavior when the card's title, step target, plan step, and permission command consist only of characters that draw nothing; the expectations match the current sessionLiveActivityTitle/sessionLiveText implementation and the schema, and no new defects were found.

Assumptions: [INFERENCE] Mobile list and chat surfaces still render stored session titles through sessionDisplayTitle rather than sessionDisplayLine, so the shared-rule doc's "every display surface" claim remains wider than current behavior. That wording concern is already covered by the active thread on session-live-summary.ts and is not re-raised as a new finding.

Files Reviewed (6 files)
  • packages/notifications/src/session-live-activity.test.ts
  • packages/notifications/src/session-live-activity.ts
  • packages/session-ingest-contracts/src/session-live-summary.ts
  • packages/app-shared/src/home-widget.ts
  • packages/app-shared/src/home-widget.test.ts
  • packages/app-shared/package.json

Previous review (commit 8b99c34)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change routes the home widget row title through the shared sessionDisplayLine rule through a dedicated contracts subpath export, with matching coverage and consistent workspace dependency wiring; the previously reported doc-vs-widget mismatch is resolved.

Assumptions: [INFERENCE] Mobile surfaces that render stored session titles through sessionDisplayTitle still trim rather than apply the display rule, so the shared-rule doc's "every display surface" sentence remains wider than current behavior; it was already discussed on the active thread and is not re-raised.

Files Reviewed (5 files)
  • packages/app-shared/src/home-widget.ts
  • packages/app-shared/src/home-widget.test.ts
  • packages/app-shared/package.json
  • packages/session-ingest-contracts/package.json
  • pnpm-lock.yaml

Previous review (commit b48e23e)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The incremental change routes card, step, plan, and permission text through the shared display rule and adds matching coverage; the only remaining issue is the new shared-rule doc claiming every display surface uses it while the home widget still sanitizes session titles with the old regex.

Assumptions: [INFERENCE] Native rendering is assumed to display the content-state strings as provided; no other display surface in this repo was found to reuse sessionDisplayLine.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/session-ingest-contracts/src/session-live-summary.ts 98 Doc claims every display surface reads stored text through this rule, but safeTitle in packages/app-shared/src/home-widget.ts:120 still keeps bidi/format controls, so the same session title reads two ways.
Files Reviewed (3 files)
  • packages/notifications/src/session-live-activity.ts - 0 issues
  • packages/notifications/src/session-live-activity.test.ts - 0 issues
  • packages/session-ingest-contracts/src/session-live-summary.ts - 1 issue

Previous review (commit e1146c9)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change is doc-and-test-name only: the sessionLiveText doc now scopes the null result to empty text, white space, and joiner-only text, which matches the implementation and the joiners-gone test case, resolving the prior doc mismatch.

Files Reviewed (2 files)
  • packages/session-ingest-contracts/src/session-live-summary.ts
  • services/session-ingest/src/dos/session-live-text.test.ts

Previous review (commit c5b15ca)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The previous joiner-preservation and doc findings are resolved; the remaining gap is that the new draw-nothing guard only special-cases ZWNJ/ZWJ, leaving other default-ignorable characters as invisible non-null text.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/session-ingest-contracts/src/session-live-summary.ts 117 The joiner-only check does not cover variation selectors, U+180E, or tag characters, which also draw nothing but still return non-null, contradicting the new "text that draws nothing gives null" doc at line 99.
Files Reviewed (2 files)
  • packages/session-ingest-contracts/src/session-live-summary.ts - 1 issue
  • services/session-ingest/src/dos/session-live-text.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 12aa42c)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The joiner-preservation fix itself is correct; the remaining issues are the now-stale display-text docs and joiner-only text returning an invisible non-null target.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/session-ingest-contracts/src/session-live-summary.ts 77 The doc still says display text keeps only code points that draw themselves, but ZWNJ/ZWJ are now preserved; line 96 carries the same stale claim.
packages/session-ingest-contracts/src/session-live-summary.ts 84 Preserving U+200C/U+200D makes joiner-only text return an invisible non-null string instead of null.
Files Reviewed (2 files)
  • packages/session-ingest-contracts/src/session-live-summary.ts - 2 issues
  • services/session-ingest/src/dos/session-live-text.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit bba7522)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The follow-up only clarifies the isFormatControl doc comment; the code still removes ZWJ/ZWNJ from display text, which changes how emoji sequences and Persian/Indic words render.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/session-ingest-contracts/src/session-live-summary.ts 84 The 0x200b–0x200f range still removes U+200C ZWNJ and U+200D ZWJ. The comment now describes the rule accurately, but the behavior is unchanged: emoji ZWJ sequences render as separate emoji and Persian/Indic shaping changes.
Files Reviewed (3 files)
  • packages/session-ingest-contracts/src/session-live-summary.ts - 1 issue
  • services/session-ingest/src/dos/session-live-summary.test.ts - 0 issues
  • services/session-ingest/src/dos/session-live-text.test.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 459013c)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The display-text sanitization is sound and well covered, but the new format-control range also strips ZWJ/ZWNJ, which visibly changes legitimate emoji and Arabic/Indic text.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/session-ingest-contracts/src/session-live-summary.ts 83 The 0x200b–0x200f range removes U+200C ZWNJ and U+200D ZWJ, which change how adjacent glyphs are drawn (emoji ZWJ sequences render as separate emoji; Persian/Indic shaping changes).
Files Reviewed (3 files)
  • packages/session-ingest-contracts/src/session-live-summary.ts - 1 issue
  • services/session-ingest/src/dos/session-live-summary.test.ts - 0 issues
  • services/session-ingest/src/dos/session-live-text.test.ts - 0 issues

Reviewed by deepseek-flash-latest · Input: 93K · Output: 8.6K · Cached: 945.3K

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic enabled auto-merge October 19, 2026 23:38
@iscekic iscekic added the merge:human Substantive functional risk requires human review. label Oct 19, 2026
Session card text reads through the shared display rule: control characters
and line breaks become spaces, characters that draw nothing are left out, and
each field keeps its documented length limit. The card title, step target,
plan step and permission command each draw the line they stand for.
@iscekic
iscekic disabled auto-merge October 22, 2026 01:13
@iscekic iscekic removed the merge:human Substantive functional risk requires human review. label Oct 22, 2026
…xt-display

# Conflicts:
#	packages/notifications/src/session-live-activity.ts
The home widget row title reads through the shared display rule, so both
title surfaces follow one character rule. The rule is imported through a
dedicated contracts entry, which keeps the module free of runtime globals the
widget bundle does not provide.
@iscekic iscekic added the merge:human Substantive functional risk requires human review. label Oct 22, 2026
@iscekic
iscekic enabled auto-merge October 22, 2026 01:39
@iscekic
iscekic disabled auto-merge October 22, 2026 16:49
@iscekic iscekic added merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:human Substantive functional risk requires human review. labels Oct 22, 2026
@iscekic
iscekic enabled auto-merge October 22, 2026 18:21
@iscekic
iscekic disabled auto-merge October 22, 2026 21:26
@iscekic iscekic added merge:blocked:insufficient-e2e Verification does not cover the change and removed merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. labels Oct 22, 2026
@iscekic iscekic added merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. intent:ok Janitor change confirmed as a real bug fix, not intended behavior and removed merge:blocked:insufficient-e2e Verification does not cover the change labels Oct 22, 2026
@iscekic
iscekic enabled auto-merge October 24, 2026 15:00

@eshurakov eshurakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shallow review: no critical issues found.

…xt-display

# Conflicts:
#	packages/app-shared/src/home-widget.test.ts
#	packages/app-shared/src/home-widget.ts
@iscekic
iscekic disabled auto-merge October 26, 2026 13:26
@iscekic iscekic added merge:blocked:kilobot-not-ready Review bot has not recommended merge at this head merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. merge:blocked:kilobot-not-ready Review bot has not recommended merge at this head labels Oct 26, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 4c75657 Oct 26, 2026
112 checks passed
@iscekic
iscekic deleted the drain/session-card-text-display branch October 26, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain intent:ok Janitor change confirmed as a real bug fix, not intended behavior janitor:trust Janitor finding: trust boundary hardening merge:bot Bot-owned review; merge when ready once readiness passes and a review approves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants