fix(web): the logical note says what the lens was given, not just that it is empty - #140
Merged
Merged
Conversation
…t it is empty Ported from #133, which had this and #139 -- the version I merged -- did not. Recording that plainly: #133 was open first and I implemented #131 without checking, so the better reading of this one case shipped second. #139 noted logical only when it projected zero nodes. The quiet failure is the partial one: a lens that keeps 1 of 11 renders a plausible-looking diagram of almost nothing, which reads as "this is your estate" rather than "no data". Empty at least reads as absence. `logicalKept` is #133's function under a different name, threshold and message intact. Its reasoning is kept verbatim because it is the right reasoning: a note on every logical view would be noise, and noise is how a real signal stops being read. The `* 3` cut-off is a judgement call and is better argued with than inherited. Both call sites now count before projecting, so the note can say what was dropped. Callers that cannot count keep the empty-only check -- notesFor takes the input count as optional and prefers it when present. Verified against a live pure-k8s estate: logical projected nothing from 11 resources -- it is a cloud-topology lens, and this estate declares none of the kinds it nests (behold#74) against #139's flatter "logical is an AWS projection -- no AWS resources in this estate". The count is the part that tells you it looked at something. 462 tests (7 new), tsc and build clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012n8PKN49z8c6jZVA9QYwvk
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the one thing #133 had that #139 — the version I merged — did not.
Recording the sequence plainly: #133 was open two days before I implemented #131. I didn't check for an existing PR, merged mine as #139, and put #133 into conflict. This recovers the part of it that was better rather than discarding it.
What was missing
#139 noted
logicalonly when it projected zero nodes. The quiet failure is the partial one: a lens that keeps 1 of 11 renders a plausible-looking diagram of almost nothing, which reads as "this is your estate" rather than "no data". Empty at least reads as absence.logicalKeptis #133'slogicalDegradedunder a different name, with its threshold and both messages intact:Its reasoning is kept verbatim because it's the right reasoning — a note on every logical view would be noise, and noise is how a real signal stops being read. The
* 3cut-off is a judgement call and, as #133 put it, better argued with than inherited.Wiring
Both logical call sites now count before projecting.
notesFortakes the input count as optional and prefers it when present, so any caller that can't count keeps the empty-only check.Verified
Live pure-k8s estate, source graph and live overlay:
versus #139's flatter "logical is an AWS projection — no AWS resources in this estate". The count is what tells you the lens looked at something and rejected it.
462 tests (7 new), tsc and build clean.
After this
#133 has nothing left that isn't on main, so it should close as superseded — I'll do that once this lands.
🤖 Generated with Claude Code
https://claude.ai/code/session_012n8PKN49z8c6jZVA9QYwvk