Skip to content

fix(tools): a phone keeps the connector row's reason, and the row speaks in the person's words - #1874

Merged
lilyshen0722 merged 5 commits into
mainfrom
kai/row-a-github-tools
Sep 25, 2026
Merged

lilyshen0722 merged 5 commits into
mainfrom
kai/row-a-github-tools

Conversation

@lilyshen0722

@lilyshen0722 lilyshen0722 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Live GitHub readiness walk on 9a32fca5: at 390 a stranger saw the Tools GitHub row reading "not granted" with no reason and no action. The state is now named precisely (eng lead 73726): V2ConnectorTools.tsx:562 classes --not-yet plus --not-enabled only when !entry.available, while the phone block at v2.css:9942 hid .v2-connector-row__detail for every state except --dead / --not-enabled. So --not-yet with entry.available === true lost :571's two live strings — "install the GitHub App first · an admin does this once" and "read, or read and write" — and the surviving kicker read as a verdict with nothing behind it.

The rule is inverted, not extended. Deleting the enumeration means show is the default, so the next state cannot be lost the same way; only a named case would hide a detail on phones, and none does today.

The old shape was pinned by the test that should have caught it. v2-layout-invariants.test.ts asserted the enumerating selector was present — so the invariant suite was holding the defect in place. That assertion is replaced by one that fails on any rule hiding .v2-connector-row__detail in the 760 block, with a positive control that the phone block was located (a missing marker would otherwise let the assertion pass against one trailing character). Mutation-checked on the committed tree: re-introducing the blanket rule reddens the new pin and the assertion that replaced the old one.

The two reason strings themselves were already render-asserted (V2ConnectorTools.test.tsx:280, :317) — that half was never the hole; jsdom cannot see display: none, which is what this pin adds.

Copy, in the person's words — the row's description comes from the catalogue, so the string a stranger reads is backend-served:

before after
"Issues and pull requests in the repository the GitHub App is installed on, called through Commonly's broker on a room grant." "Issues and pull requests in this instance's own GitHub repository. Connecting your own GitHub is coming."
"List open issues in the Commonly repository." (×6 tool descriptions) "List open issues in this instance's GitHub repository." (×6)

All eight descriptions now say one thing. Four of the eight are write tools: github.create_issue and github.comment_on_issue, which this PR changed, and github.close_issue / github.merge_pull_request, which it had left saying "the connected GitHub repository". An earlier version of this body claimed the two write tools already said "connected" and were untouched — that was wrong (there are four, and I had changed two of them), and it is corrected here rather than in a comment, because a durable artifact is where the next reader gets their model. Vera caught the resulting split from the outside in 73735: an agent reading its own tool list saw two phrasings for one repository, which is the same confusion this row removes one layer up. The two phrasings are merged into one sentence for all eight.

Tests: frontend 139/139 across v2-layout-invariants + V2ConnectorTools; backend 17/17 across toolInstallables + toolBrokerService.

Evidence, and it is the reported state. Four captures under docs/design/evidence/ — row-a-tools-github-not-granted-{390,1200}-{before,after}.png — made with scripts/ui-evidence-shot.mjs against a local backend on 5050 and vite on 3000, signed in as a freshly registered non-admin account with no GitHub grant, which is the shape the live walk used.

shot what the stranger sees
before 390 GitHub · not granted · the old description — and nothing under it (539 ch)
before 1200 same revision, same account: … · install the GitHub App first · an admin does this once (600 ch)
after 390 not granted · the new description · install the GitHub App first · an admin does this once (574 ch)
after 1200 same, new description (580 ch)

before-390 against before-1200 is the defect itself: one revision, one account, the reason present at 1200 and absent at 390. The after pair restores it, and the copy change is visible in the same shot because the description is catalogue-served.

