Skip to content

finding(plugin-list): the canonical-spelling pin says a folded view carries no value key at all for valueless operators — viewFilterFold.ts:205 writes the key whenever the source row has one, and the builder’s own row shape does #9446

Description

@claude

packages/plugin-list/src/__tests__/convertFilterGroupToAST.canonicalSpelling.test.ts carries this comment, and it is on main as of PR objectui#9362 merging at 2026-09-13T22:53:44Z:

A stored view folded by foldFilterGroupToSpecRules carries no value key at all for these operators

The fold writes the key whenever the source condition has one.

Measured on merged main, not on a branch

The claim is there. packages/plugin-list/src/__tests__/convertFilterGroupToAST.canonicalSpelling.test.ts1 occurrence of the sentence, counted newline-tolerantly with perl -0777 so the wrap inside the comment block cannot hide it. Control on the same subject, same file: foldFilterGroupToSpecRules reads 4. The zero elsewhere is negative rather than void — ListView.tsx and list-offered-operator-expressible-parity.test.ts both name the function (3 hits each) and neither carries the sentence.

The claim is false. foldFilterGroupToSpecRules lives at packages/app-shell/src/views/viewFilterFold.ts:179, and its rule construction ends:

const rule: ViewFilterRule = {
  field: c.field,
  operator,
};
if (c.value !== undefined) rule.value = c.value as ViewFilterRule['value'];

viewFilterFold.ts:201-205. Lines 198-200 are the only place valueless operators are treated specially, and what they do is exempt the row from being dropped — they do not strip value:

const takesValue = !VALUELESS_FILTER_OPERATORS.has(String(c.operator))
  && !VALUELESS_FILTER_OPERATORS.has(String(operator));
if (takesValue && isMissingValue(c.operator, c.value)) continue;

⇒ for a valueless operator the fold skips the drop and then falls straight into line 205, which writes value iff the source condition defined it.

And the common path defines it. The FilterBuilder inserts a row as { field: <first column>, operator: 'equals', value: '' } — the shape the fold's own docblock quotes at lines 155-156. '' is not undefined, so a builder-authored row for isEmpty / isNull and friends folds to a rule that does carry value: ''.

The sentence is true only for a source condition that omits value entirely. As written it is universal, and the case it is most likely to be read about is the one where it does not hold.

Why this is being filed rather than carried

No assertion depends on it, which is exactly why it survived. It was measured false twice during PR objectui#9362's review round, by two readers independently, and recorded three times as owed and deliberately below the landing bar — 5654704509, 5654896364, 5656634548. That judgement was right at the time: it is narration, not behaviour, and holding a green PR for it would have been the wrong trade.

⚠️ What changed is that the PR merged, so the false sentence is no longer one PR's debt — it is on main, where the next reader of that pin will take it as the fold's contract. There is no open PR touching that file, so ⛔ the "note it in some PR's acceptance notes" fallback does not hold: the honest carrier is a card.

⚠️ One correction to the earlier records while this is being written down: two of them cite the falsifying code as filter-converter.ts:1176-1180. On merged main packages/core/src/utils/filter-converter.ts is a different file and is not where the fold lives. The citation above (packages/app-shell/src/views/viewFilterFold.ts:201-205) is the one measured here.

What a fix looks like

One comment. Either scope the sentence to the case that holds (a source condition with no value key), or drop the claim and point at viewFilterFold.ts's own docblock, which already describes the drop/keep rule correctly. ⛔ No assertion should move: the pin's behaviour is not in question, only its narration.

⭐ Related, ⛔ not the same card: this is the third instance in one shift of published narration contradicting the code it describes, and AGENTS.md line 109 (rule #9) already forbids the class while nothing enforces it. objectui#8819 is open on a gate in this family (check:spec-symbols, which reads only the FIRST occurrence of each claim phrase per docblock). ⛔ Whether this instance is a miss of that gate is unmeasured and is not claimed here.

⛔ Filed bare on purpose: no domain:*, no priority:*, no type. Triage owns all three — this seat does not grade, and the measurement above is the whole of what it is offering.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions