Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/marko-e2e-consolidation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@tanstack/marko-virtual': patch
---

Stop publishing the tags build's incremental state: `marko-type-check` writes
`dist/tsconfig.tags.tsbuildinfo`, which the `files` field shipped to npm and nx
cached as part of `dist`. Because `@marko/type-check` always runs incrementally, a
`dist` that carried that file but not `dist/tags` (which `marko.json` points at)
made every subsequent build a silent no-op — exit 0, nothing emitted — and any
consumer then failed to compile with
`ENOENT: no such file or directory, scandir '.../dist/tags'`. The build now removes
the file after emitting, so a build always produces `dist/tags`.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ vite.config.ts.timestamp-*
test-results/
playwright-report/
*.log
**/*.tsbuildinfo
**/*.tsbuildinfo

# Marko Run generated route types
.marko-run/
82 changes: 0 additions & 82 deletions examples/marko/chat-pretext/.marko-run/routes.d.ts

This file was deleted.

17 changes: 0 additions & 17 deletions examples/marko/chat-pretext/e2e/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions examples/marko/chat-pretext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dev": "marko-run dev",
"build": "marko-run build",
"preview": "marko-run preview",
"test:e2e": "playwright test",
"test:types": "marko-type-check"
},
"dependencies": {
Expand All @@ -18,7 +17,6 @@
"devDependencies": {
"@marko/language-tools": "^2.6.2",
"@marko/type-check": "3.1.1",
"@playwright/test": "^1.53.1",
"typescript": "5.9.3",
"vite": "^6.4.2"
}
Expand Down
31 changes: 0 additions & 31 deletions examples/marko/chat-pretext/playwright.config.ts

This file was deleted.

26 changes: 25 additions & 1 deletion examples/marko/chat-pretext/src/routes/+page.marko
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ static function messageHeight(message: Message, viewportWidth: number) {
pinnedInitially: false,
autoHistoryArmed: false,
autoHistoryEnabled: false,
// "Latest" in flight: keep re-pinning until the end is actually reached. A
// single scrollToEnd() can land and then be carried away — e.g. an in-flight
// history prepend (180ms timer) resolving AFTER the jump grows the content
// above the viewport, and if core's offset read is stale at that moment its
// at-end compensation is skipped — so the view strands ~12 rows short with no
// scroll event to recover it. The reactive <script> below re-issues the jump
// on every virtualizer update until the end holds, then disarms.
pinPending: false,
streamAbort: null as AbortController | null,
width: DEFAULT_VIEWPORT_WIDTH,
})/>
Expand Down Expand Up @@ -167,6 +175,7 @@ static function messageHeight(message: Message, viewportWidth: number) {
// the initial settle. Same pattern as the Chat example.
<script() {
if (!state.pinnedInitially && v.range) {
state.pinPending = true
v.scrollToEnd()
atEnd = true
state.pinnedInitially = true
Expand All @@ -183,6 +192,18 @@ static function messageHeight(message: Message, viewportWidth: number) {
if (statusEl) {
atEnd = statusEl.scrollHeight - statusEl.scrollTop - statusEl.clientHeight <= AT_END_PX
}
// Converge an in-flight "Latest": re-issue the jump while content growth keeps
// moving the end away (see pinPending above). Disarms once the end holds AND no
// history load is in flight — a prepend armed before the click can land after
// the end was first reached, and disarming early would leave that late growth
// with no corrective jump.
if (state.pinPending) {
if (atEnd && !loadingHistory) {
state.pinPending = false
} else if (!atEnd) {
v.scrollToEnd()
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}/>

<div class="toolbar">
Expand Down Expand Up @@ -238,7 +259,10 @@ static function messageHeight(message: Message, viewportWidth: number) {
}
})()
}>Stream reply</button>
<button data-testid="latest" onClick() { v.scrollToEnd() }>Latest</button>
<button data-testid="latest" onClick() {
state.pinPending = true
v.scrollToEnd()
}>Latest</button>
</div>
<div class="status" data-testid="status">
${loadingHistory ? 'Loading history' : atEnd ? 'At latest' : 'Reading history'}
Expand Down
2 changes: 0 additions & 2 deletions examples/marko/chat-pretext/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
},
"include": [
"src",
"e2e",
"playwright.config.ts",
"vite.config.ts",
"../../../packages/marko-virtual/src/tags/**/*"
]
Expand Down
82 changes: 0 additions & 82 deletions examples/marko/chat/.marko-run/routes.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions examples/marko/chat/e2e/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions examples/marko/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dev": "marko-run dev",
"build": "marko-run build",
"preview": "marko-run preview",
"test:e2e": "playwright test",
"test:types": "marko-type-check"
},
"dependencies": {
Expand All @@ -17,7 +16,6 @@
"devDependencies": {
"@marko/language-tools": "^2.6.2",
"@marko/type-check": "3.1.1",
"@playwright/test": "^1.53.1",
"typescript": "5.9.3",
"vite": "^6.4.2"
}
Expand Down
31 changes: 0 additions & 31 deletions examples/marko/chat/playwright.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions examples/marko/chat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
},
"include": [
"src",
"e2e",
"playwright.config.ts",
"vite.config.ts",
"../../../packages/marko-virtual/src/tags/**/*"
]
Expand Down
Loading
Loading