Commit 904bac7
committed
refactor(knowledge): make the shell the canonical view
The panel now mounts `KnowledgeView` and imports nothing from the workspace
route tree. That was the last of the four kinds.
The shape of this one differs from tables, and the difference is the useful
part: the route shell owned the *whole* surface — header, breadcrumbs, ten
modals, bulk operations, the context menu — while the extracted `KnowledgeView`
was only the document list. So the shell became the view, and the previous view
became its `DocumentList` child. Promoting the read-only half and leaving the
mutations behind would have left the panel importing the route tree forever.
Dropped `id` from the props: `source` already carries it (`knowledgeResourceId`),
and two spellings of the same identity is exactly what the axes replace.
`knowledgeBaseName` stays, documented as a title hint rather than identity — it
is what keeps both hosts from flashing a placeholder header before load.
Four boundary violations surfaced by `check:resources` once the files were
inside a unit, each fixed at the cause rather than annotated:
- `AddDocumentsModal` read `useParams()` for the workspace id. Inside the panel
there is no `[workspaceId]` segment, so this was already returning undefined
there — the modal is reachable from `/home`. Now a required prop.
- `use-connector-config-fields` was route-tree-resident but is unit-internal;
moved to `@/hooks/kb/`.
- `BreadcrumbItem`/`ResourceAction` came from the route barrel that merely
re-exports `@/components/resource`. Retargeted to the source.
- The knowledge list page and the document route imported past the unit barrel.
They render the same tag editor and selection bar against the same data, so
the barrel exports those three children — and the rule now says when that is
allowed, because "saves an import hop" must not qualify.
`ConnectOAuthModal` and `WorkspaceHostProvider` looked like they pinned the
connector modals to the route tree. Neither is route-specific: both moved to
`components/` (with `WorkspaceAccessDenied`, which the provider renders), 22
importers repointed. Deleting the blocker beat splitting the surface around it.
nuqs stays outside the unit — R6 has no escape hatch — so
`use-knowledge-list-state` moved to `@/hooks/kb/` and its parsers to
`@/lib/knowledge/detail-search-params`, mirroring the table.
Suite: 20917 passed, unchanged from before the move. R6 and R3c both 0.1 parent c2f04e9 commit 904bac7
69 files changed
Lines changed: 1497 additions & 1440 deletions
File tree
- .claude/rules
- apps/sim
- app/workspace/[workspaceId]
- components/invite-modal
- home/components
- credits-chip
- message-content/components/special-tags
- mothership-view/components/resource-content
- suggested-actions
- integrations/[block]
- knowledge
- [id]
- [documentId]
- components
- components
- connector-config-fields
- connector-selector-field
- settings/[section]
- upgrade
- w
- [workflowId]
- components/panel
- components/editor/components/sub-block/components
- credential-selector
- tool-input/components/tools
- components/sidebar/components
- settings-sidebar
- components
- connect-oauth-modal
- resources
- knowledge-view
- components
- action-bar
- add-connector-modal
- add-documents-modal
- base-tags-modal
- connector-config-fields
- connector-selector-field
- connectors-section
- document-list
- document-tags-modal
- edit-connector-modal
- rename-document-modal
- workspace-host-provider
- hooks
- kb
- lib/knowledge
- resources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | | - | |
58 | | - | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | | - | |
387 | 386 | | |
388 | 387 | | |
389 | 388 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
0 commit comments