Commit 285e035
committed
refactor(resources): give table-view the layout the other three units have
An audit of all four units against each other found one real divergence and a
pile of small ones, all in table-view. file-view, log-view and knowledge-view
are already uniform: `<unit>.tsx` + `index.ts` + `components/<child>/` + `utils/`
(+ `hooks/`), absolute imports, tests colocated with what they test. table-view
was flat — fifteen entries at the unit root, `cells/` and `headers/` as sibling
groups rather than children of `components/`, three test files at the root, and
relative imports throughout, which the repo bans everywhere else.
Nothing about that was load-bearing. This moves the files and rewrites the
specifiers; the only non-import lines in the diff are five type-only import
members biome reflowed. Behaviour is unchanged by construction, and page and
panel keep mounting the same components they did.
cells/, headers/ -> components/
data-row, select-pill, ... -> components/<name>/<name>.tsx + index.ts
utils.ts, values.ts, -> utils/selection.ts, utils/values.ts,
constants.ts utils/constants.ts
*.test.ts -> beside their subject
What this does NOT fix, and deliberately: table-view still has no `TableView`.
It exports 72 symbols and no view, because a table has no read-only surface yet
— everything that draws a grid today also writes one, and the shell that does
both reads useRouter and the permission context. Splitting it is a real
refactor, not a move, and it is the one thing standing between `table` and the
same axes the other three are mounted against. The barrel and the rule now say
so plainly instead of implying uniformity that was not there.
Also corrects three docs that claimed `knowledge` and `log` had no canonical
view. They both do; only `table` does not.1 parent 5a1af8f commit 285e035
30 files changed
Lines changed: 131 additions & 58 deletions
File tree
- .claude/rules
- .cursor/rules
- apps/sim/components/resources/table-view
- components
- cells
- data-row
- headers
- remote-selection-overlay
- select-pill
- table-find
- table-primitives
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
41 | 64 | | |
42 | 65 | | |
43 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | | - | |
6 | | - | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
8 | 18 | | |
9 | 19 | | |
10 | 20 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
0 commit comments