Skip to content

docs(web): say what each Web source file is for - #220

Merged
yxflc11 merged 6 commits into
mainfrom
codex/claude-web-file-comments
Oct 10, 2026
Merged

yxflc11 merged 6 commits into
mainfrom
codex/claude-web-file-comments

Conversation

@yxflc11

@yxflc11 yxflc11 commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Adds a short opening comment to the 129 Web source files under apps/web/src that did not start with one, so a contributor or coding agent can tell at a glance what a file is and when to change it. Each comment was written after reading the file and its callers, and names the screen, artboard or API it covers.

This is a comment-only change: 129 files, 204 added lines, 0 deleted, no code edits. apps/web/src/run-state.ts is intentionally left out because it is part of the P5 migration.

Examples:

  • components/ContextRail.tsx: // Right rail for a 频道 (Main and ChannelInfo artboards): details, 资料库 and members tabs, with / // approvals, recent runs and work computers. A 单聊 uses BotInfoRail instead.
  • components/TaskSheet.tsx: // 任务详情 sheet (TaskInspector artboard): a task's status, computer frame, 分工, steps, outputs and / // model use, opened from a task card.
  • sidebar-organization.ts: // Per-device sidebar arrangement in localStorage: pins, groups, folding, hidden rows, mute and / // unread marks, plus the sort and search used by the sidebar. Never a Server write.
  • bounded-response.ts: // Reads a fetch response body with a byte limit, so a large or endless body cannot exhaust memory.
  • preview/transport.ts: // Design preview fake Server (dev only): replaces fetch, EventSource and storage and answers every / // route from the synthetic world. Fails closed and never touches the network.

Draft until P5 merges. scripts/hygiene-baseline.json is not touched here because its owner changes during P5. After P5 merges, the owner lowers undocumentedFiles["apps/web"] from 130 to 1 (only run-state.ts remains, unless P5 documents it).

Checks

  • npx biome check --write on the 129 changed files, then npx biome lint on them: lint exit 0 (12 warnings and 1 info, all from existing code). biome check also wanted import-order or format fixes in api.ts, desktop-runtime.ts, plugin-api.ts, components/ImportEmployeeDialog.tsx and components/useModalDialog.ts. That drift is already on main (confirmed against origin/main), so those fixes were reverted to keep this PR comment-only.
  • npm run typecheck: passed.
  • npm run test --workspace @openbot/web: 93 files and 695 tests passed.
  • node scripts/check-hygiene.ts: expected failure only: apps/web: only 1 files lack an opening comment now; lower undocumentedFiles["apps/web"] ... to 1.
  • node scripts/check-docs.ts: passed (309 Markdown files).

🤖 Generated with Claude Code

yxflc11 and others added 3 commits October 10, 2026 09:12
Add a one-to-three-line opening comment to every Web component and hook
under apps/web/src/components that lacked one. Comment-only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment-only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment-only; no code changes. run-state.ts is left for the P5 migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wen and others added 2 commits October 10, 2026 23:41
Every Web source file now opens with a comment saying what it is for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yxflc11
yxflc11 merged commit 1e10fbd into main Oct 10, 2026
17 checks passed
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