Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,33 @@
"excludeFiles": [
"**/src/**/*.test.ts",
"**/src/**/*.test.tsx",
"packages/client-log/src/index.ts"
"apps/web/src/lib/client-log/index.ts"
],
"rules": {
"no-console": "error"
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"excludeFiles": ["packages/icons/src/**"],
"excludeFiles": ["apps/web/src/lib/icons/**"],
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "lucide-react",
"message": "lucide-react is retired — import from @corbits/icons instead."
"message": "lucide-react is retired — import from @/lib/icons instead."
},
{
"name": "@phosphor-icons/react",
"message": "Import icons from @corbits/icons, not @phosphor-icons/react directly."
"message": "Import icons from @/lib/icons, not @phosphor-icons/react directly."
}
],
"patterns": [
{
"group": ["@phosphor-icons/react/*"],
"message": "Import icons from @corbits/icons, not @phosphor-icons/react directly."
"message": "Import icons from @/lib/icons, not @phosphor-icons/react directly."
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ grid:
This is a default, not a mandate. A directory that scans better as dense
grouped rows than as a table — Settings > Connections is the standing
example (`ConnectorRow` / `OAuthConnectorRow`,
`packages/settings-ui/src/connections-section.tsx`) — keeps that idiom.
`apps/web/src/settings/connections-section.tsx`) — keeps that idiom.
Density over cards: one row per item, a small logo tile, name, a
single-line outcome sentence, a status/provenance caption, and one honest
action button that reflects the item's actual state. A browseable catalog
Expand Down Expand Up @@ -179,7 +179,7 @@ monospace (code, IDs, numeric/tabular contexts). Both are declared once in
`font-mono`, never a font-family override.

**Icons.** Phosphor, bold weight only, imported exclusively through
`@corbits/icons` (`packages/icons/src/index.tsx`) — never straight from
`@/lib/icons` (`apps/web/src/lib/icons/index.tsx`) — never straight from
`@phosphor-icons/react` or from any other icon package. That module is a
curated re-export: only glyphs the product actually uses are named there,
so a stray import can't reach for an off-list icon or a different weight.
Expand Down
4 changes: 2 additions & 2 deletions apps/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cannot appear in one without the other. The contextual column no longer
reads `NAV_ROUTES` at all: it has nothing to do with which pages exist.

Running routines in the contextual column are sourced today from
`@corbits/chat-ui`'s workflow-run listing (`src/shell/routine-activity.ts`)
`@/chat`'s workflow-run listing (`src/shell/routine-activity.ts`)
— the column depends only on that file's `RoutineActivityItem` shape.

## Screens
Expand Down Expand Up @@ -78,7 +78,7 @@ open, inline in that workbench). The `/approvals` route is gone.

