fix: event-loop freezes, plugin-install boot crash, tmux attach/scrollbar, Codex transcripts

- GET /api/workflows: one LEAD() window pass in a read worker (read-pool.js,
  workflow-stats.js); idx_events_session restored, idx_events_tool added
- compat-sqlite gains function/pluck/readonly so a plugin install without a
  better-sqlite3 build boots again; antigravity-usage uses db.js's Database
- install-hooks adds no checkout hooks while the agenthub plugin is enabled
  (events were doubled)
- terminal attach runs the live tmux server's own binary; the pane scrollbar
  gets a visible 2-column style, and claude panes start with
  CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 so tmux keeps history to scroll
- Codex sessions' conversation in GET /api/sessions/:id/transcript
- Codex/Antigravity sessions claimed by their workspace without hooks
- UI-audit follow-ups, docs and OpenAPI
This commit is contained in:
2026-10-05 17:01:05 +07:00
parent 442f133930
commit 198fbb7980
78 changed files with 2716 additions and 873 deletions
+9 -1
View File
@@ -5,7 +5,9 @@
* which the SPA fallback answers with index.html, so the dynamic import
* rejects: that case reloads the page once (a sessionStorage guard stops a
* reload loop). Any other render error — or a second chunk failure — shows a
* themed "Something went wrong — Reload" panel instead of a blank app.
* themed "Something went wrong — Reload" panel instead of a blank app, until the
* route changes (`resetKey`): the lazy routes share one boundary instance, so
* an error on one page would otherwise stay on every other.
* `reloadOnce` is also used by App's `vite:preloadError` listener.
* @author Nguyễn Ngọc Trí Vĩ <vinnt@smartgift.vn>
*/
@@ -45,6 +47,8 @@ interface Props {
children: ReactNode;
/** Injected in tests; defaults to `window.location.reload`. */
reload?: () => void;
/** A change (the route's path) clears a caught error. */
resetKey?: string;
}
export class RouteErrorBoundary extends Component<Props, { error: Error | null }> {
@@ -58,6 +62,10 @@ export class RouteErrorBoundary extends Component<Props, { error: Error | null }
if (isChunkLoadError(error)) reloadOnce(this.props.reload);
}
componentDidUpdate(prev: Props) {
if (this.state.error && prev.resetKey !== this.props.resetKey) this.setState({ error: null });
}
render() {
if (!this.state.error) return this.props.children;
const reload = this.props.reload ?? (() => window.location.reload());