Skip to content

fix(settings): say which runtime features the app withholds, and why - #165

Merged
devswha merged 1 commit into
mainfrom
fix/surface-withheld-runtime-features
Sep 16, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/surface-withheld-runtime-features

Conversation

@devswha

@devswha devswha commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Refs #161.

The gap

Every app session runs through applyGjcToolSettingsPolicy(), which overrides four runtime settings:

settings.override('astEdit.enabled', false);
settings.override('tools.discoveryMode', 'off');
settings.override('mcp.discoveryMode', false);
settings.override('mcp.enableProjectConfig', false);

Those overrides are correct as a security boundary and the inline comments justify them well. They stay. The problem is that nothing surfaced them.

A user with MCP servers configured for the GJC CLI sees them load there:

~/.gjc/logs/gjc.2026-09-17.log   (CLI process)
  14× GJC plugin MCP connect failed  path=mcp:stylegallery
      GJC plugin MCP connect failed  path=mcp:stylegallery-material

and finds nothing at all in the app — no error, no badge, no disabled state. Searching the UI for any acknowledgement turned up exactly one stray comment:

$ grep -rnE 'discoveryMode|mcp\.|MCP' src/components/ src/i18n/locales/en/
src/components/sidebar/view/SidebarModals.tsx:53:
  // Settings expects project identity/path fields ... and local-scope MCP config.

Settings implies configurability that does not exist. "Works in the CLI, missing in the app, no error message" is an unanswerable support question.

What this adds

The Automation tab now ends with a read-only block naming each withheld feature and the reason for it:

Feature Reason shown
MCP servers Servers from your GJC settings and a project .mcp.json are not loaded, so tools the app never chose cannot reach a session.
Tool discovery Sessions cannot activate additional tools at runtime; the app-selected set is the whole set.
AST edit It only previews rewrites and applies them through a tool the app does not expose, so it would advertise edits a session could never commit.

Reports, not controls — there is nothing to switch, because a session cannot switch them either. A test asserts the block renders no button, input or select, so a later edit cannot quietly add one.

ast_edit being off is not theoretical: the 681-turn session measured for #159 hit Edit rejected: N anchors do not match the current file 26 times.

i18n

automation.withheld* — 8 keys across all 10 locales, inserted in place without reformatting the surrounding JSON.

Verification

bun test AutomationSettingsTab.dom.bun.test.tsx     14 pass  0 fail   (11 existing + 3 new)
node --test scripts/check-locale-parity.test.mjs     2 pass  0 fail
npx tsc -p tsconfig.json --noEmit                   clean
npx eslint <changed files>                          clean

New tests: each feature renders with its reason; the block offers no control; and the eight wording keys have parity across all ten locales.

Scope

This closes the surfacing half of #161. The issue also asks for a docs/ note on the app-vs-CLI capability delta — left for a follow-up so this stays a UI change.

Every app session overrides four runtime settings - `mcp.discoveryMode`,
`mcp.enableProjectConfig`, `tools.discoveryMode` and `astEdit.enabled`. The
overrides are the right call and they stay; saying nothing about them was not.

A user whose MCP servers work in the GJC CLI finds them simply absent in the
app: no error, no badge, no explanation. The only mention of MCP anywhere in
src/components/ was a stray comment about dropdown labels, while Settings
implied configurability that does not exist. "Works in the CLI, missing in the
app, no error message" is an unanswerable support question.

Automation now ends with a read-only block naming each withheld feature and the
reason for it. Reports, not controls: there is nothing to switch, because a
session cannot switch them either - and a test asserts the block renders no
control, so a later edit cannot quietly add one.

Refs #161
@devswha
devswha merged commit 93d7aff into main Sep 16, 2026
6 checks passed
@devswha
devswha deleted the fix/surface-withheld-runtime-features branch September 16, 2026 17:50
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