Two notes so the pair can be trusted rather than believed. Reaching the state at all needs GITHUB_APP_ID + GITHUB_APP_PRIVATE_KEY set locally — toolInstallables.ts:61 is what makes entry.available true, and without them the row renders --not-enabled, which the old rule did exempt; a pair in that state is identical and proves nothing (measured: the first local attempt showed the reason line on both sides for exactly this reason). And a text-only agent can read the innerText dumps the script writes beside each PNG, which is where that table comes from.

Folded after Vera's 73747 and 73776 (the guard's scope, in three rounds)

Two rounds of review found the same class of error in the pin, each time fixing one hole by opening the next, so the third round converges instead of widening again.

  1. Unbounded — the first version sliced from the connectors marker to EOF (~2,125 lines), so the first legitimate hide in another block would have reddened it naming a block it isn't in (vera 73735).
  2. 760-only — bounding it to the one block that carried the row meant a hide in a @media (max-width: 640px) block, which a 390 phone also matches, would reproduce the identical defect at the identical viewport while the pin stayed green (vera 73747).
  3. Every max-width >= 390 — still a media set, and 73776 named the last hole: a phone also matches @media (hover: none) and @media (hover: none), (pointer: coarse), neither of which has a max-width.

The claim was never about a viewport: no rule in v2.css may hide the row's reason, and NAMED_DETAIL_HIDE_CASES is the deliberate exception list. So 7189b9e8 reads the whole sheet and deletes mediaBlocksMatchingMinWidth rather than widening it again. The two controls move onto the sheet itself (it carries the class, and it carries the not-yet row's details wrapper), and the check now covers visibility: hidden as well as display: none — the same loss through a different property.

Measured, through mutations aimed at the exact blind spots the reviews named:

mutation previous guard this guard
display:none inside @media (max-width: 640px) 120 passed (blind) 1 failed
display:none inside @media (hover: none) 120 passed (blind) 1 failed
visibility:hidden appended to the sheet 120 passed (blind) 1 failed

Each failure is this test, by name: nothing in v2.css hides the connector row's reason, at 390 or anywhere. Lint on the file is 0 errors / 6 warnings, unchanged from its baseline, and the file is 120/120. Vera's own measurement — that nothing in the sheet hides the reason today — is what makes the wide scope safe, and it is now enforced rather than assumed.

Known gap, reported and not fixed here: the row still offers no action. renderNotYet's three controls are guarded by !entry.available (the Ask request link), canAdd (needs an existing connection) and canInstallGithubApp (isAdmin). In the state the live walk hit — available, no connections, non-admin — all three are false, so the row renders no affordance at all. That is why the 390 frame ends at the reason line: there is nothing under it to crop. Restoring the reason is this PR's job; giving the person a next step is a separate change and needs the lane to choose the verb.

… person's words

The phone block hid `.v2-connector-row__detail` for every state except two
enumerated ones (`:not(--dead):not(--not-enabled)`), so the state at
V2ConnectorTools.tsx:562 — `--not-yet` with `entry.available === true` — lost its
reason: a stranger at 390 saw a "not granted" kicker and nothing under it, no
reason and no action (eng lead 73723/73726, live walk on `9a32fca5`).

Inverted rather than extended: show is the default and no row's detail is hidden
at 760. An exception list loses the next state the same way it lost this one.

The pin that required the old shape (`v2-layout-invariants.test.ts`) is replaced
by one that fails on any hide rule for that element, with a positive control that
the phone block was found — the pre-existing assertion pinned the enumerating
selector, which is why the shape survived.

Copy, in the person's words: the GitHub catalogue description no longer says
"called through Commonly's broker on a room grant" and now says what it does and
what is coming; the six broker tool descriptions no longer claim "the Commonly
repository" — this is the instance's own repository.
Vera 73735: close_issue and merge_pull_request still said "the connected GitHub
repository" while the other six now said "this instance's GitHub repository" —
two phrasings for one repo, in the list an agent reads, which is the same
confusion this row exists to remove one layer up.

Also corrects a claim in the PR body: four of the eight are write tools
(create_issue, comment_on_issue, close_issue, merge_pull_request) and the first
two were changed, not untouched — the untouched pair is close/merge.

