Skip to content

docs(runner): 删掉 Best Practices 里复活的环境变量配置面 (#3617) - #3633

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-3617-runner-mdx-env-leftover
Aug 7, 2026
Merged

docs(runner): 删掉 Best Practices 里复活的环境变量配置面 (#3617)#3633
yinlianghui merged 1 commit into
mainfrom
claude/issue-3617-runner-mdx-env-leftover

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #3617

问题

content/docs/utilities/runner.mdx## Best Practices 下,### 2. Environment Configuration 教读者用环境变量配置 Runner:

### 2. Environment Configuration

Use environment variables for configuration:

```typescript
const config = {
  apiUrl: import.meta.env.VITE_API_URL,
  features: {
    analytics: import.meta.env.VITE_ENABLE_ANALYTICS === 'true',
  },
}
```

实现侧不支持这个说法。 核查范围是整个包(不只 src):

$ grep -rnE "import.meta.env|process.env|loadEnv|VITE_" packages/runner
(无输出,exit 1)

而同一页上方 ## Metadata Loading 的 :95 写着相反的话:

This is the Runner's only API base URL setting — it reads no environment variables and no config file

两句在同一页、相隔约 400 行,读者按哪句做都算「照文档做」。

这是 #3538 的漏网

#3538(039d2d077,Fixes #3533)以「文档不许描述不存在的能力」为由把本页的 ## Environment Variables 整节删除 —— 但只删了那一节,这处 Best Practices 小节把同一个不存在的配置面又讲了一遍。被删那节写的是 VITE_API_URL + VITE_APP_TITLE,与本处的 VITE_API_URL 是同一条。

处置

#3538 的口径整节删除,而不是换个变量名续命 —— Runner 没有任何配置面可以承接它,唯一的配置入口是 ?api= 查询参数,已由 ## Metadata Loading 一节完整覆盖。

:95 那句保留原样:修后全页对「Runner 读不读环境变量」只剩一个声音。

编号顺延前后对照

修前 修后
1 ### 1. One File per Page ### 1. One File per Page(不动)
2 ### 2. Environment Configuration 删除
3 ### 3. Error Boundaries ### 2. Error Boundaries

### 1. 已由 #3616Modular Schemas 改写为 One File per Page,本 PR 以最新 main(0e4ea07b2)重锚定,按内容定位而非行号。

验证(先预测后验证,四条全中)

预测 结果
修后 grep -n 'VITE_|import.meta.env|process.env' content/docs/utilities/runner.mdx 0 命中(修前 2 命中) ✅ 修前 2(:497 / :499),修后 exit 1 零命中
:95 的 "reads no environment variables" 原样保留 95:setting — it reads no environment variables and no config file:
node scripts/check-doc-links.mjs 修前修后都绿 ✅ 两次均 Links are valid across 6 scan roots. exit 0
node scripts/check-control-bytes.mjs 绿 + 改动文件自扫干净 OK (scanned 3654 tracked text file(s); skipped 85 binary);grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' 零命中

另核:全仓无任何位置引用被删小节的锚点 #2-environment-configuration(grep -rni 零命中),故 doc-links 修前修后同绿不是「没扫到」。本 PR 只删不增链接。

content/**-only 的 PR 会跳过 ci.yml / lint.yml(两者的 paths-ignore 都含 content/**),真正会跑的门禁正是上表后两条 —— docs-links.ymlcontrol-bytes.yml

范围


🤖 Generated with Claude Code

https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt


Generated by Claude Code

#3538(039d2d0,Fixes #3533)以「文档不许描述不存在的能力」为由删掉了本页的
`## Environment Variables` 整节,但只删了那一节 —— `## Best Practices` 下的
`### 2. Environment Configuration` 把同一个不存在的配置面又讲了一遍,教读者用
`import.meta.env.VITE_API_URL` / `VITE_ENABLE_ANALYTICS` 配置 Runner。

实现侧不支持这个说法:`grep -rn "import.meta.env|process.env|loadEnv|VITE_"
packages/runner` 整包无输出。同页 `## Metadata Loading`(:95)写着相反的话
——「it reads no environment variables and no config file」,两句相隔约 400 行。

按 #3538 的口径整节删除,而不是换个变量名续命:Runner 没有任何配置面可以承接
它,唯一的配置入口是 `?api=` 查询参数,已由 Metadata Loading 一节完整覆盖。
Best Practices 余下两条,`### 3. Error Boundaries` 顺延为 `### 2.`。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Aug 7, 2026 4:34pm

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 7, 2026 16:40
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit d9a03fe Aug 7, 2026
6 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-3617-runner-mdx-env-leftover branch August 7, 2026 16:40
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
…bjectstack-ai#3618) (objectstack-ai#3646)

`### Add Custom Routes` 让读者 "Edit src/App.tsx" 并给了一段 react-router 代码。
两处与实现相反:

1. `react-router-dom` 不在 `packages/runner/package.json` 的任何依赖里(dependencies
   只有 @object-ui/{components,core,plugin-charts,plugin-kanban,react,types} +
   class-variance-authority / clsx / lucide-react / react / react-dom /
   tailwind-merge / tailwindcss-animate),全包 grep 'react-router' 零命中 ——
   照抄直接 Failed to resolve import。
2. Runner 不是这个路由模型。App.tsx:83 用 useState 持有 currentPath,:120
   history.pushState 导航,:127 监听 popstate,:137 把路径喂给
   loader.loadPage(currentPath) —— 路由由元数据决定,没有路由表可改。
   示例里的 Home / Dashboard / CustomPage 三个组件包里同样不存在。

处置取"保留标题 + 改写为正确说明"而非整节删除:与 objectstack-ai#3538/objectstack-ai#3633 删掉的
`## Environment Variables` / `### 2. Environment Configuration` 不同,那两处描述的
配置面在实现里**不存在**,删掉即无残留问题;而"加路由"是 Runner 真实支持的能力,
只是机制不同(加 JSON 文件),答案就在同页 40 行之下的 `### Add Custom Schemas`。
删掉标题会让按"routes"检索的读者一无所获,并可能重新自行推导出"改 App.tsx"的错误
直觉。本页已有同形态先例:`### Metadata — Supplied by You`(:59)同样是"短说明 +
指向权威小节"的路标节,两处 [Metadata Loading](#metadata-loading) 交叉引用(:63、
:87)也证明页内锚点是本页既有节奏。

`#add-custom-routes` 锚点全仓无任何引用(grep 零命中),故两种处置都不会断链;
保留标题额外保住了站外深链。


Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 10, 2026
…ck-ai#3619) (objectstack-ai#3652) (objectstack-ai#3676)

objectstack-ai#3619:§Features 的「All official plugins included」与同页 §Pre-installed Plugins
自相矛盾 —— runner 的 dependencies 里只有 plugin-kanban 与 plugin-charts 两个
plugin-*,而仓库里有 19 个 packages/plugin-*。措辞与 PR objectstack-ai#3644 在 README 侧落地的
口径对齐,不留开放集合暗示。

objectstack-ai#3652:三处把 src/main.tsx 指认为插件 import 所在地(§Adding Custom Plugins 第 2 步、
§Use Cases 代码注释、§Troubleshooting 排查步骤),但真实 main.tsx 共 18 行、零个
@object-ui/plugin-* import;side-effect import 在 App.tsx:13-15。Troubleshooting
那处危害最大 —— 排查步骤指向一个永远看不到 import 的文件,既不能证实也不能证伪,
线索到此断掉;改写为可执行的排查动作,并点明 main.tsx 看不到的原因。

§Adding Custom Plugins 的 npm link 建议按 pnpm workspace 实况改写:仅换掉 npm link
仍会留下一份跑不通的步骤 —— 缺 vite.config.ts 别名条目即复现 objectstack-ai#3575 的 HTTP 500。
补齐两个预装插件实际具备的四个接线点(package.json 的 workspace:* 依赖、App.tsx
注册 import、vite.config.ts 别名、index.css 的 @source),与 README(objectstack-ai#3644)一致。

无 changeset:站点文档单文件改动,同页前三次改动(objectstack-ai#3633/objectstack-ai#3646/objectstack-ai#3651)均无。


Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment