-
Notifications
You must be signed in to change notification settings - Fork 0
fix: google token auth like Claude + revert dock blank + restart #210
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,10 +21,19 @@ export function SessionRevertDock(props: { | |
| collapsed: true, | ||
| }) | ||
|
|
||
| // Don't force-collapse on every items change — that makes the dock | ||
| // un-dismissable (issue #381). Only collapse when the revert first appears | ||
| // (0 → >0) or the revert boundary changes to a different message. | ||
| let prevLen = 0 | ||
| let prevFirstId: string | undefined | ||
| createEffect(() => { | ||
| props.items.length | ||
| props.items[0]?.id | ||
| setStore("collapsed", true) | ||
| const len = props.items.length | ||
| const firstId = props.items[0]?.id | ||
| if (len > 0 && (prevLen === 0 || firstId !== prevFirstId)) { | ||
| setStore("collapsed", true) | ||
| } | ||
| prevLen = len | ||
| prevFirstId = firstId | ||
| }) | ||
|
|
||
| const toggle = () => setStore("collapsed", (value) => !value) | ||
|
|
@@ -58,7 +67,7 @@ export function SessionRevertDock(props: { | |
| <Show when={store.collapsed && preview()}> | ||
| <span class="min-w-0 flex-1 truncate text-14-regular text-text-base cursor-default">{preview()}</span> | ||
| </Show> | ||
| <div class="ml-auto shrink-0"> | ||
| <div class="ml-auto flex items-center gap-1 shrink-0"> | ||
| <IconButton | ||
| icon="chevron-down" | ||
| size="normal" | ||
|
|
@@ -76,6 +85,21 @@ export function SessionRevertDock(props: { | |
| store.collapsed ? language.t("session.revertDock.expand") : language.t("session.revertDock.collapse") | ||
| } | ||
| /> | ||
| <IconButton | ||
| icon="xmark-small" | ||
| size="normal" | ||
| variant="ghost" | ||
| onMouseDown={(event) => { | ||
| event.preventDefault() | ||
| event.stopPropagation() | ||
| }} | ||
| onClick={(event) => { | ||
| event.stopPropagation() | ||
| setStore("collapsed", true) | ||
| }} | ||
| aria-label="Dismiss" | ||
| title="Collapse" | ||
| /> | ||
|
Comment on lines
+88
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Prevent the header keyboard handler from intercepting dismiss-button keys. When either dismiss button has focus, Proposed fix const onHeaderKeyDown = (event: KeyboardEvent) => {
+ if (event.target !== event.currentTarget) return
if (event.key !== "Enter" && event.key !== " ") return
event.preventDefault()
toggle()
}Also applies to: 177-191 🤖 Prompt for AI Agents |
||
| </div> | ||
| </div> | ||
|
|
||
|
|
@@ -132,7 +156,7 @@ export function SessionRevertDock(props: { | |
| {preview()} | ||
| </span> | ||
| </Show> | ||
| <div class="ml-auto shrink-0"> | ||
| <div class="ml-auto flex items-center gap-1 shrink-0"> | ||
| <IconButtonV2 | ||
| icon={<IconV2 name="outline-chevron-down" size="small" />} | ||
| size="large" | ||
|
|
@@ -150,6 +174,21 @@ export function SessionRevertDock(props: { | |
| store.collapsed ? language.t("session.revertDock.expand") : language.t("session.revertDock.collapse") | ||
| } | ||
| /> | ||
| <IconButtonV2 | ||
| icon={<IconV2 name="xmark-small" size="small" />} | ||
| size="large" | ||
| variant="ghost-muted" | ||
| onMouseDown={(event) => { | ||
| event.preventDefault() | ||
| event.stopPropagation() | ||
| }} | ||
| onClick={(event) => { | ||
| event.stopPropagation() | ||
| setStore("collapsed", true) | ||
| }} | ||
| aria-label="Dismiss" | ||
| title="Collapse" | ||
| /> | ||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: harmoniqs/opencode
Length of output: 35946
🏁 Script executed:
Repository: harmoniqs/opencode
Length of output: 50375
🏁 Script executed:
Repository: harmoniqs/opencode
Length of output: 36227
🏁 Script executed:
Repository: harmoniqs/opencode
Length of output: 1360
Wait for a restart acknowledgement before reloading.
If the server restart fails or takes longer than 800 ms, this fire-and-forget
postMessagestill reloads the page. Add a nonce-based response after server readiness, await it with a timeout, and reject on timeout so the error-page handler can handle restart failures.🤖 Prompt for AI Agents