And bounds the new invariant to the block it is about: a raw slice from the
connectors marker ran to EOF (~2,125 lines, ten later @media blocks), so the
first legitimate hide in a narrower block would redden it with a message naming
a block it is not in. It now uses the file's brace-balanced
mediaBlockContaining helper, with the positive control unchanged.

Re-mutated on the committed parent: re-introducing the blanket hide still
reddens both the new pin and the replaced assertion.
…real browser

Four captures under `docs/design/evidence/` from `scripts/ui-evidence-shot.mjs`
against a local backend (5050) + vite (3000), signed in as a freshly registered
non-admin account with no GitHub grant — the shape the live walk used.

before 390: `GitHub / not granted / <old description>` and NOTHING under it (539ch)
before 1200: same revision, same account, reason line present (600ch)
after 390: `not granted / <new description> / install the GitHub App first · an
admin does this once` (574ch)

The before pair differs from itself by viewport alone, which is the defect; the
after pair restores the reason at 390. Reaching the state needed
`GITHUB_APP_ID` + `GITHUB_APP_PRIVATE_KEY` set locally (`toolInstallables.ts:61`
is what makes `entry.available` true): without them the row is `--not-enabled`,
which the old rule exempted, so the pair would have been identical and proved
nothing.
…0 one (vera 73747)

Vera named the cost of the fix she asked for: bounding the scan to the 760 block
traded an over-broad scope for an under-broad one. A 390-wide phone also matches
`@media (max-width: 640px)` (five blocks in the file), so a hide placed there
would reproduce the original defect at the original viewport while this guard
stayed green.

The scan now walks every `@media (max-width: N)` block with N >= 390 — all 30 in
the file — with a floor of 25 so a regex that stopped matching cannot pass by
scanning nothing, and the same positive control, now against the union. The
shared `mediaBlockContaining` helper and its two other callers are untouched.
…media set (vera 73776)

Three rounds of this guard each picked a wrong media set — unbounded, then
760-only, then every `max-width >= 390` — and each round fixed one hole by
opening the next. Vera found the third: a 390 phone also matches
`@media (hover: none)` and `(pointer: coarse)`, so `mediaBlocksMatchingMinWidth`
was blind to two blocks that apply at the viewport it is about.

The claim was never about a viewport: no rule in v2.css may hide the row's
reason, and `NAMED_DETAIL_HIDE_CASES` is the deliberate exception list. So this
reads the whole sheet and deletes the helper rather than widening it again. The
two controls move to the sheet itself, and the hiding check covers
`visibility:hidden` as well as `display:none` — same loss, different property.
@samxu01
samxu01 force-pushed the kai/row-a-github-tools branch from 7189b9e to 15b0941 Compare September 25, 2026 08:41
@lilyshen0722
lilyshen0722 added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit f5ded48 Sep 25, 2026
14 checks passed
samxu01 pushed a commit that referenced this pull request Sep 25, 2026
…after, from a real browser

Four captures under `docs/design/evidence/` from `scripts/ui-evidence-shot.mjs`,
on `/v2/connectors` at 390 and 1200, pairing main against this branch:

    base f5ded48 : The connection dropped.
    head          : Telegram stopped delivering: the bot was blocked or removed from this chat.
                    Slack stopped delivering: this channel no longer exists.

Viewer is a local reproduction account that owns the pod the two connectors
belong to. The errored rows are seeded directly in the dev database — `status:
error` carrying the reason a permanent failure writes — which is the state the
flip produces and the API refuses to create. Both frontends talk to the same
backend, so the pair differs in the frontend revision only, and the innerText
diff is exactly the three reason lines at both widths: no other line moves.

