Browse Source

chore: record journal

dev
hechang27-sprt 3 months ago
parent
commit
53d85065ac
  1. 7
      .trellis/workspace/hechang27-sprt/index.md
  2. 72
      .trellis/workspace/hechang27-sprt/journal-1.md

7
.trellis/workspace/hechang27-sprt/index.md

@ -8,8 +8,8 @@
<!-- @@@auto:current-status --> <!-- @@@auto:current-status -->
- **Active File**: `journal-1.md` - **Active File**: `journal-1.md`
- **Total Sessions**: 14 - **Total Sessions**: 15
- **Last Active**: 2026-04-02 - **Last Active**: 2026-04-03
<!-- @@@/auto:current-status --> <!-- @@@/auto:current-status -->
--- ---
@ -19,7 +19,7 @@
<!-- @@@auto:active-documents --> <!-- @@@auto:active-documents -->
| File | Lines | Status | | File | Lines | Status |
|------|-------|--------| |------|-------|--------|
| `journal-1.md` | ~587 | Active | | `journal-1.md` | ~659 | Active |
<!-- @@@/auto:active-documents --> <!-- @@@/auto:active-documents -->
--- ---
@ -29,6 +29,7 @@
<!-- @@@auto:session-history --> <!-- @@@auto:session-history -->
| # | Date | Title | Commits | | # | Date | Title | Commits |
|---|------|-------|---------| |---|------|-------|---------|
| 15 | 2026-04-03 | Rebuild list-table-v2: Scaffold hooks and types | `0f72b83`, `87000d8` |
| 14 | 2026-04-02 | Fix list-table-v2 fixed column cropping and horizontal scroll | - | | 14 | 2026-04-02 | Fix list-table-v2 fixed column cropping and horizontal scroll | - |
| 13 | 2026-04-02 | Attempt Pretext row height estimation for el-table-v2 | stashed | | 13 | 2026-04-02 | Attempt Pretext row height estimation for el-table-v2 | stashed |
| 12 | 2026-04-02 | Pretext integration exploration - virtual table issues | `0764ee2` | | 12 | 2026-04-02 | Pretext integration exploration - virtual table issues | `0764ee2` |

72
.trellis/workspace/hechang27-sprt/journal-1.md

@ -585,3 +585,75 @@ Fixed list-table-v2 issues:
### Next Steps ### Next Steps
- None - task complete - None - task complete
## Session 15: Rebuild list-table-v2: Scaffold hooks and types
**Date**: 2026-04-03
**Task**: Rebuild list-table-v2: Scaffold hooks and types
### Summary
Scaffolded list-table-v2 hooks for pretext-based virtualized table. PR1 complete: hooks + types created.
### Main Changes
## What was done
**Research**: Explored pretext-table (ShipItAndPray) and virtual-table (aimerthyr) implementations. pretext-table uses custom prefix-sum virtualizer + pretext text measurement (no TanStack Virtual).
**PRD Created**: Full requirements documented:
- Custom prefix-sum virtualizer (pretext-table style, lightweight)
- @chenglou/pretext for text measurement
- Variance-based flexGrow/flexShrink from sampled data
- Runtime augmentation for custom cellRenderers
- Cell renderers return plain VNode or {vnode, minHeight, minWidth}
## PR1: Scaffold ✅ COMPLETE
```
packages/base/data/list-table-v2/
├── index.ts # Exports all hooks and types
├── types.ts # ListTableColumn<T>, ListTableProps, etc.
├── measureText.ts # Cached pretext measurement
├── usePretextColumnWidths.ts # Variance-based flex params
├── usePretextRowHeights.ts # Pre-computed row heights
├── useVirtualRows.ts # Prefix-sum + binary search virtualizer
└── useRuntimeHeightAugment.ts # ResizeObserver + running average
```
## Key Design Decisions
1. **prepareWithSegments() caching**: Using prepareWithSegments for everything since it's the superset type that works with both layout() and walkLineRanges(). Cache is LRU-capped at 10,000 entries.
2. **walkLineRanges for shrink-wrap**: Using walkLineRanges with large maxWidth to find widest line — handles embedded \n correctly and avoids binary search.
3. **Variance formula**: varianceScore = min(1, σ / (μ * 0.5)); flexGrow/flexShrink = 0.1 + varianceScore * 1.9
## Remaining PRs
| PR | Goal |
|----|------|
| PR2 | Wire hooks into Vue component, flex container, virtual scrolling |
| PR3 | cellRenderer {vnode, minHeight} return type, ResizeObserver augmentation |
| PR4 | Fixed columns, pagination, slots, polish |
### Git Commits
| Hash | Message |
|------|---------|
| `0f72b83` | (see git log) |
| `87000d8` | (see git log) |
### Testing
- [OK] (Add test results)
### Status
[OK] **Completed**
### Next Steps
- None - task complete

Loading…
Cancel
Save