Skip to content

Daily Rebase#4

Merged
duanbing merged 14 commits into
RouterBase:mainfrom
tensorzero:main
Jan 29, 2026
Merged

Daily Rebase#4
duanbing merged 14 commits into
RouterBase:mainfrom
tensorzero:main

Conversation

@duanbing

Copy link
Copy Markdown

No description provided.

Aaron1011 and others added 14 commits January 28, 2026 14:40
* Re-enable windows builds

The incident has ended: https://www.githubstatus.com/incidents/90hj03y5tj3c

* Run prettier
* Distroless provider proxy

* Distroless provider proxy

* Fix

* Fix
* gave the client the ability to cancel sessions

* added ui handling for cancelling sessions

* improved error handling, added gateway route

* made this a stop button

* cancel client-side tool execution when the cancel route is called

* changed cancel->interrupt everywhere

* fixed issue with toast in wrong session

* added feature flag to ui for interruption

* forgot a file

* improved error handling
The live-tests job was missing the fail-fast configuration, causing it
to terminate early when one matrix job fails during scheduled runs. This
matches the existing behavior of the client-tests job, which already had
this setting to ensure scheduled runs complete all jobs for better
visibility into provider flakiness.

Co-authored-by: Claude <noreply@anthropic.com>
* Clean up legacy gitkeep

* Clean up legacy gitkeep
* Add graceful error handling to autopilot session page

- Use <Await errorElement> pattern for initial load errors, showing
  inline error state while preserving header and chat input
- Add EventErrorBoundary to wrap individual events, preventing a
  single malformed event from crashing the entire chat
- Existing error handling (SSE retry, pagination catch) unchanged

* Revert cosmetic changes

Keep prop name as eventsData and restore original comment

* Fix chat input staying disabled on load error

When initial load fails, call onError to clear isEventsLoading
so ChatInput becomes usable again.

* Simplify: remove loading-based input disable

