docs(dev): map tasks to owners and focused verification

This commit is contained in:
chengyongru authored and chengyongru committed 2026-11-06 13:34:40 +08:00
1 parent 283e486e0b
commit 0a654a666d
5 files changed
+57 -1

No files matched your search

+17
View File
@@ -29,6 +29,23 @@ nanobot/channels/*/webui/ channel-owned interface code
nanobot/channels/*/tests/webui/ channel interface tests
```
## Change a behavior
Choose the behavior first, then follow the owning module and its existing tests. Paths below are relative to `webui/` unless they start with `../`. Read [component ownership](COMPONENTS.md#where-components-belong) when introducing or moving a boundary.
| Change | Owning source | Start verification with |
| --- | --- | --- |
| Composer input, attachments, mentions, or waiting prompts | [`ThreadComposer.tsx`](src/components/thread/ThreadComposer.tsx) and its feature-owned hooks | [`thread-composer.test.tsx`](src/tests/thread-composer.test.tsx), [`thread-composer-attach.test.tsx`](src/tests/thread-composer-attach.test.tsx) |
| Chat-channel pairing prompts and approval | [`components/pairing/`](src/components/pairing/); backend [`nanobot/pairing/`](../nanobot/pairing/) | Pairing scenarios in [`app-layout.test.tsx`](src/tests/app-layout.test.tsx), [`pairing-refresh.spec.ts`](browser/pairing-refresh.spec.ts) |
| Startup, authentication, navigation, or session selection | [`App.tsx`](src/App.tsx), [`useSessions.ts`](src/hooks/useSessions.ts), [`ClientProvider.tsx`](src/providers/ClientProvider.tsx) | [`app-layout.test.tsx`](src/tests/app-layout.test.tsx); keep shell integration checks when moving an owner |
| Live messages, delivery, or completion | [`nanobot-client.ts`](src/lib/nanobot-client.ts), [`useNanobotStream.ts`](src/hooks/useNanobotStream.ts), [`ThreadShell.tsx`](src/components/thread/ThreadShell.tsx) | [`nanobot-client.test.ts`](src/tests/nanobot-client.test.ts), [`useNanobotStream.test.tsx`](src/tests/useNanobotStream.test.tsx), [`thread-shell.test.tsx`](src/tests/thread-shell.test.tsx) |
| History pagination, reading position, or boundary motion | [`usePromptHistory.ts`](src/hooks/usePromptHistory.ts), [`ThreadViewport.tsx`](src/components/thread/ThreadViewport.tsx); [motion ownership](COMPONENTS.md#history-boundary-motion) | [`thread-viewport.test.tsx`](src/tests/thread-viewport.test.tsx), [`thread-history-spring.test.ts`](src/tests/thread-history-spring.test.ts), [`thread-loading.spec.ts`](browser/thread-loading.spec.ts) |
| Settings forms or persistence | The feature under [`components/settings/`](src/components/settings/) and [`useSettingsController.ts`](src/components/settings/useSettingsController.ts) | Matching `settings-*.test.tsx` in [`src/tests/`](src/tests/); backend settings tests in [`tests/webui/`](../tests/webui/) |
| A channel's setup interface | Its package under [`nanobot/channels/`](../nanobot/channels/), including `webui/` and translations | The same package's `tests/webui/`, plus [`settings-channels.test.tsx`](src/tests/settings-channels.test.tsx) |
| A shared control or content renderer | [Component guide and gallery](COMPONENTS.md) | Its existing component tests and affected production caller; browser tests for layout, focus, or motion |
For a focused component check, run `bun run test src/tests/thread-composer.test.tsx`; for the pairing browser flow, run `bun run test:browser browser/pairing-refresh.spec.ts`. These are examples, not a substitute for [full checks](#test). HTTP/WebSocket, host, or persisted-state changes also require the [client/host compatibility review](../.agent/review-guide.md).
## Develop the WebUI (Vite HMR)
### 1. Install nanobot from source