Skip to content

Chat UI adoption + frontier models, managed/BYOK routing, Atlas graph & onboarding fixes#147

Merged
Ishaan Gangwani (ishaan1124) merged 22 commits into
mainfrom
feat/legacy-chat-ui
Jul 8, 2026
Merged

Chat UI adoption + frontier models, managed/BYOK routing, Atlas graph & onboarding fixes#147
Ishaan Gangwani (ishaan1124) merged 22 commits into
mainfrom
feat/legacy-chat-ui

Conversation

@ishaan1124

Copy link
Copy Markdown
Member

Summary

Adopts the refined v1.1.116 chat surface into OpenScience and layers on a batch of model-catalog, billing, Atlas-graph, and onboarding fixes.

Chat / message UI

  • Full v1.1.116 message + model-selector surface
  • Clickable file paths (prose + read/edit/write cards) open the file; bash cards open a shell tab
  • Reasoning toggle: rotating disclosure, bigger hit area, traces persist after the reply
  • Sticky sent-bubble gradient recoloured to the page background (no lighter band)
  • Neutral diff counts + "Files"/"Updated" wording

Models & composer

  • Frontier-only default picker (full catalog still reachable via Manage Models); robust native ↔ OpenRouter id matching (claude-opus-4-8claude-opus-4.8, z-ai/zai/zhipuai)
  • Crisper picker, mlML, consistent control-row font
  • Removed the gpt-5.5 fast/priority speed toggle end to end (UI + serviceTier plumbing + schema)

Sessions & Atlas graph

  • Sidebar: live search, double-click inline rename, editable conversation title, more padding
  • Re-exposed the orphaned revert/unrevert as /undo and /redo
  • Orbit-only graph (dropped the cards + timeline toggle)
  • Dev graph bridge pointed at the correct app. host (was 502'ing) + quiet /project probe

Billing / providers

  • Managed = 100% OpenRouter via the Atlas gateway (verified both sides)
  • BYOK no longer routes through the managed wallet after a managed→byok switch: drops managed thk_ providers and skips the synced enabled_providers whitelist

Onboarding

  • No-provider-key empty state with clear next steps
  • Discoverable Codex (ChatGPT) OAuth in the BYOK setup dialog

Testing

  • typecheck: 7/7 packages
  • backend suite: 975 pass / 1 skip / 0 fail

Overlay the per-component CSS from the pre-thesis (v1.1.116) design onto the
@synsci/ui components — the reskin behind restoring the centered conversation
look. All 24 files are token-driven, so they render against the current
theme's color/radius/font tokens rather than transplanting old colors. The
.tsx are untouched, so the recent reasoning + subagent-card fixes in
session-turn/message-part survive.

Files: accordion, button, card, checkbox, dialog, dropdown-menu, hover-card,
icon-button, keybind, line-comment, list, markdown, message-part,
notebook-cell, popover, radio-group, select, session-review, session-turn,
switch, tabs, tag, text-field, toast.
The adopted v1.1.116 component CSS references an older token vocabulary
(--bg-*, --border-default, --color-semantic-*, --text-{critical,success,
warning}-base, --icon-weak, --font-size-xs). Add an additive compat shim
that maps those names onto the current, more granular tokens (--background-*,
--surface-*, --border-weak-base, --icon-critical/info/success/warning-base)
so the reskin renders in the current palette. No current token is redefined,
so the right pane and other screens that depend on them are untouched.
Replace the thesis full-width chat area + thesis Composer with the pre-thesis
chat surface: a centered conversation column (md:max-w-200 mx-auto), the 2px
between-turns divider, and a gradient prompt dock wrapping <PromptInput> (the
legacy composer, revived — all its context providers are still mounted in
app.tsx, it was just orphaned).

Adds the sticky back-to-parent header with a ← button when the active session
has a parentID, so sub-agent sessions are returnable instead of a dead end.
Preserves the current data wiring (turnMessages, activeSession, revert banner),
center tabs, and right pane; RightPaneTab stays canvas|terminal (no agents
tab). Drops the stale "Agents view" comment.
The orphaned PromptInput had drifted to a near-square 4px corner; the
pre-thesis design (and the composer the screenshot shows) is a soft 14px
radius. Bump the composer shell to rounded-[14px] and the model chip to
rounded-[6px]. Logic untouched — the current file keeps its skills-slash
entries and openscience-client wiring over the v1.1.116 original.
Replace the thesis "What are we working on?" welcome (serif prompt + agent
chips + suggested prompts) with the pre-thesis NewSessionView: project /
branch / worktree context, bottom-aligned in the centered column. Agent and
model selection stays in the composer, where the old flow put it. Worktree
selection is shared between the empty-state view and the composer via a
newSessionWorktree signal.
Tighten the model popover toward the old look: rounded-md (was rounded-lg),
a defined border-base edge (was border-weak), and shadow-md (was shadow-lg),
with slightly reduced footprint. Row content (source badge, variants) is
kept — only the container framing changes.
Port the priority-processing toggle to the composer, next to the effort
cycler: a normal/fast ghost toggle shown only for gpt-5.5, sent as `fast`
on the prompt (backend maps it to OpenAI service_tier: priority). Resets
when the model changes. The effort-level cycler was already present.
Overlay the old chat *rendering* components wholesale so messages, the
streaming turn, notebook cells, and the model selector render like the
pre-thesis UI — not just the CSS. session-turn / message-part /
notebook-cell and the dialog-select-model set are the v1.1.116 originals.

The composer stays on the adapted PromptInput (openscience client + skills +
the new fast toggle); the old tier selector is gone since openscience
dropped tiered agents. Reconciled: SessionTurn no longer receives the
current-only onRevertMessage/hideTools props, and message-part re-exports
ARTIFACT_TOOL so the science tool-renderer still resolves.
The app-wide :focus-visible rule paints a 2px teal outline on every focused
button (!important), which overrode button.css's subtle shadow focus and read
as a harsh box on the composer's effort/speed controls. Scope it out of the
PromptInput and the conversation so the v1.1.116 buttons keep their own soft
focus treatment. Focus stays visible (button.css shadow-xs-border-focus);
the outline is untouched everywhere else for a11y.
Curated file-extension matches in markdown and the read/edit/write tool cards
open the referenced file in the center-pane file view; bash cards reveal the
terminal and re-run there. Wired via a data.openFile callback the workspace
provides.
…y gradient

The show/hide-steps disclosure triangle now rotates with state, has a larger
hit area + hover affordance, and the reasoning parts persist after the reply.
The sticky sent-bubble was painting itself with --background-stronger (lighter
than the page) plus a fade in that tone — recoloured to --background-base so it
sits flush with no band.
…odels

The composer picker defaults to a curated frontier set (gpt-5.5, claude-sonnet-5,
claude-opus-4-8, claude-fable-5, glm-5.2, kimi-k2.7-code, deepseek-v4-pro/flash);
everything else stays reachable in Manage Models. A canonicalKey() folds dots<->
dashes and the z-ai/zai/zhipuai alias so a native id and an OpenRouter slug for
the same model match. Falls back to show-all when no frontier model is connected.
…; drop fast toggle

Model picker rows get provider icons + smaller consistent type; the agent
selector renders 'ml' as ML and its value matches the ghost-button font (14px).
The gpt-5.5 normal/fast speed toggle is removed from both composers (it billed
priority processing).
Removes the per-request fast param + serviceTier:'priority' mapping and the
'fast' field from the prompt/message schemas, so nothing can request priority
(more expensive) processing.
…/redo

Sessions sidebar gets a live search, double-click inline rename (via a new
sync.session.rename), a sentence-case label, and more button padding. The
conversation title in the chat header is editable the same way. Re-exposes the
orphaned revert/unrevert as first-class /undo and /redo commands.
Pins the graph to the orbit layout and removes the cards/timeline segmented
toggle — one graph view, no timeline.
…ct probe

The dev-only /api/thesis middleware defaulted to api.syntheticsciences.ai (which
doesn't resolve) instead of the app host the backend already uses, 502'ing the
graph. Also mirrors the backend's quiet-200 catch-all so an unrouted /project
probe stops spamming 404s.
… switch

A prior 'openscience login' syncs a managed openrouter credential (thk_ key on
the Atlas proxy) plus enabled_providers:[openrouter]. Both survived a switch to
byok, so byok kept routing through the wallet and hid the user's own providers.
Under an explicit byok toggle we now drop any provider whose effective key is a
managed Atlas key, and skip the synced enabled_providers whitelist.
The new-session screen now explains what to do when no model is connected (add a
key with 'openscience keys signin', or use managed with 'openscience login').
The BYOK setup dialog surfaces the ChatGPT/Codex OAuth path instead of leaving it
CLI-only.
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscience Ready Ready Preview, Comment Jul 8, 2026 6:48am

Request Review

@ishaan1124
Ishaan Gangwani (ishaan1124) merged commit 970b918 into main Jul 8, 2026
2 checks passed
@ishaan1124
Ishaan Gangwani (ishaan1124) deleted the feat/legacy-chat-ui branch July 8, 2026 06:57
Aayam Bansal (aayambansal) pushed a commit that referenced this pull request Jul 8, 2026
Chat UI adoption + frontier models, managed/BYOK routing, Atlas graph & onboarding fixes
Aayam Bansal (aayambansal) pushed a commit that referenced this pull request Jul 8, 2026
Fixes the Format check: 4 files from PR #147 plus notebook-cell + dialog-manage-models which were already unformatted on main.
Aayam Bansal (aayambansal) pushed a commit to codeGaus/openscience that referenced this pull request Jul 8, 2026
Fixes the Format check: 4 files from PR synthetic-sciences#147 plus notebook-cell + dialog-manage-models which were already unformatted on main.
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.

1 participant