That last check is the one the runbook asks for, and the first pass of this pair
failed it. Cut against 0e14213 it also dropped `reconnect to resume` and the
GitHub row's second line at 390 — this branch predated #1874, which had just
restored those detail lines to the phone layout. The artifact was in the base,
not in the change; the branch is now cut from f5ded48 and the diff is clean.
lilyshen0722 added a commit to thantiklermcirony/commonly that referenced this pull request Oct 9, 2026
…tops (Team-Commonly#1878)

* fix(connectors): name a permanent Telegram delivery failure on the connector

Row D. A permanent send failure changed nothing: the integration stayed
`connected` with `errorMessage: null`, no Activity row was written, and the
relay kept running — so a user who blocked the bot saw replies vanish while the
page said the connector was fine.

Classify at the call site, by the chat the send targeted (wren 73777). Only the
four sends to the connector's own bound chat may flip — telegramBridge :204,
:285, :406 and decisionCardReconcileService :101 — plus the bind confirmation in
the webhook route, whose permanent failure undoes the bind it just wrote.

  - `telegramService.sendMessage` now returns Telegram's own `errorCode` and
    `description`. They were read only to be logged, so every failure arrived as
    axios's "Request failed with status code 400" and a 403 was indistinguishable
    from a transient one. The service still decides nothing.
  - `noteBoundChatDeliveryFailure` refuses any chat that is not the connector's
    bound one, so an inbound update's failure cannot mislabel the owner's
    connector (vera 73761) even if a receive-side site is wired to it later.
  - Permanent is a 403, or a 400 whose description says the chat is gone. A 401
    is the shared bot token and any other 400 is content — a pod named `A <b>`
    400s every confirmation with "can't parse entities", and that must not undo
    a working bind. Handled at the source: `escapeHtml` moves into
    telegramService beside the `parse_mode: 'HTML'` it exists for and is
    imported back by the bridge, replacing a copy rather than adding one.
  - The flip is one update matched on {_id, config.chatId}: status `error`, named
    `errorMessage`, chatId unset — which stops the relay and re-allows a connect
    code — and an Activity row only if it matched. The bind clears `errorMessage`
    so reconnecting clears the named reason.

Tests: classification truth table, each non-permanent shape, the inbound-chat
refusal, a transient failure end to end, and the re-bind race. The pass-through
test exists because without the two fields the whole feature is a silent no-op.

* fix(connectors): escape every value the Telegram route interpolates into HTML

vera 73812: the bind confirmation was not the only site. `telegramService`
sets `parse_mode: 'HTML'`, and this route interpolated three more values
straight into it:

  :315  the pod summary title and body (generated from pod messages)
  :372  the pod name again, in /status
  :374  `config.leadAgentUsername`, a value the agent is named by

All four now go through `escapeHtml`, imported from `telegramService` (already
required here) rather than added as a fifth copy of the helper.

This is not only an injection fix. Telegram HTML accepts `<a href>`, so an
unescaped name renders a clickable link inside a message the user reads as the
bot's own words; and a stray `<` returns 400 "can't parse entities" — the
content-400 class the new classifier is required NOT to flip the connector on.
Escaping removes that class at its source instead of asking the classifier to
keep sorting it out.

Witnesses: the four sites are asserted through the real route, with values that
would render as markup if unescaped. Two harness fixes were needed and are
disclosed:

  - the test's `telegramService` mock was `{ sendMessage }` only, so the newly
    imported `escapeHtml` was undefined and the pre-existing `/commonly-enable`
    test went red with a 500. `sendMessage` stays stubbed (it is the network);
    `escapeHtml` is now the real one, because escaping is behaviour this route
    owes.
  - the bind's `findByIdAndUpdate` assertion pins the `{ new: true }` third
    argument: the confirmation's classification reads back the chat id that
    update stores, so without it a permanent failure of the confirmation could
    never undo the bind it just wrote.

* fix(test): make the Telegram route test file parseable so lint can see it

`24 * 60 * 60_000` is a numeric separator, which espree's grammar does not
accept; eslint stops at a parse error, so every line after 288 in this file —
including the four escape witnesses added in the previous commit — was
unmeasured by the linter. `60000` is the same value.

Disclosure: unblinding exposes 46 problems in this file (44 errors, 2 warnings),
all in pre-existing code this row does not touch, and NONE in the lines added
here. They are left alone: the backend `.js` corpus is ungated with 2,279 known
errors and clearing this file is burn-down work, not row D.

* fix(connectors): classify Slack delivery failures on the same surface as Telegram

wren 73779 asked for the same split on Slack's `ok:false` error string and the
same unset, so that a re-authorize is not refused by the connect-code 409 while
the dead channel is still on the row. Slack stores its bound channel in
`config.chatId` exactly as Telegram does, so this is the same update, reached
through the same entry point.

Permanent (`channel_not_found`, `not_in_channel`, `is_archived`), transient and
content errors left alone, and — the important exclusion — `invalid_auth`,
`token_revoked` and `account_inactive` are NOT permanent: they are the shared bot
app, Slack's analogue of the Telegram 401 that must never mark one connector as
needing attention.

`noteBoundChatDeliveryFailure` now sorts the two providers by result shape
(`{success, errorCode}` vs `{ok, error}`) rather than making every call site name
its provider. The bound-chat provenance guard is unchanged and therefore applies
to Slack too: an inbound channel's failure cannot flip an owner's connector.

Sites, all four sending to the bound channel:
  slackBridgeService :139 (no-active-pod), :228 (relay), :336 (card confirmation)
  decisionCardReconcileService :117 (closing line)

Two of my first-pass test premises were wrong and the measurements corrected
them, both kept in the comments:

  - the relay does NOT propagate its failure — it wraps the send in a try/catch
    and warns — so the witness asserts the classification and the absent relayMap
    write instead of a rejected promise;
  - closing-line delivery is deliberately detached (`void Promise.allSettled`),
    so the end-to-end witness polls for the flip rather than asserting into a
    race with a background write.

Also fixed: `classifyDeliveryFailure` did not accept `null`, which ts-jest
rejected and made two suites fail to run.

* test(connectors): witness the Telegram closing-line flip too

The first attempt at mutating the Slack closing-line classification removed a
line from the Telegram branch instead: the two classification lines are
textually identical and the mutation tool took the first match. The probe that
caught it showed the flip still coming from `sendClosingLine:126`, which is the
Slack branch — so the Slack witness was fine and the Telegram site had no
witness at all. It has one now, and the mutations are anchored on each branch's
own throw line.

* feat(connectors): show the named reason a connector needs attention

The page prints a fixed "The connection dropped." for every errored connector,
so the reason the backend now writes has no reader: `interface Connector` had no
`errorMessage` field at all (the catalog half at :814 already rendered the
installation's, which is why only the connector row was silent).

Two lines: the field, and the row line prefers it with the existing sentence as
the fallback for rows that predate it and for failures we do not classify.

`/api/integrations/user/all` returns the row whole and
`projectIntegrationForViewer` strips config secrets rather than top-level fields,
so no server change was needed — checked rather than assumed, since a reason the
API drops would make this render dead code.

Witness: a connector with `status: 'error'` and a `errorMessage` renders that
text and NOT the generic sentence; the pre-existing test still pins the fallback
for a row without one. Dropping the `||` reddens the new test alone (41 others
pass), so the two are separable.

* fix(connectors): escape the values Slack interpolates into mrkdwn

Same class as 0fec9e6, one provider over. mrkdwn reads `<url|label>` as a link
and `<!channel>` as a mention, so a pod name or message body that reaches a
human's DM unescaped can be made to say what the bot never said.

Two sites, both named by wren (73822) and confirmed complete by vera (73823):

- `slackBridgeService` relay fall-through: one ternary, two escape regimes. The
  card branch runs every field through the renderer, which escapes; the
  fall-through interpolated the pod name, the author and the body raw. Slice
  before escaping, as telegramBridgeService:279 already does — the other order
  can cut a `&amp;` in half.
- `installables.ts` connect marker: the pod name, straight into the text a human
  reads as the bot's confirmation.

Both locals are gone: the helper now lives in `slackApi.ts` beside
`chat.postMessage`, where the escape and the call that needs it cannot drift
apart, and the two copies import it back. It takes `String(value ?? '')` — the
reconcile copy's nullish handling with `??` rather than `||`, so a missing value
renders as nothing (the bridge's `String(raw)` would render the word
"undefined") while a legitimate `0` or `false` still renders as itself
(vera 73824).

Both test harnesses stubbed the SlackApi constructor whole, which would have
left the static undefined and turned an escaped send into a caught warn; they
now keep the real escape and stub only the network. Witnesses: the relay with a
hostile pod name, author and body; the connect marker with a hostile pod name;
and the helper itself, including `undefined` -> '' and `0` -> '0'.

* test(connectors): keep the real escape in every harness that stubs its module

Nine harnesses stub `telegramService` or `slackApi` whole. That was harmless
while both escapes were file-local, and stopped being harmless this branch: the
bridge now reads `escapeHtml` off the telegram service and the Slack renderer
reads `escapeSlackMrkdwn` off the SlackApi class, so a bare stub leaves them
undefined and the send is swallowed by the caller's try/catch — the failure
looks like "sendMessage was never called".

The route test was fixed when it first bit (0fec9e6). The other eight were not
run by anything I ran, and only the full suite showed them: two of the files that
exercise the bridges fail 39 and 37 tests respectively, from this one cause.
Every one of the nine now stubs the network and keeps the behaviour, so an escape
asserted anywhere is the escape we ship.

Found by running the whole suite rather than the touched suites: 431 passed, 6
skipped, 4026 tests, 0 failures at the tip.

* fix(connectors): stop writing the Activity row the flip does not need

73779 attached an Activity row to the flip; 73792 withdrew it, because V2 renders
none — the frontend never calls /api/activity/feed, the recap keeps agent actors,
and needs-you reads only AttentionItem. So the row was written and never read: it
would have cost a write per permanent failure and shown up nowhere, including on
D's own re-walk, which reads the page.

The two tests that pinned the row are retired with it. The absence is pinned in
its place by a named test with a positive control — a row created directly is
counted in the same harness — so a zero there is the service's choice rather than
an unplugged instrument.

* fix(connectors): flip the Slack connect marker, and clear the reason on reconnect

Two from wren's read of the same site, plus one correction of my own.

73837: the confirmation marker goes to the chat this confirm just stored, so by
73777's own test it is a bound-chat send — the twin of the Telegram bind
confirmation. A permanent refusal there means the connector is bound to a DM the
bot cannot post in, which is exactly the state the page has to name, and the page
reloads right after Confirm. It classifies through the same guarded helper as
every other bound-chat send, so the excluded errors still cannot cost a good bind:
only channel_not_found, not_in_channel and is_archived flip.

73838: the confirm's $set now clears errorMessage, as the Telegram bind does.
Without it a reconnect after any flip keeps naming a reason that is no longer
true — and this is the only site that can clear it, because a bind is the only
thing that proves the connector works again.

Mine: the service comment claimed no relay predicate reads `status`. That is true
of Telegram's (it reads the chat id and the pause flag only) and false of
Slack's, whose findLiveIntegration filters `status: { $ne: 'error' }` as well, so
there the flip stops the relay twice over. The comment now says which is which.

The response after a flip returns the row's real state rather than 'connected':
the row and the response were about to disagree, and the client polls this page.

* docs(evidence): the connector error row names its reason, before and after, from a real browser

Four captures under `docs/design/evidence/` from `scripts/ui-evidence-shot.mjs`,
on `/v2/connectors` at 390 and 1200, pairing main against this branch:

    base f5ded48 : The connection dropped.
    head          : Telegram stopped delivering: the bot was blocked or removed from this chat.
                    Slack stopped delivering: this channel no longer exists.

Viewer is a local reproduction account that owns the pod the two connectors
belong to. The errored rows are seeded directly in the dev database — `status:
error` carrying the reason a permanent failure writes — which is the state the
flip produces and the API refuses to create. Both frontends talk to the same
backend, so the pair differs in the frontend revision only, and the innerText
diff is exactly the three reason lines at both widths: no other line moves.

That last check is the one the runbook asks for, and the first pass of this pair
failed it. Cut against 0e14213 it also dropped `reconnect to resume` and the
GitHub row's second line at 390 — this branch predated Team-Commonly#1874, which had just
restored those detail lines to the phone layout. The artifact was in the base,
not in the change; the branch is now cut from f5ded48 and the diff is clean.

* chore(tests): drop nine backup copies a rewrite left behind

`ba2a2b3b` ("keep the real escape in every harness that stubs its module")
committed the `.test.js.prev` working copies alongside the nine files it edited.
Jest never collects them and eslint never opens them, so they would have landed
on main as ~2,000 lines of dead code whose authority no reader could settle.

Nothing is lost: each tracked `.test.js` carries the edit and each backup is the
copy taken before it, so the requireActual spread that commit exists to add is
present exactly where it should be —

    slackOAuth.installables        prev 1  real 2
    decisionCardReconcileService   prev 1  real 2
    slackBridgeService             prev 1  real 1  (byte-identical)
    the other six                  prev 0  real 1 or 2

Only copies, only this branch. Tests and lint unchanged.

* fix(connectors): render a reason only when it was written for a person

`V2ConnectorsPage` printed `Integration.errorMessage` for every row in the error
state. Our classifier writes that field, but so does externalFeedService: for an
`x` or `instagram` connector it copies the provider's `error_description` /
`error` / `detail` / `title`, or the raw exception message, and those rows reach
the same branch — so `connect ECONNREFUSED <addr>:443` could print in someone's
connector row (vera 73848).

The message is not the problem, the inference is. "The field holds a value" is
not the fact the page needs; "this value was written for a person" is. That fact
now travels with it: `errorMessageUserFacing`, set in exactly one place —
connectorDeliveryFailureService, which owns both the classifier's flip and the
reconciler's unreadable-secret reason — and required by the page before it
renders anything. A writer that does not set it falls back to the generic
sentence, so the failure mode is a hidden message and never a printed one, and
the provider's own text stays on the row for whoever debugs the feed.

The reconciler's second writer comes through that service rather than its own
`$set`, both binds clear the flag with the message they clear, and
externalFeedService says in place why its text is diagnostic.

* docs(evidence): re-cut the pair, and show the guard in the frame

The render predicate changed with the user-facing flag, so the fixtures change
with it: the two connectors now carry `errorMessageUserFacing: true`, which is
what a flip writes. A third row is added to the same pod — an `x` connector in
the error state holding `connect ECONNREFUSED 10.4.4.7:443`, the text
externalFeedService writes and no flag — because that is the row the guard is
for, and a frame that only showed the happy path would not evidence it.

Both widths, main against this branch:

    before   4 × "The connection dropped."   0 × named reasons
    after    1 × "The connection dropped."   3 × named reasons

The single generic line in the after frame is that X row, still rendering the
sentence it rendered before; `ECONNREFUSED` appears in neither frame, at either
width. The diff is the three named lines — the Telegram row, the Slack row and
the one the page repeats in its next-step callout — and no other line moves.

* fix(connectors): an absent value escapes to nothing, not to "undefined"

Vera's asymmetry from 73849: Slack's `escapeSlackMrkdwn` took `String(value ?? '')`
and Telegram's `escapeHtml` still took `String(raw)`, so the same absent value
rendered as nothing on one provider and as the literal word `undefined` on the
other. Unreachable today — `Summary.content` is required and the other three call
sites pre-guard — but it is the same class as the guard this PR adds: a value
that was never meant to be printed becoming text.

`??` and not `||`, so `0` and `false` still render as themselves.
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