Skip to content

web: the inline web client, running against the real server - #252

Open
morajabi wants to merge 118 commits into
mainfrom
claude/web-app
Open

morajabi wants to merge 118 commits into
mainfrom
claude/web-app

Conversation

@morajabi

@morajabi morajabi commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Inline's web client, built on the web app that was parked on 2026-11-18. It now runs against the real server and is deployable as app.inline.chat. Sign-in, onboarding, the chat list and chatting are close to the macOS app.

Needs sign-off before merging

Protocol (no proto/ changes):

  • 767a627eb adds a v3 client connection that runs in the browser (packages/protocol/src/secure/).
  • f245f4af5 lets that connection accept error code 16, which the server sends when the clock is unauthenticated.

Schema:

  • Web replica SQLite schema versions 3, 4 and 5 add history coverage, members and settings, and a message search index. These exist only in the browser; there are no server migrations and no GRDB changes.

Server:

  • 5fbeb0813 lets the web app start Google and Apple sign-in and come back to its own origin.

Landing:

  • 4ca792783 adds "Open in your browser" to the invite, public space and chat link pages.

Workspace:

  • f4631eae5 moves landing/packages/* to web/packages/*, and the root workspace now lists web and web/packages/*.
  • 2d8d77ab6 makes CI build and check the web workspace.

Content policy:

  • One named trusted-types policy, inline-script-url.

Views are Solid 2

The last five commits replace React 19 with Solid 2.0.4.

  • Data: @inline/reactive still runs on alien-signals. Views read signal.get() in their markup.
  • Bindings: createModel, createDerivedModel and attach, in @inline/reactive/solid.
  • Lint: effects are banned in views, along with the Solid patterns that silently stop updating.
  • Docs: web/docs/views.md, reactivity.md and decisions.md are rewritten.

Results:

  • Updates run no components. Render-budget tests mount the real models for the sidebar, timeline, chat pane, message row, composer and others.
  • Initial JavaScript is 206.9 kB gzip signed in (267.2 kB on React) and 110.5 kB signed out (160.0 kB).
  • The timeline lab passes 25 of 25 at pixel ratios 1, 1.5 and 2.

No protocol, schema or API change.

What works

  • Accounts: sign in by email or phone code, Google and Apple sign-in, profile setup and photo, signed-in devices, notification mode, privacy switches, bot management.
  • Sidebar: inbox, spaces and archived chats; a one-column layout on narrow windows.
  • Chatting:
    • Replies, reply in thread, forward, edit, delete, pins and the pinned bar.
    • Markdown, quotes, selecting several messages, Send as Silent, bot commands.
    • Jumping to unread mentions and reactions, [[Title]] and #12 thread links, per-chat translation.
  • Media: photo albums with the Mac grid, video posters, voice messages recorded in the browser, files, and Save and Copy Image.
  • Chats and spaces: chat toolbar and More menu, Delete History, Delete or Leave Chat, member roles, user groups, moving threads, public and private threads.

Testing

  • All suites pass: app 1055, client 748, view 525, ui 221, chat-ui 400, timeline 223, composer 236, reactive 127. Typecheck and lint are clean.
  • Driven in Chromium against a local server and the demo core. Not yet tried in Safari or Firefox.
  • Signed-in first load is 267.2 kB, against a 235 kB budget; react-dom is 58.4 kB of that.

Not done

  • Folders, sidebar reordering, clearing a whole space's history.
  • GIFs as video, a picker for the translation language.
  • Focus status and time zone privacy rules.
  • Global search: V3 on the web, or V2 support on the server.

🤖 Generated with Claude Code

Adds secure/connection (with its runtime, rpc input and cached aes helpers)
and the ./secure/connection export. Additive: no existing file changes, the
wire format is unchanged, and the sdk still uses its own connection.

Parked work in progress. Needs sign-off before it reaches main: it lives in
the published protocol package.
Moves the browser client packages from landing/packages to web/packages and
adds the web app under web/: the account core in a worker (sqlite on opfs,
sync, outbox, realtime, media, search), the ui-to-core contract, the tab
leader/follower link, the reactive store, the ui kit, composer, timeline,
message rendering, the app shell and feature views, a service worker, a
demo core with a simulated server, labs, and the guides in web/docs.

State when parked (2026-11-17): typecheck and lint clean, about 3,780 tests
passing, driven end to end in chromium against the demo core. Never run
against a real server, in safari or firefox, or measured with the browser
on screen. Signed-in initial javascript is 247 kB against a 235 kB budget.

Needs sign-off before it reaches main:
- web replica sqlite schema versions 3, 4 and 5 (history coverage; members,
  participants, groups, folders and settings; the message search index)
- content policy: trusted-types inline-script-url (one named policy)
- the root workspace now lists web and web/packages/* in place of
  landing/packages/*

Planning notes, open questions and the log are in the private notes repo
under .context/2026-11-16-inline-web-program/.
Adds a web job to the integrations workflow, drops the landing/packages
checks from the landing job, and copies web/ (package manifests only for
the server image) into the landing and server docker builds so the
workspace install resolves.

Parked work in progress. Not verified: the docker builds were not run, and
the new ci job has never run on a hosted runner.
…file setup, account actions and panes

- core fetches getChats and getMe once per session (sidebar previews, me for new accounts)
- sign-in setup step saves name and username (updateProfile)
- online account intents: createThread, openDirectChat, createReplyThread, updateProfile,
  createSpace, joinSpaceByInvite, spaceInviteLink, inviteToSpace, leaveSpace, updateChatInfo,
  deleteChat, forwardMessages, pinMessage
- panes for new thread, create or join a space, invitation, space invites, profile
- sidebar + menu, settings button, profile editor in account settings
- inbox shows the selected chat as a temporary row (rule 7)
- vite resolves @inline-chat/protocol from source
…alog fills only what is missing

- reply quotes resolve the replied message and sender (also the viewer's own sends)
- up in an empty composer edits the newest own message by row, not by server id
- opening a chat with the pointer (sidebar, quick search) focuses its composer
- session getChats installs only missing chats, dialogs and messages; CoreHost.sessionCatalog for scripted tests
- quick search opens or starts a direct chat and creates a titled thread
- two v3 transport tests skipped after main's record clock changes (v3 is off on the web)
- Reply in Thread or Open Thread (createReplyThread, opens the thread destination)
- Forward picker over the local chat list, toast on success
… for app.inline.chat

- one header definition (tooling/hosting-headers.ts) for the meta policy, _headers and the server
- connect-src covers presigned R2 media; frame-ancestors none as a header
- web/Dockerfile serves dist with tooling/serve.ts (SPA fallback, immutable assets, /healthz)
- docs/deploy.md; INLINE_WEB_EXTRA_CONNECT for local smoke tests of a production build
- the chat query carries a reply thread's parent message; wantMessages asks the server for messages not on the device
- an anchor bar under the thread's title goes to the parent message
…its own origin

client_type=web with return_to set to an allow-listed app origin (https://app.inline.chat/,
plus http://localhost:8001/ outside production). The return url is kept in the attempt's
app_callback_scheme column (no schema change) and the ticket hand-off goes there instead of
a custom url scheme. Native clients are unchanged.
…t) once per session when a chat opens

ChatRow gains pinnedMessageIds (ui-to-core contract only).
- setProfilePhoto intent uploads through the media core, then SET_PROFILE_PHOTO; Change Photo in account settings
- platform pickFiles: hidden input in the document, settles on cancel (after tweb requestFile)
- account actions report uncertain after a 20 s deadline and when a result cannot be applied after the server answered
- invite link is only created on an explicit Create Link
- updateProfile changes the username before the name, so a taken username saves nothing
- leaveSpace removes the space, its chats and dialogs locally
- messages and chats asked for while offline are fetched when the connection opens
- deleting a thread clears every pane showing it
- delayed composer focus never fires on a phone or after the user moved focus
- serve.ts: paths stay inside the build folder; a malformed path is a 404
…d stays open after a reserved-id create

- listSessions and revokeSession intents
- keepOpen waits for the chat on the server (requiresChatCreated), as the mac does
…lipboard api is refused (after tweb), used for every copy
…ar does; composer property test gets a 30 s timeout under load
… review

- New Thread picks people for a home thread (embedded people picker)
- outgoing markdown: links and addresses are found before style markers, a one-line fence keeps its first word,
  a mention inside bold is fine, .sh and similar are not linked (mac's list), bold stays linear, italic only at word edges
- profile photo upload jobs are released or cancelled; photo upload gets a 3 min deadline; no media core is unsupported
- pending-setup polling resumes on reconnect
- leaving a space clears every pane on its chats; devices list offers Show Devices after a failure
…; a poster named over 20 h ago is dropped when the upload starts over; no pending poster left by a failed start
… messages the server left out are asked again, one language detector per page
…ver takes); other types are converted where the core can
…teds, and report effects that write what they read

a computed that writes a signal or reads itself now throws a ReactiveRuleError
instead of returning a half-built value; an effect that writes a signal it
already read in the same run reports one instead of silently showing a stale
value. onDispose outside an owner no longer leaks a root effect. contract
tests cover the rules and ownership edge cases (untracked roots, an effect
disposed mid-flush, writes in cleanups). no existing code broke a rule.
deleting the anchored row dropped it from the anchor list, and only user
scrolling re-captured; after enough deletions the controller had no
reference row and stopped compensating changes above the reader. it now
captures the rows on screen again when fewer than two anchors are left.
…ll prepends and jumps over resizing rows

bun run lab <name> runs a lab page in the installed chrome, headless, with a
chosen device pixel ratio, seed and single operation. the timeline lab adds
delete rows above the reader, delete the anchored row, prepend while
scrolling (a held gesture) and jump while a row above resizes.
…e, and the connection is probed when the app returns

a silently dead socket was found only after about 40 s (a ping every 10 s,
judged once a loop against 30 s). each ping now has its own deadline from the
measured round trip (8 to 20 s), and a busy socket whose pong is late is not
called dead while frames keep arriving; a timeout is reported once. an open
connection kept through the background grace period is probed when the app
returns after 10 s or more, since a hidden tab's timers are throttled.
reconnect backoff is spread by 20 percent so clients do not return in
lockstep.
…ar writes until the browser's traversal lands

history.go() answers with popstate on a later task. a click right after the
in-app back pushed an entry while the traversal was pending, and the late
popstate then moved the pane back over the click, leaving the pane and the
address bar apart. the binding now moves the pane immediately, recognizes
its own traversal's popstate, and replays writes made meanwhile once the
browser has landed (given up after a second). the user's own browser back
during that time still wins.
… grid transcription images

the root workspace lists web/, so every image that prunes the workspace
needs it in its build context (the mcp image failed with a missing
web/package.json). changes under web/ alone no longer run apple validation.
…nstead of reporting an error

reporting every such write was wrong: clearing a consumed value (the chat
info participants model, the emoji picker, notifications) is a legitimate
state step. the effect now runs again once the outer write or batch is over,
re-triggered through the signals it wrote, and only effects that never
settle are reported as a cycle. documents the rules the graph enforces.

This branch has not been deployed

No deployments
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