ChatInput no longer disabled during loading - users can type immediately.
If submit fails (e.g. session doesn't exist), onMessageFailed shows toast.
Removes onLoaded callback and isEventsLoading state tracking.

* Disable ChatInput when initial load fails

Tracks hasLoadError state to prevent users from sending messages
when the event stream failed to load (avoids invisible optimistic
messages).

* Allow typing but block submit on load error

* Use disabled instead of submitDisabled for load error

* Restore loading state tracking, remove unnecessary comments

- Disable ChatInput during loading AND error states
- Remove redundant comments (code is self-documenting)
- Consistent callback pattern for onLoaded and onError

* Restore original comments
* Polish autopilot chat input styling

- Remove focus ring outline on textarea
- Move send button inside input with absolute positioning
- Make input fully rounded (pill shape) for single line
- Revert to rounded-md when multiline
- Center text vertically with adjusted padding
- Update placeholder to "Send a message..."

* Fix chat input text size to be consistent across screen widths

* Add debounced resize handler for textarea height adjustment

* Simplify message labels from 'User Message' to 'User'

* Shorten breadcrumb label from 'Autopilot Sessions' to 'Autopilot'

* Restore focus to textarea after sending message

* Restore focus to textarea after sending message

* Darken textarea border on focus

* Use consistent rounded-md border radius for chat input

Remove dynamic pill-to-rectangular border radius transition that was
jarring when the textarea expanded. Always use rounded-md for cleaner UX.
* Add markdown rendering for assistant messages in autopilot

Add react-markdown library and create a Markdown component with
styled rendering for headings, lists, code blocks, blockquotes,
links, tables, and inline formatting. Update EventStream to
render assistant messages with markdown instead of plain text.

* Add remark-gfm for table support and reuse Code component

- Add remark-gfm plugin to enable GitHub Flavored Markdown (tables,
  strikethrough, autolinks, task lists)
- Reuse existing Code component for inline code styling consistency
- Use bg-muted for code blocks and table headers to match codebase patterns

* Use CodeEditor for markdown code blocks

Replace plain <pre> with CodeEditor for fenced code blocks, providing
consistent UX with copy button, word wrap toggle, and syntax highlighting.

* Add markdown rendering for assistant messages in autopilot

- Add react-markdown with remark-gfm for GitHub Flavored Markdown
- Create Markdown component with styled headings, lists, code blocks,
  blockquotes, links, and tables
- Export ReadOnlyCodeBlock for reusable code display with copy button
- Update EventStream to render assistant messages with markdown
- Use ReadOnlyCodeBlock for tool call arguments (JSON with copy button)
- Smart JSON detection: parse stringified JSON for pretty-printing
- Simplify CodeEditor to always use monospace (remove unused sans theme)
- Add GlobalToastProvider to Storybook stories for CodeEditor copy

Closes #5907
Closes #5909

* Refine markdown spacing and inline code styling

- Use space-y-1.5 for list item spacing
- Add mt-2 to lists for nested list separation
- Use text-xs for inline code
- Remove unused Code component import

* Use symmetric my-3 margin for list spacing

* Fix stale comment about theme variants

* Fix

---------

Co-authored-by: Gabriel Bianconi <1275491+GabrielBianconi@users.noreply.github.com>
* Upgrade Python version management

* Upgrade Python version management

* Upgrade Python version management
* Postgres schema migration for feedback tables

* Step 2: Add Postgres feedback tables and dual-write integration

- Add migration for 5 feedback tables: boolean_metric_feedback,
  float_metric_feedback, comment_feedback, demonstration_feedback,
  static_evaluation_human_feedback
- Implement FeedbackWriteQueries trait with insert methods for each table
- Implement FeedbackQueries trait for Postgres (9 read methods)
- Add dual-write logic to feedback handler, gated by ENABLE_POSTGRES_WRITE flag

Refactor feedback_read.rs to use QueryBuilder instead of dynamic SQL

- Replace AssertSqlSafe with QueryBuilder pattern for safer query building
- Add validation functions for table names (validate_inference_table,
  metric_table_name, inference_table_name)
- Use push_bind() for all user-provided values
- Trusted literals (table names, SQL keywords) are pushed directly via push()

Delegating connections

PR feedback

Semantics for ordering

* Test hashes
The isEventsLoading state was resetting to true on React Router
revalidation (e.g., after tool approval). The useEffect had eventsData
in its deps, causing it to fire when the promise reference changed.

Fix: Remove eventsData from deps. The effect now only fires when
sessionId or isNewSession changes (actual navigation).
* Simplify autopilot session page layout

- Move session ID from page title to breadcrumbs
- Add plus button for new session in sidebar nav
- Reduce margin between breadcrumbs and chat area
- Shorten breadcrumb label from "Autopilot Sessions" to "Autopilot"

* Fix nested link issue and move all titles to breadcrumbs

- Use button with navigate() instead of nested Link
- Move "New Session" from page title to breadcrumbs
- Remove page title entirely for all states

* Improve plus button hover state and add cursor pointer

* Simplify autopilot session page layout

- Remove border around chat messages, use full-page scroll
- Add fixed header with breadcrumbs and fade gradient overlay
- Add fixed footer with chat input
- Dynamic footer height measurement for responsive spacer
- Use bg-bg-secondary for consistent background color

* Fix autopilot sidebar plus button placement

Move plus button from navigation loop to autopilot item
where it actually renders. The previous code checked for
section.title === "Autopilot" but Autopilot is rendered
separately, not in the navigation array.

* Replace spinner with animated ellipsis in status indicator

- Create reusable AnimatedEllipsis component
- Remove Loader2 spinner from status indicator
- Use animated dots for thinking/loading states

* Add configurable AnimatedEllipsis component

- Add reserveWidth option (default: true) to prevent layout shift
- Add absolute option for positioning without affecting layout
- Export ReservedWidth utility for other use cases
- Use absolute positioning in status indicator for centered text

* Refactor AnimatedEllipsis to use EllipsisMode enum

- Replace boolean props with EllipsisMode enum (Dynamic, FixedWidth, Absolute)
- Add horizontal margin to status indicator
- Export EllipsisMode for explicit mode selection

* Move tool approval card to fixed footer and improve status indicator

- Move PendingToolCallCard from scrollable content to fixed footer
- Lift authorization state and handlers to parent component
- Add shared Divider component for consistent styling
- Use AnimatedEllipsis in status indicator instead of static "..."
- Fix loading skeleton vertical centering with min-h-[50vh]
- Add className prop to PendingToolCallCard for pointer-events

* Extract FadeGradient component with direction and color enums

- Create reusable FadeGradient component in ~/components/ui/
- Add FadeDirection enum (Top, Bottom) for gradient direction
- Add SurfaceColor enum (Primary, Secondary, Tertiary) for common surfaces
- Fix scroll position adjustment when footer height changes
- Separate footer height measurement from scroll adjustment effect

* Reduce fade gradient height from h-16 to h-10

* Add useElementHeight hook and improve session page layout

- Extract useElementHeight hook for reusable ResizeObserver logic
- Dynamic header/footer height measurement via hook
- Use padding instead of spacer divs for header/footer spacing
- Consolidate session state reset into single useEffect
- Extract handleScroll to named function for clarity
- Skip scroll adjustment on initial mount to prevent jump

* Only adjust scroll when user is near bottom of content

* Fix scroll adjustment for large footer height changes

* Fix nested interactive elements in sidebar - use absolute positioning for + button

* Change session divider text from 'Started' to 'Start'

* Fix prettier formatting

* Move SSE error message from scrollable content to fixed header

* Extract ErrorBanner component

* Fix scroll adjustment: only adjust on footer growth, reset ref on session change

* Fix cooldown ref reset on session change and bottom fade init

* Use lodash-es debounce instead of local implementation

* Simplify isEventsLoading logic (align with #5948)

* Clear hasLoadError when events load (align with #5953)
@duanbing duanbing merged commit e19880c into RouterBase:main Jan 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants