Skip to content

fix(editor): Polish with AI explains itself to a company without AI, and sends nothing - #410

Merged
gololdf1sh merged 1 commit into
mainfrom
fix/409-polish-without-ai
Oct 1, 2026
Merged

gololdf1sh merged 1 commit into
mainfrom
fix/409-polish-without-ai

Conversation

@gololdf1sh

Copy link
Copy Markdown
Collaborator

Closes #409

…and sends nothing

The editor offered the Polish with AI switch to every signed-in user. A tester
whose company has no AI — no AI in the plan, or the owner never switched it on —
could turn it on, and every Stop sent the recorded steps to the server only to be
refused with "Couldn't polish — raw steps kept"; the switch stayed on.

The editor now reads the company's AI status from the project info it already
loads (company-settings.ai_enabled / ai_hidden). With AI off — anything but true,
since prod answers null for a company with no subscription — the switch stays in
view but off, and a click explains that AI needs a plan with AI switched on by
the company owner; nothing is sent. With no AI on the instance at all the switch
is not shown. A refusal at Stop (422, or an "AI is disabled" answer) explains the
same way and turns the switch off. An older server with no status behaves as
before.

The 422 sentence path never worked in a browser: the error reaches the editor
with the server's sentence as plain text, not JSON. serverMessage() reads both.

The manifest goes to 0.2.2, so this ships in the release the store gets.

Mutations through RECFMT_SRC and RECSESS_SRC: 23 of 23 caught. Real Chromium
against a stubbed server: off, null, hidden, on, and a 422 / "AI is disabled"
refusal each behave as above; the previous build turns the switch on and sends.
Read-only on prod: project-for-testing answers ai_enabled true, qa_core_framework
(no AI) answers null.

Closes #409

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@gololdf1sh gololdf1sh self-assigned this Oct 1, 2026
@gololdf1sh
gololdf1sh merged commit f7279dd into main Oct 1, 2026
1 check passed
@gololdf1sh
gololdf1sh deleted the fix/409-polish-without-ai branch October 1, 2026 08:39
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.

Polish with AI is offered to people whose company has no AI

1 participant