-
Notifications
You must be signed in to change notification settings - Fork 14
fix: stabilize session opening state #969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
172b871
fix: stabilize session opening state
Astro-Han 25198bb
test: update session opening contracts
Astro-Han 419a2ac
feat(ui): reuse real message shells in opening skeleton
Astro-Han 64ad1fe
feat(session): feed timeline messages to opening skeleton
Astro-Han 468dc34
fix(prompt-input): block native drop/paste effects while session opens
Astro-Han 1c0eaf0
perf(session): seed opening skeleton mount with current opening state
Astro-Han 24bf8d1
refactor(session): drop unused opening recovery callbacks
Astro-Han 2bab52e
fix(prompt-input): gate bang shortcut on action readiness
Astro-Han 45730f2
fix(prompt-input): re-check action readiness after file picker resolves
Astro-Han b033307
Merge remote-tracking branch 'origin/dev' into codex/i965-session-ope…
Astro-Han 870514f
fix(prompt-input): gate shell-mode backspace exit on action readiness
Astro-Han File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
packages/app/e2e/snap/fixtures/session-opening-skeleton-fixture.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { render } from "solid-js/web" | ||
| import { SessionOpeningSkeleton } from "@/pages/session/session-opening-skeleton" | ||
|
|
||
| export function mountSessionOpeningSkeletonFixture(target: HTMLElement) { | ||
| target.innerHTML = "" | ||
| target.className = "min-h-screen bg-bg-base text-fg-base" | ||
|
|
||
| const shell = document.createElement("div") | ||
| shell.className = "relative mx-auto flex h-[720px] max-w-[1040px] flex-col overflow-hidden border-x border-border-weak" | ||
| target.append(shell) | ||
|
|
||
| const header = document.createElement("div") | ||
| header.className = "h-12 shrink-0 border-b border-border-weak bg-bg-base" | ||
| shell.append(header) | ||
|
|
||
| const body = document.createElement("div") | ||
| body.className = "relative min-h-0 flex-1" | ||
| shell.append(body) | ||
|
|
||
| render( | ||
| () => <SessionOpeningSkeleton visible={true} transitioning={true} openingLabel="Opening session..." />, | ||
| body, | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { expect } from "@playwright/test" | ||
| import { fileURLToPath } from "node:url" | ||
| import { test } from "../fixtures" | ||
| import { composeGrid, snapOutputPath, type Shot } from "./_compose" | ||
|
|
||
| test.use({ viewport: { width: 1280, height: 820 }, deviceScaleFactor: 2 }) | ||
|
|
||
| const fixturePath = fileURLToPath(new URL("./fixtures/session-opening-skeleton-fixture.tsx", import.meta.url)) | ||
|
|
||
| async function waitForThemeBoot(page: import("@playwright/test").Page): Promise<void> { | ||
| await page.waitForFunction( | ||
| () => getComputedStyle(document.documentElement).getPropertyValue("--bg-base").trim().length > 0, | ||
| null, | ||
| { timeout: 30_000 }, | ||
| ) | ||
| } | ||
|
|
||
| async function capture(page: import("@playwright/test").Page, name: string): Promise<Shot> { | ||
| const root = page.locator('[data-component="session-opening-state"]') | ||
| await expect(root).toBeVisible({ timeout: 30_000 }) | ||
| await expect(root.locator(".animate-spin")).toHaveCount(0) | ||
| await expect(root.locator("button")).toHaveCount(0) | ||
| return { name, buf: await page.locator("body").screenshot() } | ||
| } | ||
|
|
||
| test("session-opening-skeleton", async ({ page }) => { | ||
| test.setTimeout(180_000) | ||
|
|
||
| await page.goto("/") | ||
| await waitForThemeBoot(page) | ||
| await page.evaluate(async (path) => { | ||
| const mod = await import(path) | ||
| mod.mountSessionOpeningSkeletonFixture(document.body) | ||
| }, `/@fs/${fixturePath}`) | ||
|
|
||
| const desktop = await capture(page, "desktop") | ||
|
|
||
| await page.setViewportSize({ width: 768, height: 820 }) | ||
| const narrow = await capture(page, "narrow") | ||
|
|
||
| const out = snapOutputPath("session-opening-skeleton") | ||
| await composeGrid([desktop, narrow], out) | ||
| process.stdout.write(`\n[snap] session-opening-skeleton grid -> ${out}\n\n`) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.