`/library` (`src/pages/library-page.tsx`) is the artifact gallery: search,
sort, a grid/rows view toggle, kind-colored cards, and upload, built
against the `ArtifactSummary` type from `@corbits/artifact-ui`.
against the `ArtifactSummary` type from `@/library`.
`LibraryRoute` reads and searches the tenant's artifacts from the real
`/api/tenants/:id/artifacts` (list/detail) endpoint; a chat artifact
chip's "Open in Library" link (`/library/a/:id`) deep-links into the same
Expand Down
15 changes: 2 additions & 13 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,16 @@
},
"dependencies": {
"@corbits/agent-directory": "workspace:*",
"@corbits/api-query": "workspace:*",
"@corbits/approvals": "workspace:*",
"@corbits/artifact-ui": "workspace:*",
"@corbits/assistant-workflow": "workspace:*",
"@corbits/bench-ui": "workspace:*",
"@corbits/chat-ui": "workspace:*",
"@corbits/client-log": "workspace:*",
"@corbits/command-palette": "workspace:*",
"@corbits/connections": "workspace:*",
"@corbits/context-menu": "workspace:*",
"@corbits/error-sink": "workspace:*",
"@corbits/icons": "workspace:*",
"@corbits/inference-settings": "workspace:*",
"@corbits/plugins-ui": "workspace:*",
"@corbits/react-ui": "github:corbitsdev/react-ui#3b122812a307ccb35be31386f7696020c5a84635",
"@corbits/settings-ui": "workspace:*",
"@corbits/shell-layout": "workspace:*",
"@corbits/slug": "workspace:*",
"@corbits/text-diff": "workspace:*",
"@corbits/url-path": "workspace:*",
"@corbits/workflows": "workspace:*",
"@intx/types": "workspace:*",
"@phosphor-icons/react": "^2.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-slot": "^1.2.3",
"@tanstack/react-query": "catalog:",
Expand All @@ -49,6 +37,7 @@
},
"devDependencies": {
"@happy-dom/global-registrator": "^20.11.2",
"@intx/inference": "workspace:*",
"@tailwindcss/vite": "^4.3.3",
"@types/bun": "catalog:",
"@types/react": "^19.2.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/agent-chat-launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Always creates — never the `reuseExisting` land-hop path,
// which is `default-agent-workbench.ts`'s own call, not this one.

import { createWorkbench } from "@corbits/chat-ui";
import { createWorkbench } from "@/chat";

import { workbenchPath } from "./workbench-path";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/agent-dm-launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// (`findExistingAgentChat` in `packages/chat/src/routes.ts`) instead of
// spawning a new one each time.

import { openAgentDm } from "@corbits/chat-ui";
import { openAgentDm } from "@/chat";

import { workbenchPath } from "./workbench-path";

Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/agents-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { type } from "arktype";
import type { ArkErrors } from "arktype";
import { useQuery } from "@tanstack/react-query";

import type { APIQuery } from "@corbits/api-query";
import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@corbits/api-query";
import type { APIQuery } from "@/lib/api-query";
import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@/lib/api-query";
import { isChatPickerModelName } from "@corbits/connections/model-capability";
import { parseErrorEnvelope } from "@corbits/error-sink";
import { tenantKeys } from "./query-client";
Expand Down Expand Up @@ -210,7 +210,7 @@ const AgentCapabilitiesResponse = type({
export type AgentCapabilities = typeof AgentCapabilitiesResponse.infer;

/** `GET /api/tenants/:t/agent-definitions/:id` — the same route
* `@corbits/chat-ui`'s per-workbench Agents section reads for its model
* `@/chat`'s per-workbench Agents section reads for its model
* picker. Fetched lazily, per definition, only once its row is expanded on
* the Agents roster — the paginated definitions list itself carries no
* model field. */
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { useQuery } from "@tanstack/react-query";
import { type } from "arktype";
import type { ArkErrors } from "arktype";

import type { APIQuery } from "@corbits/api-query";
import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@corbits/api-query";
import type { APIQuery } from "@/lib/api-query";
import { ApiQueryError, UnauthenticatedError, toAPIQuery } from "@/lib/api-query";
import { pathToQueryKey } from "./query-client";

export const ProfileSchema = UserProfile;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app-error-boundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { reportError } from "@corbits/error-sink";
import { Button, EmptyState } from "@corbits/react-ui";
import { BoldIconProvider, WarningCircle } from "@corbits/icons";
import { BoldIconProvider, WarningCircle } from "@/lib/icons";
import { Component, type ErrorInfo, type ReactNode } from "react";

export class AppErrorBoundary extends Component<
Expand Down
13 changes: 6 additions & 7 deletions apps/web/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
prebuilt stylesheet; the rules here arrange its pieces into the app frame
and reach for the theme's tokens where a color is unavoidable. */

/* @corbits/chat-ui ships its own stylesheet the same way
@corbits/react-ui does (see main.tsx's `@corbits/react-ui/styles.css`
import); main.tsx is out of scope for this change, so it is pulled
in here via a CSS @import instead of a second entry-point import. */
@import "@corbits/chat-ui/styles.css";
@import "@corbits/bench-ui/styles.css";
@import "@corbits/settings-ui/styles.css";
/* main.tsx already imports `@corbits/react-ui/styles.css` as a second
entry-point import; these stylesheets are pulled in here via a CSS
@import instead. */
@import "./chat/styles.css";
@import "./bench/styles.css";
@import "./settings/styles.css";

/* react-ui's `.corbits-toast` ships a hardcoded horizontal-center transform
(`left: 50%; transform: translateX(-50%) !important`) regardless of the
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// a signed-out browser fires no authenticated request anywhere.

import { Button, EmptyState } from "@corbits/react-ui";
import { WorkbenchLoadingState } from "@corbits/chat-ui";
import { WorkbenchLoadingState } from "@/chat";
import { QueryClientProvider } from "@tanstack/react-query";
import { BoldIconProvider, WarningCircle } from "@corbits/icons";
import { BoldIconProvider, WarningCircle } from "@/lib/icons";
import { useEffect, useMemo } from "react";

import { AuthScreen } from "./auth-screen";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/approval-actions.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, describe, expect, test } from "bun:test";
import { QueryClient } from "@tanstack/react-query";
import { CHAT_STRINGS } from "@corbits/chat-ui";
import { CHAT_STRINGS } from "@/chat";

import { createChatApprovalActions } from "./approval-actions";

Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/approval-actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Builds the `ApprovalActions` port `ChatWorkspace` (`@corbits/chat-ui`)
// Builds the `ApprovalActions` port `ChatWorkspace` (`@/chat`)
// calls for its in-chat approve card. Reuses the exact reads and writes
// every other approval surface uses -- `getApprovalDetail` in
// `pending-approvals.ts`, `approveApproval`/`rejectApproval` in `api.ts` --
Expand All @@ -8,9 +8,9 @@
// run here.

import type { QueryClient } from "@tanstack/react-query";
import type { ApprovalActions, ApprovalDecisionResult } from "@corbits/chat-ui";
import { CHAT_STRINGS } from "@corbits/chat-ui";
import { ApiQueryError } from "@corbits/api-query";
import type { ApprovalActions, ApprovalDecisionResult } from "@/chat";
import { CHAT_STRINGS } from "@/chat";
import { ApiQueryError } from "@/lib/api-query";

import { approveApproval, rejectApproval } from "./api";
import type { Approval } from "./api";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/bench-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// bench (the chat page, the benches page, the header switcher) reads this
// context instead of re-deriving "membership[0]" on its own.

import { isRawIdentifier } from "@corbits/bench-ui";
import { isRawIdentifier } from "@/bench";
import { useQueryClient } from "@tanstack/react-query";
import { createContext, useContext, useEffect, useMemo, useState } from "react";
import type { ReactNode } from "react";

import type { APIQuery } from "@corbits/api-query";
import type { APIQuery } from "@/lib/api-query";

import { PrincipalsSchema, useAPIQuery } from "./api";
import type { Principal, PrincipalsPage } from "./api";
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/web/src/chat-artifact-open.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
isTextDecodableMediaType,
resolveArtifactRendererKind,
resolveRendererKindFromMediaType,
} from "@corbits/artifact-ui";
} from "@/library";
import { artifactPreviewPath, type ArtifactDetail } from "./api";
import type { CanvasArtifactContent } from "./shell/canvas-availability";

Expand Down
14 changes: 10 additions & 4 deletions packages/chat-ui/src/api.ts → apps/web/src/chat/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import type { ArkErrors } from "arktype";
import { Part } from "./wire/parts";
import { parseParticipants } from "./wire/participants";
import type { ParticipantRecord } from "./wire/participants";
import { UnauthenticatedError } from "@corbits/api-query";
import { InferenceSettingsApiError } from "@corbits/inference-settings";
import { UnauthenticatedError } from "@/lib/api-query";
import { InferenceSettingsApiError } from "@/settings/inference";
import { CHAT_STRINGS } from "./strings";

export {
Expand Down Expand Up @@ -62,7 +62,7 @@ const WorkbenchWire = type({
"preview?": "string",
// `GET /workbenches` sets this server-side (see
// `packages/chat/src/routes.ts`) only for a workbench projected into
// this tenant via shared-workbench machinery: "shared via
// this tenant via the shared-workbench machinery: "shared via
// parent · <parent name>" for true siblings, "shared · <owning tenant
// name>" otherwise. Absent for every ordinary, non-projected workbench.
"sharedLabel?": "string",
Expand Down Expand Up @@ -421,7 +421,7 @@ export function fetchWorkbenchBlob(
}

// The wire response of `@corbits/mailbox`'s `POST /me/inbox/send`
//: the Sent-folder copy's own RFC 5322 `Message-ID` and its
// The Sent-folder copy's own RFC 5322 `Message-ID` and its
// mailbox uid, the same uid `mailbox-timeline.ts`'s `threadTreeToTimeline`
// keys every timeline row by.
const SentInboxMessage = type({
Expand Down Expand Up @@ -899,6 +899,12 @@ export function patchWorkbenchSettings(
);
}

// Hub-zero T3: the room card's live state read and
// start-reviewing write lived here, backed by the hub's now-deleted
// workbench-scoped GitHub mount. GitHub connect/disconnect
// itself stays native `connections/*` (`@/settings`); the card's
// state/start rebind is a connections follow-up.

// `GET`/`PATCH /bench/settings` (see `packages/chat/src/routes.ts`): the
// bench-wide chat defaults every workbench inherits unless it sets its own
// override. Currently just the default context window.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// ever renders when `artifactId` is present, since a blob-only part has no
// Library row to deep-link to.

import { FileText, FolderOpen } from "@corbits/icons";
import { FileText, FolderOpen } from "@/lib/icons";

import type { Part } from "./api";
import { CHAT_STRINGS } from "./strings";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// The in-chat approve card's one seam to the platform approval it
// references. `@corbits/chat-ui` owns no session and no query cache, so it
// references. `@/chat` owns no session and no query cache, so it
// never fetches or mutates approvals itself -- the host (the same app that
// already resolves `tenantId` for `ChatWorkspace`) supplies this port,
// mirroring how `onOpenArtifact`/`onOpenProfile` thread host callbacks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { useState } from "react";
import { Button, Input } from "@corbits/react-ui";
import { Check } from "@corbits/icons";
import { Check } from "@/lib/icons";

import { CHAT_STRINGS } from "../strings";
import type { ConnectAffordance, ConnectServiceResult } from "./connect-service-actions";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import { isAgentAddress } from "./wire/mentions";
import { Button, EmptyState, toast } from "@corbits/react-ui";
import { reportError } from "@corbits/error-sink";
import { getResolvedCatalog } from "@corbits/inference-settings";
import { CaretDown, ChatCircle, SlidersHorizontal, WarningCircle } from "@corbits/icons";
import { getResolvedCatalog } from "@/settings/inference";
import { CaretDown, ChatCircle, SlidersHorizontal, WarningCircle } from "@/lib/icons";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import type { ReactNode } from "react";
Expand Down Expand Up @@ -553,7 +553,7 @@ function ChatWorkspaceInner({
* back to no action at all (never "Try again" for a session that's gone). */
readonly onSignIn?: () => void;
/** Whether this tenant can actually run inference right now — the
* host's read of `hasUsableModel` (`@corbits/inference-settings`)
* host's read of `hasUsableModel` (`@/settings/inference`)
* against its resolved catalog, never mere `model_provider` row
* presence. `undefined` while that read is still in flight:
* the banner stays hidden rather than flashing "no model" before the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// does not compose with an inline mention popover.

import { Button } from "@corbits/react-ui";
import { ArrowUp, CircleNotch, Microphone, Paperclip, Stop, X } from "@corbits/icons";
import { ArrowUp, CircleNotch, Microphone, Paperclip, Stop, X } from "@/lib/icons";
import { reportError } from "@corbits/error-sink";
import {
forwardRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test";
import type { ModelInfo } from "@corbits/inference-settings";
import type { ModelInfo } from "@/settings/inference";

import { failedTurnModelChoices, failedTurnToolCapableModelChoices } from "./failed-turn-models";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { chatCapableModels, providerDisplayName } from "@corbits/inference-settings";
import type { ModelInfo } from "@corbits/inference-settings";
import { chatCapableModels, providerDisplayName } from "@/settings/inference";
import type { ModelInfo } from "@/settings/inference";

import { CHAT_STRINGS } from "./strings";

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// may still want to leave a note), but this banner says so before they
// invest a long message in a reply that was never coming, and leads
// straight into the connect flow that already works
// (`@corbits/settings-ui`'s `ConnectionsSection`).
// (`@/settings`'s `ConnectionsSection`).
import { Button } from "@corbits/react-ui";
import { WarningCircle } from "@corbits/icons";
import { WarningCircle } from "@/lib/icons";
import { CHAT_STRINGS } from "./strings";

export function NoUsableModelBanner({ onConnectModel }: { readonly onConnectModel: () => void }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// quotes a `reportError` ref id, and offers Retry — never a silent
// `.catch(() => undefined)`.
import { Button } from "@corbits/react-ui";
import { WarningCircle } from "@corbits/icons";
import { WarningCircle } from "@/lib/icons";
import { CHAT_STRINGS } from "./strings";

export function ResumeFailedBanner({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading