Skip to content

chore: remove abandoned Evidence UI and deploy topology - #36

Merged
Utsav-X-bit merged 5 commits into
mainfrom
chore/remove-evidence-ui
Aug 30, 2026
Merged

Utsav-X-bit merged 5 commits into
mainfrom
chore/remove-evidence-ui

Conversation

@Utsav-X-bit

@Utsav-X-bit Utsav-X-bit commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

Removes the custom Vite Evidence UI (ui/), its Cloudflare deploy topology (deploy/, apply-cf-secrets.sh, register_deployed.py), and the static-serving remnants in the CLI.

Shipped behavior after this PR (matches what a fresh npx @schemaforge/schemaforge user gets): the CLI boots TrueForge + MCP servers + registry, opens the stock TrueForge chat UI at [::1]:8790, and patches the served frontend on every launch so mermaid impact graphs render inside chat. Evidence artifacts are saved per session in the sandbox and downloadable from chat. The :5173 server remains as a config proxy + redirect to the TrueForge UI.

Dev workspace only (trueforge-ui-fork, not bundled by the npm package): a forked TrueForge UI adds SchemaForge evidence tabs (Impact/Report/Changes/Verification/Activity) and a SchemaForge Settings section.

  • ui/ deleted (57 tracked files, −13.7k lines) — superseded by the fork tabs
  • deploy/ deleted — Worker existed to serve the Evidence UI SPA from ui/dist
  • packages/cli/bin/schemaforge.js: dropped DIST/static-serving; added auto mermaid patch on launch (venv python, retries, all npx cache frontends, SF_TF_FRONTEND pin)
  • packages/cli/package.json + prepack.mjs: no longer build/bundle ui/
  • scripts/patch-trueforge-mermaid.py: npm-cache-aware discovery, patches every npx copy
  • README.md + packages/cli/README.md: shipped behavior described exactly; fork tabs explicitly a dev-workspace variant
  • Verified: node --check on bin + prepack, patch script rc=0 against the live frontend, no Evidence UI/ui-dist references in shipped files

The custom Vite Evidence UI (ui/, served at :5173) was superseded by the
forked TrueForge UI with native SchemaForge evidence tabs. Remove:

- ui/ — the entire custom Evidence UI app (Vite/React source, tests)
- deploy/ — Cloudflare Worker + containers topology that served the
  Evidence UI SPA from ui/dist
- scripts/apply-cf-secrets.sh + scripts/register_deployed.py — the
  Cloudflare deploy bootstrap flow
- packages/cli: DIST/MIME static-serving remnants in schemaforge.js,
  ui-dist/ from files + build script, UI build step in prepack.mjs
- .env.example Cloudflare deployment block, .gitignore ui-dist entry

The CLI's :5173 server stays as a pure config proxy + redirect to the
TrueForge UI. READMEs now describe the TrueForge UI (SchemaForge
evidence tabs + Settings) as the interface.
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Remove abandoned Evidence UI and Cloudflare deployment

⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Removes the abandoned Vite Evidence UI and Cloudflare container deployment topology.
• Simplifies CLI packaging and port 5173 to proxy-and-redirect behavior.
• Documents TrueForge as the canonical chat, evidence, and settings interface.
Diagram

graph TD
  U["Browser"] --> M["Local Mirror"] --> T["TrueForge UI"]
  U --> T
  M --> P["Postgres MCP"] & G["GitHub MCP"] & R["SF Registry"]
Loading
High-Level Assessment

Consolidating on the forked TrueForge UI is the appropriate approach because it removes duplicate presentation, build, packaging, and deployment layers while preserving the local configuration proxy. Retaining a compatibility shell or dormant Cloudflare topology would add maintenance burden without providing a distinct supported interface.

Files changed (9) +81 / -111

Refactor (2) +4 / -49
schemaforge.jsRemove static Evidence UI serving +3/-27

Remove static Evidence UI serving

• Drops UI distribution discovery and MIME metadata from the CLI server. Keeps the CSRF-guarded configuration proxies and redirects all remaining requests to TrueForge.

packages/cli/bin/schemaforge.js

prepack.mjsStop building and staging the removed UI +1/-22

Stop building and staging the removed UI

• Eliminates Vite build validation and 'ui-dist' copying from prepack. Runtime directory staging remains unchanged.

packages/cli/scripts/prepack.mjs

Documentation (4) +69 / -48
README.mdMake TrueForge the documented primary interface +19/-15

Make TrueForge the documented primary interface

• Updates quickstart, settings, ports, and usage guidance to point users to TrueForge on port 8790. Recasts port 5173 as a local configuration proxy and redirect.

README.md

instructions.mdReference TrueForge evidence tabs for artifacts +1/-1

Reference TrueForge evidence tabs for artifacts

• Clarifies that session-scoped migration artifacts are consumed by the TrueForge UI evidence tabs.

agent/instructions.md

README.mdDocument the simplified CLI UI topology +48/-31

Document the simplified CLI UI topology

• Explains the TrueForge evidence and settings experience, including artifact tabs and Mermaid patching. Replaces the static Evidence UI architecture with the retained local mirror, redirect, and configuration proxy routes.

packages/cli/README.md

SKILL.mdPoint skill artifacts to TrueForge tabs +1/-1

Point skill artifacts to TrueForge tabs

• Updates migration guidance to identify TrueForge evidence tabs as the consumer of session-scoped artifacts.

skills/schemaforge-migration/SKILL.md

Other (3) +8 / -14
.env.exampleRemove obsolete Cloudflare deployment variables +0/-7

Remove obsolete Cloudflare deployment variables

• Removes example Neon, Redis, and Cloudflare credentials used only by the abandoned Worker deployment flow.

.env.example

.gitignoreStop ignoring removed CLI UI bundle +0/-1

Stop ignoring removed CLI UI bundle

• Removes the obsolete 'packages/cli/ui-dist/' ignore rule now that the CLI no longer packages static UI assets.

.gitignore

package.jsonRemove UI bundle from CLI packaging +8/-6

Remove UI bundle from CLI packaging

• Removes 'ui-dist/' from published files and deletes the UI build-and-copy script. Updates package metadata to describe the retained TrueForge, MCP, and registry stack.

packages/cli/package.json

@qodo-code-review

qodo-code-review Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Replacement UI is unavailable ✗ Dismissed 🐞 Bug ≡ Correctness
Description
Removing the bundled UI leaves fresh installs launching the upstream @truefoundry/trueforge
package, while nothing installs or patches in the claimed SchemaForge evidence tabs and Settings
section. As a result, the tabs that are supposed to replace the deleted UI are absent for `npx
@schemaforge/schemaforge` users.
Code

packages/cli/bin/schemaforge.js[L19-22]

-const DIST = existsSync(join(PKG_ROOT, "ui-dist"))
-  ? join(PKG_ROOT, "ui-dist")
-  : existsSync(join(REPO_ROOT, "packages", "cli", "ui-dist"))
-  ? join(REPO_ROOT, "packages", "cli", "ui-dist")
Relevance

●●● Strong

Fresh installs launch upstream TrueForge without the claimed replacement tabs, contradicting the
PR’s stated user-facing behavior.

PR-#24

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The CLI now has no UI asset lookup and launches npx @truefoundry/trueforge by its upstream package
name; the only TrueForge patch retained in this repository injects Mermaid rendering, not evidence
tabs or SchemaForge Settings. The upstream project's published UI documentation describes the
standard Models, Connectors, Skills, and Sandbox settings, with no SchemaForge-specific section or
evidence tabs.

packages/cli/bin/schemaforge.js[383-399]
scripts/patch-trueforge-mermaid.py[1-14]
scripts/patch-trueforge-mermaid.py[101-110]
🌐 TrueForge's documented Settings pages are Models, Connectors, Skills, and Sandbox; it does not document a SchemaForge Settings extension or evidence tabs.
🌐 The upstream project identifies @truefoundry/trueforge as its standard bundled chat UI package, which is the exact package the CLI launches.

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The custom Evidence UI is removed, but the CLI still launches the upstream `@truefoundry/trueforge` package and does not provision the claimed fork containing SchemaForge evidence tabs and Settings.

## Issue Context
A fresh npx install therefore has neither the deleted bundled UI nor its advertised replacement. Pin and launch the actual fork/package/version, or retain the bundled UI until the replacement is distributable.

## Fix Focus Areas
- packages/cli/bin/schemaforge.js[19-22]
- packages/cli/bin/schemaforge.js[383-398]
- packages/cli/package.json[9-21]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Configured npm cache ignored ✓ Resolved 🐞 Bug ≡ Correctness ⭐ New
Description
discover_frontends() searches only ~/.npm/_npx, while npx can use the platform default or a
configured npm cache; on Windows or with a custom cache the script always exits without patching the
running TrueForge UI. The CLI retries the same wrong location and then continues, contradicting the
newly documented automatic rendering behavior.
Code

scripts/patch-trueforge-mermaid.py[16]

+        Path(os.path.expanduser("~/.npm/_npx")).glob("*/node_modules/@truefoundry/trueforge"),
Relevance

●●● Strong

Recent accepted reviews favor fixing platform-specific and hardcoded discovery paths; this is a
concrete cross-platform correctness failure.

PR-#24
PR-#35

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The patcher's only root is ~/.npm/_npx, and it exits when that root has no TrueForge frontend. The
CLI contains explicit Windows handling and launches npx without overriding npm's cache, while npm
documents %LocalAppData%\npm-cache as the Windows default and states that the cache config
controls the location.

scripts/patch-trueforge-mermaid.py[14-20]
scripts/patch-trueforge-mermaid.py[116-120]
packages/cli/bin/schemaforge.js[193-197]
packages/cli/bin/schemaforge.js[383-398]
packages/cli/bin/schemaforge.js[412-415]
🌐 npm documents the cache default as %LocalAppData%\npm-cache on Windows and ~/.npm on POSIX, with the location controlled by npm's cache configuration.

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Mermaid patcher hard-codes `~/.npm/_npx`, but npm uses a different default cache on Windows and permits configuring another cache path. Resolve npm's effective cache and search its `_npx` directory so the launched package is actually found.

## Issue Context
The CLI explicitly supports Windows and invokes `npx` without forcing a cache directory. Preserve a safe fallback if npm cache discovery itself fails.

## Fix Focus Areas
- scripts/patch-trueforge-mermaid.py[14-20]
- scripts/patch-trueforge-mermaid.py[116-118]
- packages/cli/bin/schemaforge.js[412-415]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Patch uses wrong Python ✓ Resolved 🐞 Bug ☼ Reliability
Description
patchTrueForgeUi runs the script with the host python3, although httpx is installed only into
SchemaForge's provisioned virtual environment. On a normal host without a global httpx
installation, every automatic patch attempt exits at import time and Mermaid graphs remain
unrendered.
Code

packages/cli/bin/schemaforge.js[413]

+    const rc = await spawnAwait(py, [script], { timeout: 90000 });
Relevance

●●● Strong

Recent CLI reliability findings were accepted; using the prepared virtualenv is a deterministic
dependency fix.

PR-#24

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The launcher defines py as the host interpreter, separately creates venvPy, and installs
requirements through venvPip; the GitHub MCP requirements install httpx into that venv. The
patch script imports httpx at module load, but the new call executes it with py, bypassing the
prepared environment.

packages/cli/bin/schemaforge.js[41-41]
packages/cli/bin/schemaforge.js[193-229]
mcp-servers/github-mcp/requirements.txt[1-2]
scripts/patch-trueforge-mermaid.py[16-19]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The automatic TrueForge Mermaid patch uses the host Python interpreter, which may not contain the script's `httpx` dependency even though SchemaForge already installs it in its virtual environment.

## Issue Context
Use the provisioned `venvPy` interpreter for the patch subprocess so its dependencies match the environment bootstrapped by the CLI.

## Fix Focus Areas
- packages/cli/bin/schemaforge.js[404-413]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Patch command misses package ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new npm-package README tells npx users to run python scripts/patch-trueforge-mermaid.py, but
npx does not place package files under the caller's current scripts/ directory. Following this
instruction from a normal consumer project fails with a file-not-found error, so the documented
impact-graph rendering setup cannot be completed.
Code

packages/cli/README.md[R31-33]

+Run `python scripts/patch-trueforge-mermaid.py` once so impact-graph
+mermaid blocks render inside chat (idempotent; re-run after any
+`npx` re-fetch).
Relevance

●●● Strong

The documented relative script path fails for normal npx consumers; this is a concrete package
documentation defect.

PR-#24

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The README's Quickstart is npx @schemaforge/schemaforge, while prepack copies the Python patch
under the installed package's own scripts directory. No package bin or CLI option exposes that
script, so the literal relative command resolves against the user's working directory rather than
the npm package.

packages/cli/README.md[5-33]
packages/cli/package.json[6-21]
packages/cli/scripts/prepack.mjs[39-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The package README uses a repository-relative Python path that does not exist in a normal npx consumer's working directory.

## Issue Context
The file is bundled inside the npm package by prepack, but users need a supported executable or CLI subcommand that resolves it relative to the installed package.

## Fix Focus Areas
- packages/cli/README.md[31-33]
- packages/cli/package.json[6-21]
- packages/cli/scripts/prepack.mjs[39-49]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View medium (1)
5. Wrong TrueForge cache patched ✓ Resolved 🐞 Bug ≡ Correctness
Description
The patch script selects the newest TrueForge directory across the entire npx cache, without tying
it to the TrueForge process launched or reused by this CLI invocation. In particular, during an npx
re-fetch it can successfully patch an older existing cache before the new cache appears, stop
retrying, and leave the served frontend unpatched.
Code

scripts/patch-trueforge-mermaid.py[R21-24]

+_npx_candidates = sorted(
+    Path(os.path.expanduser("~/.npm/_npx")).glob("*/node_modules/@truefoundry/trueforge"),
+    key=lambda p: p.stat().st_mtime if p.exists() else 0,
+    reverse=True,
Relevance

●● Moderate

No close cache-selection precedent; stale-process ownership is a substantive design concern with
uncertain team treatment.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The CLI starts TrueForge as an independent npx child and immediately invokes the patcher, but it
passes no package path or process identity. The patcher glob-sorts all matching cache directories
and derives FRONTEND solely from the first result; a successful stale-cache patch returns true and
terminates the retry loop.

packages/cli/bin/schemaforge.js[383-413]
packages/cli/bin/schemaforge.js[485-490]
scripts/patch-trueforge-mermaid.py[21-35]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The script globally chooses an npx cache entry by modification time, so it can modify a different TrueForge installation than the one serving this invocation.

## Issue Context
Resolve or control the package location used by the launched TrueForge process and pass that exact root to the patch script. Do not treat successfully patching an unrelated pre-existing cache entry as completion.

## Fix Focus Areas
- scripts/patch-trueforge-mermaid.py[21-29]
- packages/cli/bin/schemaforge.js[383-413]
- packages/cli/bin/schemaforge.js[485-490]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: ⏭️ Skipped: The latest push only changes README prose and documents shipped versus development-workspace UI behavior; it does not alter runtime, configuration, tests, or build behavior.

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 3b4560e

Results up to commit 5a3ceeb ⚖️ Balanced


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required
1. Replacement UI is unavailable ✗ Dismissed 🐞 Bug ≡ Correctness
Description
Removing the bundled UI leaves fresh installs launching the upstream @truefoundry/trueforge
package, while nothing installs or patches in the claimed SchemaForge evidence tabs and Settings
section. As a result, the tabs that are supposed to replace the deleted UI are absent for `npx
@schemaforge/schemaforge` users.
Code

packages/cli/bin/schemaforge.js[L19-22]

-const DIST = existsSync(join(PKG_ROOT, "ui-dist"))
-  ? join(PKG_ROOT, "ui-dist")
-  : existsSync(join(REPO_ROOT, "packages", "cli", "ui-dist"))
-  ? join(REPO_ROOT, "packages", "cli", "ui-dist")
Relevance

●●● Strong

Fresh installs launch upstream TrueForge without the claimed replacement tabs, contradicting the
PR’s stated user-facing behavior.

PR-#24

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The CLI now has no UI asset lookup and launches npx @truefoundry/trueforge by its upstream package
name; the only TrueForge patch retained in this repository injects Mermaid rendering, not evidence
tabs or SchemaForge Settings. The upstream project's published UI documentation describes the
standard Models, Connectors, Skills, and Sandbox settings, with no SchemaForge-specific section or
evidence tabs.

packages/cli/bin/schemaforge.js[383-399]
scripts/patch-trueforge-mermaid.py[1-14]
scripts/patch-trueforge-mermaid.py[101-110]
🌐 TrueForge's documented Settings pages are Models, Connectors, Skills, and Sandbox; it does not document a SchemaForge Settings extension or evidence tabs.
🌐 The upstream project identifies @truefoundry/trueforge as its standard bundled chat UI package, which is the exact package the CLI launches.

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The custom Evidence UI is removed, but the CLI still launches the upstream `@truefoundry/trueforge` package and does not provision the claimed fork containing SchemaForge evidence tabs and Settings.

## Issue Context
A fresh npx install therefore has neither the deleted bundled UI nor its advertised replacement. Pin and launch the actual fork/package/version, or retain the bundled UI until the replacement is distributable.

## Fix Focus Areas
- packages/cli/bin/schemaforge.js[19-22]
- packages/cli/bin/schemaforge.js[383-398]
- packages/cli/package.json[9-21]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
2. Patch command misses package ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new npm-package README tells npx users to run python scripts/patch-trueforge-mermaid.py, but
npx does not place package files under the caller's current scripts/ directory. Following this
instruction from a normal consumer project fails with a file-not-found error, so the documented
impact-graph rendering setup cannot be completed.
Code

packages/cli/README.md[R31-33]

+Run `python scripts/patch-trueforge-mermaid.py` once so impact-graph
+mermaid blocks render inside chat (idempotent; re-run after any
+`npx` re-fetch).
Relevance

●●● Strong

The documented relative script path fails for normal npx consumers; this is a concrete package
documentation defect.

PR-#24

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The README's Quickstart is npx @schemaforge/schemaforge, while prepack copies the Python patch
under the installed package's own scripts directory. No package bin or CLI option exposes that
script, so the literal relative command resolves against the user's working directory rather than
the npm package.

packages/cli/README.md[5-33]
packages/cli/package.json[6-21]
packages/cli/scripts/prepack.mjs[39-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The package README uses a repository-relative Python path that does not exist in a normal npx consumer's working directory.

## Issue Context
The file is bundled inside the npm package by prepack, but users need a supported executable or CLI subcommand that resolves it relative to the installed package.

## Fix Focus Areas
- packages/cli/README.md[31-33]
- packages/cli/package.json[6-21]
- packages/cli/scripts/prepack.mjs[39-49]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit d0a674d ⚖️ Balanced


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. Patch uses wrong Python ✓ Resolved 🐞 Bug ☼ Reliability
Description
patchTrueForgeUi runs the script with the host python3, although httpx is installed only into
SchemaForge's provisioned virtual environment. On a normal host without a global httpx
installation, every automatic patch attempt exits at import time and Mermaid graphs remain
unrendered.
Code

packages/cli/bin/schemaforge.js[413]

+    const rc = await spawnAwait(py, [script], { timeout: 90000 });
Relevance

●●● Strong

Recent CLI reliability findings were accepted; using the prepared virtualenv is a deterministic
dependency fix.

PR-#24

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The launcher defines py as the host interpreter, separately creates venvPy, and installs
requirements through venvPip; the GitHub MCP requirements install httpx into that venv. The
patch script imports httpx at module load, but the new call executes it with py, bypassing the
prepared environment.

packages/cli/bin/schemaforge.js[41-41]
packages/cli/bin/schemaforge.js[193-229]
mcp-servers/github-mcp/requirements.txt[1-2]
scripts/patch-trueforge-mermaid.py[16-19]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The automatic TrueForge Mermaid patch uses the host Python interpreter, which may not contain the script's `httpx` dependency even though SchemaForge already installs it in its virtual environment.

## Issue Context
Use the provisioned `venvPy` interpreter for the patch subprocess so its dependencies match the environment bootstrapped by the CLI.

## Fix Focus Areas
- packages/cli/bin/schemaforge.js[404-413]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Wrong TrueForge cache patched ✓ Resolved 🐞 Bug ≡ Correctness
Description
The patch script selects the newest TrueForge directory across the entire npx cache, without tying
it to the TrueForge process launched or reused by this CLI invocation. In particular, during an npx
re-fetch it can successfully patch an older existing cache before the new cache appears, stop
retrying, and leave the served frontend unpatched.
Code

scripts/patch-trueforge-mermaid.py[R21-24]

+_npx_candidates = sorted(
+    Path(os.path.expanduser("~/.npm/_npx")).glob("*/node_modules/@truefoundry/trueforge"),
+    key=lambda p: p.stat().st_mtime if p.exists() else 0,
+    reverse=True,
Relevance

●● Moderate

No close cache-selection precedent; stale-process ownership is a substantive design concern with
uncertain team treatment.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The CLI starts TrueForge as an independent npx child and immediately invokes the patcher, but it
passes no package path or process identity. The patcher glob-sorts all matching cache directories
and derives FRONTEND solely from the first result; a successful stale-cache patch returns true and
terminates the retry loop.

packages/cli/bin/schemaforge.js[383-413]
packages/cli/bin/schemaforge.js[485-490]
scripts/patch-trueforge-mermaid.py[21-35]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The script globally chooses an npx cache entry by modification time, so it can modify a different TrueForge installation than the one serving this invocation.

## Issue Context
Resolve or control the package location used by the launched TrueForge process and pass that exact root to the patch script. Do not treat successfully patching an unrelated pre-existing cache entry as completion.

## Fix Focus Areas
- scripts/patch-trueforge-mermaid.py[21-29]
- packages/cli/bin/schemaforge.js[383-413]
- packages/cli/bin/schemaforge.js[485-490]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread packages/cli/bin/schemaforge.js Resolved
Comment thread packages/cli/README.md Resolved
Qodo review (PR #36) surfaced two gaps in the Evidence-UI removal:

1. npx users boot the stock @truefoundry/trueforge UI and nothing patched
   in mermaid rendering — the README claimed graphs render in chat.
2. The documented manual command (python scripts/patch-trueforge-mermaid.py)
   assumed a repo checkout; a consumer cwd has no scripts/ dir.

The CLI now runs the patch automatically after TrueForge comes up
(retrying until the npx _frontend exists; non-fatal), and the patch
script discovers the npx cache path dynamically instead of hardcoding a
machine-specific hash. READMEs scope the SchemaForge evidence tabs to
this workspace's forked TrueForge UI and state the stock-UI behavior for
the published package.
@Utsav-X-bit

Copy link
Copy Markdown
Collaborator Author

/agentic_review

Comment thread packages/cli/bin/schemaforge.js Resolved
Comment thread scripts/patch-trueforge-mermaid.py Resolved
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit d0a674d

Qodo re-review (PR #36) surfaced three regressions in the auto-patch:

1. patchTrueForgeUi ran the host python3, which lacks httpx (it lives in
   the provisioned venv) — every attempt died at import on clean hosts.
   Now prefers venvPy and falls back to py.
2. The patch script picked the newest npx cache entry by mtime, which can
   differ from the TrueForge the CLI actually launched/reused (an npx
   re-fetch creates a new cache entry while an older one still serves).
   Now patches EVERY npx-cached @truefoundry/trueforge _frontend —
   idempotent and always covers the served one.
3. READMEs told npx consumers to run 'python scripts/...' from their cwd,
   which has no scripts/ dir. The CLI patches on every launch, so the
   manual re-run instructions are dropped.
@Utsav-X-bit

Copy link
Copy Markdown
Collaborator Author

/agentic_review

Comment thread scripts/patch-trueforge-mermaid.py Resolved
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 4b37c83

Qodo round 3 (PR #36): discover_frontends() hardcoded ~/.npm/_npx, which
misses Windows and custom npm-cache setups (npm config get cache), and
patching one entry left the served copy ambiguous. Now:

- npm cache resolved via 'npm config get cache' with ~/.npm fallback
- all discovered @truefoundry/trueforge _frontends patched (idempotent)
- SF_TF_FRONTEND env var pins the exact frontend when the caller knows it
@Utsav-X-bit

Copy link
Copy Markdown
Collaborator Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit fbff7b9

…tch)

Qodo round 4 (PR #36): the README still led with the SchemaForge
evidence tabs as the interface, but the published package launches the
stock @truefoundry/trueforge UI and only patches mermaid rendering — the
tabs live in the dev-workspace fork (trueforge-ui-fork), which the
package does not bundle. Reorder both READMEs so the shipped behavior
(stock chat UI, auto mermaid patch, per-session artifacts downloadable
from chat, stock four-section Settings) is the primary claim, with the
fork's evidence tabs + SchemaForge Settings section described as a
dev-workspace variant.
@Utsav-X-bit

Copy link
Copy Markdown
Collaborator Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 3b4560e

@Utsav-X-bit

Copy link
Copy Markdown
Collaborator Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 3b4560e

@Utsav-X-bit
Utsav-X-bit merged commit b89dd84 into main Aug 30, 2026
@Utsav-X-bit
Utsav-X-bit deleted the chore/remove-evidence-ui branch August 30, 2026 13:09
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