Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
8952f5b
A Conversations page lists every conversation, as the sidebar's panel…
claude Nov 27, 2026
77e53af
Inside the phone app's native shell, the web app draws only the page
claude Nov 27, 2026
500e015
The native shell hears ready before anything a page says
claude Nov 27, 2026
998b069
A mock server runs the built app signed in without OpenBot's server
claude Nov 27, 2026
637a205
Tests hold the web app's side of the phone app's native shell
claude Nov 27, 2026
b877563
Inside the native shell, a screen's title sits closer to the top
claude Nov 27, 2026
3519dac
Inside the native shell, the account menu is at the top of the tab pages
claude Nov 27, 2026
93ea476
Say in the changelog that there is a Conversations page
claude Nov 28, 2026
061ba87
Merge main into the native shell branch
claude Nov 28, 2026
9bd0418
In the phone app, keep every field at 16px so iOS does not zoom in on it
claude Nov 28, 2026
22767c9
In the phone app, a larger Account button and menu rows, in the same …
claude Nov 28, 2026
b1e931a
In the phone app, larger tap targets for back, New conversation, the …
claude Nov 28, 2026
0299109
In the phone app, offer no browser notifications anywhere, and prove …
claude Nov 28, 2026
184b566
In the phone app, make the conversation header's buttons 44px like Ba…
claude Nov 28, 2026
ed37b8d
Make the mock server offer push on a fixed answer, so the shell's no-…
claude Nov 28, 2026
b792261
In the phone app, put the keyboard away on a move to another page and…
claude Nov 28, 2026
d35207d
Merge main into the native shell branch
claude Nov 28, 2026
15325e5
Keep Home's top band in skinned frames with no sidebar; only the phon…
claude Nov 28, 2026
4013979
Honour ?native-shell= only in development builds and on development h…
claude Nov 28, 2026
ed1fb13
Make the mock server's shell enter ask for the OpenBot-Shell header, …
claude Nov 28, 2026
287678d
In the phone app, hide Get troubleshooting logs until the web view ta…
claude Nov 28, 2026
8617bea
Bring the phone apps' mock server changes into the web branch: shell …
claude Nov 28, 2026
1d68a02
In the phone app, hide Admin > Audit's Export until the web view take…
claude Nov 28, 2026
36a913f
Tell the phone app ready once the first page has drawn something to r…
claude Nov 28, 2026
fd6025b
Keep the Home fallback fixture's top-bar stub to the files that impor…
claude Nov 28, 2026
2ad1eab
Send a phone app's sign-in sheet on to the hand-off after signing in …
claude Nov 28, 2026
727096e
Name the phone app's sign-in hand-off in the client boundary's allowlist
claude Nov 28, 2026
8db22e4
Read the development flag safely where the app is bundled without Vite
claude Nov 28, 2026
c5bbc9a
Keep the conversations the mock server makes, so sending from Home la…
claude Nov 28, 2026
89eceac
Give the mock server enough Bots and conversations to show the panels…
claude Nov 28, 2026
ff39b0f
In the phone app, make the Chats and Bots tabs the sidebar's own panels
claude Nov 28, 2026
ce1d5c3
In the phone app, give each tab its own stack of pages, and Back that…
claude Nov 28, 2026
e26a158
Draw PageShell without a router, as before, outside the phone app
claude Nov 28, 2026
f592236
In the phone app, open a conversation without raising the keyboard
claude Nov 28, 2026
657e753
Make the mock server's shell enter refuse any Sec-Fetch-Site but none…
claude Nov 28, 2026
0ec0b01
Tell the iOS app how deep each tab is and when the page is about to c…
claude Nov 28, 2026
fdba628
In the phone app, let a tab tap release a route held for a list's scroll
claude Nov 28, 2026
364e26e
Let the mock server take its person's and organization's names from t…
claude Nov 28, 2026
6bfc937
In the phone app, close a menu before telling the app a page is coming
claude Nov 28, 2026
5aeaec3
Merge main into the phone shell's web branch
claude Nov 29, 2026
153c095
Mock server: the phone app's sign-in as the server now does it
claude Nov 29, 2026
b6e85a1
Merge main into the phone-app web branch
claude Nov 29, 2026
efe51fe
Merge main into the phone-app web branch
claude Nov 30, 2026
524141f
Merge main into the phone-app web branch
claude Nov 30, 2026
f5f7cfd
Merge main into the phone-app web branch
claude Dec 1, 2026
db0ad67
Merge main into the phone-app web branch
claude Dec 1, 2026
ef9c2d9
Merge main into the phone-app web branch
claude Dec 1, 2026
b65a84a
Merge main into the phone-app web branch
claude Dec 1, 2026
dd0c447
Merge main into the phone-app web branch
claude Dec 1, 2026
568df92
Merge main into the phone-app web branch
claude Dec 1, 2026
f3fef5d
Merge main into the phone-app web branch
claude Dec 1, 2026
a5e1110
Merge main into the phone-app web branch
claude Dec 1, 2026
41e6a2d
Merge main into the phone-app web branch
claude Dec 1, 2026
8867ff2
Merge main into the phone-app web branch
claude Dec 2, 2026
3e1272a
Merge main into the phone-app web branch
claude Dec 2, 2026
36bd5fd
Merge main into the phone-app web branch
claude Dec 2, 2026
4dbb741
Merge main into the phone-app web branch
claude Dec 2, 2026
486f92c
Merge main into the phone-app web branch
claude Dec 2, 2026
dde4059
Merge main into the phone-app web branch
claude Dec 2, 2026
b44d78d
Merge main into the phone-app web branch
claude Dec 2, 2026
d1273d7
Merge main into the phone-app web branch
claude Dec 2, 2026
ba7f697
Merge main into the phone-app web branch
claude Dec 3, 2026
ba9ab10
Merge main into the phone-app web branch
claude Dec 3, 2026
8d59b13
Phone app: no Download on a reply's table or code block
claude Dec 3, 2026
75366fb
Merge main into the phone-app web branch
claude Dec 3, 2026
ad62f02
Merge main into the phone-app web branch
claude Dec 3, 2026
d4b3c7d
Merge main into the phone-app web branch
claude Dec 3, 2026
a64d1c3
Merge main into the phone-app web branch
claude Dec 3, 2026
7ac94ab
Merge main into the phone-app web branch
claude Dec 4, 2026
fa0ea06
Merge main into the phone-app web branch
claude Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/client-boundary.allow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ export const ALLOWED: Allowed[] = [
rule: "sign-in-protocol",
why: "where sign-in sends a person back to finish verifying an app account",
},
{
file: "app/src/lib/auth/resume.ts",
what: "/api/auth/shell/handoff",
rule: "sign-in-protocol",
why: "where sign-in sends a phone app's sign-in sheet on to, a page the server draws (Continue to the OpenBot app): a document navigation in the sheet's browser, not a data request, so not through the generated client",
},
{
file: "app/src/lib/plugins/finish-on-return.ts",
what: "fetch()",
Expand Down
46 changes: 46 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,52 @@
const skin = saved === "openmuse" ? "openfuse" : saved;
if (skin && skin !== "openbot") document.documentElement.dataset.skin = skin;
} catch {}
try {
// Inside the phone app's native shell (lib/native-shell/shell.ts works this out the same
// way, and app/tests/native-shell.test.ts holds the two together): what the shell
// injects, then its user agent, then ?native-shell=ios for testing, kept for the tab, only
// in a development build or on a development host (?native-shell=off forgets it anywhere).
// Marked for the styles, and the page takes the whole web view, which the shell lays out
// between its own bars. A browser's viewport is left as it is.
let remembered = null;
const host = String(window.location.hostname || "").toLowerCase();
const overridable =
"%DEV%" === "true" ||
host === "localhost" ||
host === "127.0.0.1" ||
host === "[::1]" ||
host === "::1" ||
host.endsWith(".localhost") ||
host.endsWith(".test");
const param = new URLSearchParams(window.location.search).get("native-shell");
const asked = param === "off" || overridable ? param : null;
try {
if (asked === "off") window.sessionStorage.removeItem("openbot-native-shell");
else if (asked === "ios" || asked === "android" || asked === "test")
window.sessionStorage.setItem("openbot-native-shell", "test");
remembered = window.sessionStorage.getItem("openbot-native-shell");
} catch {}
const injected = window.__OPENBOT_NATIVE_SHELL__;
const mark = /OpenBotShell-(\w+)/.exec(window.navigator.userAgent);
const platform =
injected && (injected.platform === "ios" || injected.platform === "android")
? injected.platform
: mark
? mark[1].toLowerCase() === "android"
? "android"
: "ios"
: asked === "ios" || asked === "android" || asked === "test"
? "test"
: overridable && asked !== "off" && remembered === "test"
? "test"
: null;
if (platform) {
document.documentElement.dataset.nativeShell = platform;
const viewport = document.querySelector('meta[name="viewport"]');
if (viewport && !viewport.content.includes("viewport-fit"))
viewport.content += ", viewport-fit=cover";
}
} catch {}
try {
// Opened by OpenBot Desktop's setup, which faded out to the window's ground and marked the
// address once (lib/desktop/from-setup.ts): the first paint fades up from that ground. The
Expand Down
41 changes: 35 additions & 6 deletions app/src/components/app-sidebar/account-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function initialsOf(name: string): string {
.join("");
}

function UserAvatar() {
function UserAvatar({ large = false }: { large?: boolean }) {
const { data: currentUser } = useQuery(currentUserQueryOptions());
const { person } = useAccountNames();
// On this computer the email is the stand-in, so its letters are never drawn either.
Expand All @@ -60,7 +60,10 @@ function UserAvatar() {
return (
<div
aria-hidden="true"
className="size-7 shrink-0 bg-muted-foreground/10 text-foreground/80 rounded-full flex items-center justify-center text-xs overflow-hidden"
className={cn(
"size-7 shrink-0 bg-muted-foreground/10 text-foreground/80 rounded-full flex items-center justify-center text-xs overflow-hidden",
large && "size-9 text-sm",
)}
>
{initials}
</div>
Expand Down Expand Up @@ -135,14 +138,35 @@ export const accountMenuClassName =
"w-max min-w-[min(16rem,var(--available-width))] max-w-[min(24rem,var(--available-width))] p-1.5";
/** The spacing of each of the account menu's rows. */
export const accountMenuItemClassName = "gap-2 px-2 py-1.5";
/** The same rows at a thumb's height, 44px, for the phone app's native shell. */
export const largeAccountMenuItemClassName = "gap-2 px-2 py-3";

/**
* The account, as the strip draws it: the person's avatar at the strip's foot, a button that opens
* the account menu (`children`, the menu's content). Their name, and their organization where
* OpenBot lists them, read in a tooltip on hover and keyboard focus, never while the menu is open.
* The menu itself starts with the account row (`AccountRow`).
*/
export function AccountMenu({ children }: { children: ReactNode }) {
export function AccountMenu({
children,
label,
large = false,
side = "right",
}: {
children: ReactNode;
/**
* The button's name, in place of the person's. The phone app's native shell names it "Account",
* so its tests find it whoever is signed in.
*/
label?: string;
/**
* A thumb's size: the phone app's native shell draws the button 44px square, a whole tap target,
* round a 36px avatar.
*/
large?: boolean;
/** Where the tooltip opens: beside the strip, or below a page's header. */
side?: "right" | "bottom";
}) {
const { person, organization } = useAccountNames();
const [menuOpen, setMenuOpen] = useState(false);
return (
Expand All @@ -151,17 +175,22 @@ export function AccountMenu({ children }: { children: ReactNode }) {
<TooltipTrigger
render={
<DropdownMenuTrigger
className={cn(stripItemClassName, "rounded-full")}
aria-label={label}
className={cn(
stripItemClassName,
"rounded-full",
large && "size-11",
)}
/>
}
>
<UserAvatar />
<UserAvatar large={large} />
{/* Read out as the button's name: whose account, and the organization being worked in. */}
<span className="sr-only">
{organization ? `${person}, ${organization}` : person}
</span>
</TooltipTrigger>
<TooltipContent align="center" side="right" sideOffset={8}>
<TooltipContent align="center" side={side} sideOffset={8}>
<span className="grid min-w-0 *:break-words">
<span>{person}</span>
{organization ? (
Expand Down
12 changes: 11 additions & 1 deletion app/src/components/app-sidebar/bots-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
import { Link, useNavigate, useParams } from "@tanstack/react-router";
import {
createContext,
type ReactNode,
useCallback,
useContext,
useEffect,
Expand Down Expand Up @@ -184,6 +185,7 @@ function BotConversations({
{conversations.hasNextPage ? (
<Button
className={BOT_LIST_ACTION_ROW}
data-bot-list-action=""
disabled={conversations.isFetchingNextPage}
onClick={() => void conversations.fetchNextPage()}
size="sm"
Expand Down Expand Up @@ -296,7 +298,14 @@ function BotRow({
* person opens it to its latest conversations. The search narrows the Bots by name; New Bot is in the
* header.
*/
export function BotsPanel({ hidden = false }: { hidden?: boolean }) {
export function BotsPanel({
hidden = false,
accessory,
}: {
hidden?: boolean;
/** At the end of the title's row, after New Bot: the phone app's account button. */
accessory?: ReactNode;
}) {
const bots = useQuery(agentListQueryOptions());
const roster = useInfiniteQuery(channelListQueryOptions());
const attention = useQuery(botAttentionQueryOptions());
Expand Down Expand Up @@ -347,6 +356,7 @@ export function BotsPanel({ hidden = false }: { hidden?: boolean }) {
<IconPlus />
</Button>
}
accessory={accessory}
className="group-data-[collapsible=icon]:hidden"
hidden={hidden}
title="Bots"
Expand Down
7 changes: 4 additions & 3 deletions app/src/components/app-sidebar/channel-pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ type Props = {
| "fetchNextPage"
| "error"
>;
scrollRoot: RefObject<HTMLDivElement | null>;
/** The list's scroller. Null for a list in the page's own scroller, watched against the window. */
scrollRoot: RefObject<HTMLDivElement | null> | null;
searching: boolean;
};

Expand All @@ -37,7 +38,7 @@ export function ChannelPagination({ query, scrollRoot, searching }: Props) {
!hasNextPage ||
isFetching ||
isFetchNextPageError ||
!scrollRoot.current ||
(scrollRoot !== null && !scrollRoot.current) ||
!sentinel.current ||
typeof IntersectionObserver === "undefined"
) {
Expand All @@ -49,7 +50,7 @@ export function ChannelPagination({ query, scrollRoot, searching }: Props) {
void fetchNextPage({ cancelRefetch: false });
}
},
{ root: scrollRoot.current, rootMargin: "160px 0px" },
{ root: scrollRoot?.current ?? null, rootMargin: "160px 0px" },
);
observer.observe(sentinel.current);
return () => observer.disconnect();
Expand Down
18 changes: 14 additions & 4 deletions app/src/components/app-sidebar/channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const Channel = memo(function Channel({
emphasis,
view = "detailed",
avatar = true,
layout = "sidebar",
"data-slot": slot,
}: {
channelId: string;
Expand All @@ -68,6 +69,11 @@ export const Channel = memo(function Channel({
view?: ConversationView;
/** False under its Bot in the Bots panel: see `ChannelItemContent`. */
avatar?: boolean;
/**
* `sidebar`: a rounded row in a panel. `page`: a row of a flat list (`PageRows`), as on the
* Conversations page: taller, on the column's edge, with a divider between it and the next.
*/
layout?: "sidebar" | "page";
/** Names the row's link for tests, as under its Bot in the Bots panel. Draws nothing. */
"data-slot"?: string;
}) {
Expand Down Expand Up @@ -112,10 +118,14 @@ export const Channel = memo(function Channel({
type="button"
className={cn(
// `group/row`: with a mouse, the row's age shows while the pointer or the keyboard is on it.
"group/row flex flex-row px-2.5 gap-2 items-center w-full not-data-[status=active]:hover:bg-foreground/5 rounded-lg [content-visibility:auto]",
view === "compact"
? "py-1.5 [contain-intrinsic-size:auto_2rem]"
: "py-2 [contain-intrinsic-size:auto_3.25rem]",
"group/row flex flex-row gap-2 items-center w-full not-data-[status=active]:hover:bg-foreground/5 [content-visibility:auto]",
layout === "page"
? // In `PageRows`, which reaches 8px past the column: 8px back in puts the row on
// the column's edge, under the title, with a rounded hover like its other rows.
"min-h-14 rounded-md px-2 py-3 [contain-intrinsic-size:auto_3.5rem]"
: view === "compact"
? "px-2.5 rounded-lg py-1.5 [contain-intrinsic-size:auto_2rem]"
: "px-2.5 rounded-lg py-2 [contain-intrinsic-size:auto_3.25rem]",
)}
activeProps={{
className: "bg-sidebar-accent text-sidebar-accent-foreground",
Expand Down
Loading
Loading