Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
46 changes: 23 additions & 23 deletions frontend/src/views/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,26 @@ import { fromDto, newMember, type TeamMember } from "@/lib/team";
import { personAvatar } from "@/lib/person";
import { useAskerNames } from "@/components/approval-card";
import { useRoomRailSlot } from "@/components/room-rail";
import { AddMemberDialog, type NewMemberFields } from "./chat/AddMemberDialog";
import { ChannelCreateDialog } from "./chat/ChannelCreateDialog";
import { ChannelRail } from "./chat/ChannelRail";
import { ChatHeader } from "./chat/ChatHeader";
import { MembersPane } from "./chat/MembersPane";
import { TypingLine } from "./chat/TypingLine";
import { InflightRunBar } from "./chat/InflightRunBar";
import { MessageComposer } from "./chat/MessageComposer";
import { AddMemberDialog, type NewMemberFields } from "./room/AddMemberDialog";
import { ChannelCreateDialog } from "./room/ChannelCreateDialog";
import { ChannelRail } from "./room/ChannelRail";
import { ChatHeader } from "./room/ChatHeader";
import { MembersPane } from "./room/MembersPane";
import { TypingLine } from "./room/TypingLine";
import { InflightRunBar } from "./room/InflightRunBar";
import { MessageComposer } from "./room/MessageComposer";
import {
mentionablesFor,
sameTarget,
mentionsOutsideChannel,
utf8ByteLength,
type Mention,
type Mentionable,
} from "./chat/mentions";
import { echoCause } from "./chat/EchoPlaceholder";
import { MessageTimeline } from "./chat/MessageTimeline";
import type { ChatReceipt } from "./chat/ChatLiveReceipt";
import { ThreadPanel } from "./chat/ThreadPanel";
} from "./room/mentions";
import { echoCause } from "./room/EchoPlaceholder";
import { MessageTimeline } from "./room/MessageTimeline";
import type { ChatReceipt } from "./room/ChatLiveReceipt";
import { ThreadPanel } from "./room/ThreadPanel";
import { useLocalScope } from "@/connections/ConnectionContext";
import {
buildChannels,
Expand Down Expand Up @@ -164,7 +164,7 @@ interface Props {
* teammate here and staying in chat would leave them half-written with
* nothing pointing at where to finish them.
*
* Optional, so `ChatView` still mounts standalone in tests — but a mount
* Optional, so `RoomView` still mounts standalone in tests — but a mount
* without it turns the reduced dialog's create into a dead end, so the shell
* always passes it.
*/
Expand All @@ -175,7 +175,7 @@ interface Props {
* Every channel's transcript, keyed by channel id, and its setter — owned by
* `AppShell` rather than here so a transcript survives this component
* unmounting when the operator navigates to another view and back (the shell
* mounts and unmounts `ChatView` per route; component-local state would be
* mounts and unmounts `RoomView` per route; component-local state would be
* discarded on every trip away from Chat).
*/
transcripts: Transcripts;
Expand Down Expand Up @@ -453,7 +453,7 @@ function threadRootOf(parentId: string | undefined): number | undefined {
return Number.isFinite(n) ? n : undefined;
}

export function ChatView({
export function RoomView({
client,
company,
sub,
Expand Down Expand Up @@ -661,7 +661,7 @@ export function ChatView({
* admin, or this operator in a second window, can configure inference and
* rebuild the runtime while this chat sits open (codex, PR #1740). The
* operator's *own* trip to Connections → Inference already re-reads — the shell
* mounts and unmounts `ChatView` per route, so coming back remounts it — but
* mounts and unmounts `RoomView` per route, so coming back remounts it — but
* nothing covered the cross-session case, and a standing banner insisting
* that a company which now thinks perfectly well cannot is the same class of
* wrong claim as the one this surface exists to remove.
Expand Down Expand Up @@ -694,7 +694,7 @@ export function ChatView({
// An older host, or one that could not answer. Nothing is claimed
// either way, and chat renders exactly as it did before the banner
// existed.
console.debug("[ChatView] cognition state unavailable", e);
console.debug("[RoomView] cognition state unavailable", e);
if (isCurrent()) setLoadedCognition({ client, company, state: null });
}
};
Expand Down Expand Up @@ -896,7 +896,7 @@ export function ChatView({
//
// A plain revisit is the other caller, and it must not blank anything.
// `roomVisits` re-runs this every time an operator returns to Room, and
// `setDesks(null)` sent `ChatView` down its `if (!desks)` branch — which
// `setDesks(null)` sent `RoomView` down its `if (!desks)` branch — which
// renders a loading pane and, crucially, no rail. The rail is portalled
// into the app sidebar, so a refetch of data the operator already had tore
// the channel list out of the sidebar and put it back a frame later,
Expand Down Expand Up @@ -966,7 +966,7 @@ export function ChatView({
if (isOperatorChannelDto(dto)) {
setOperator(dto);
} else if (dto !== null) {
console.debug("[ChatView] getOperatorChannel returned an unexpected shape", dto);
console.debug("[RoomView] getOperatorChannel returned an unexpected shape", dto);
}
});
}, [client, company, roomVisits]);
Expand Down Expand Up @@ -1424,9 +1424,9 @@ export function ChatView({
// like `workflowRunEvents`/`openTurns`/`budgetProximity` above — host
// message ids (`h<seq>`) are a per-company sequence, so a marker id cached
// under company A's message id must not answer for company B's
// identically-numbered one. `ChatView` is not remounted on a company
// identically-numbered one. `RoomView` is not remounted on a company
// switch, so nothing else clears this map: `transcripts` resetting (in
// `AppShell`) does not reach a `ChatView`-local `useState`.
// `AppShell`) does not reach a `RoomView`-local `useState`.
useEffect(() => {
setBudgetPauseMarkerByNotice((prev) => (prev.size === 0 ? prev : new Map()));
}, [client, company]);
Expand Down Expand Up @@ -1815,7 +1815,7 @@ export function ChatView({
* the panel is showing.
*
* They used to be one lookup on the channel id, which could not tell the two
* apart — so `ChatView` suppressed the channel's indicator whenever any
* apart — so `RoomView` suppressed the channel's indicator whenever any
* thread was open, and a turn the host was actively running showed nowhere at
* all. The shell now keys them per thread (`turnStateKey`), which is what
* makes this split expressible.
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/TeamView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { fromDto, newMember, roleSubtitle, type TeamMember } from "@/lib/team";
import { workloadByAssignee, type Workload } from "@/lib/team-workload";
import { cn } from "@/lib/utils";
import { AgentDetailView } from "@/views/team/AgentDetailView";
import { AddMemberDialog, type NewMemberFields } from "@/views/chat/AddMemberDialog";
import { AddMemberDialog, type NewMemberFields } from "@/views/room/AddMemberDialog";

interface Props {
client: OpenCompanyClient;
Expand Down
20 changes: 10 additions & 10 deletions frontend/test/unit/chat-readonly-composer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { OpenCompanyClient } from "@/api/client";
import { ConnectionScopeProvider } from "@/connections/ConnectionContext";
import { isGeneralChannel } from "@/lib/chat";
import { TOUR } from "@/tour/steps";
import { ChatView } from "@/views/ChatView";
import { RoomView } from "@/views/RoomView";

/**
* The channel composer answers a read-only channel by not existing, and the
Expand All @@ -28,12 +28,12 @@ import { ChatView } from "@/views/ChatView";
* from the Send that provokes one.
*
* A grep cannot tell a rendered control from a removed one, so this mounts the
* real `ChatView` against a stub client and asks the DOM.
* real `RoomView` against a stub client and asks the DOM.
*
* # The writable half is not optional
*
* Every read-only assertion here is an assertion of absence, and absence is
* also what a `ChatView` that failed to mount produces. The writable cases
* also what a `RoomView` that failed to mount produces. The writable cases
* pin the same queries finding everything, off the same fixture — so a
* mount that silently renders nothing fails rather than passing twice.
*/
Expand Down Expand Up @@ -97,7 +97,7 @@ afterEach(() => {
*
* Every other test here passes no `inflightRuns` at all, which is why the
* sibling-order tests below could once claim the banner and the composer are
* adjacent: `ChatView` gates `InflightRunBar` on the prop being defined, so a
* adjacent: `RoomView` gates `InflightRunBar` on the prop being defined, so a
* harness that omits it never renders the row that actually sits between them
* (codex and CodeRabbit, both on PR #2159).
*/
Expand All @@ -117,7 +117,7 @@ function tree(
typing: string[] = [],
inflight = false,
): ReactNode {
const view = createElement(ChatView, {
const view = createElement(RoomView, {
client,
company: "acme",
sub,
Expand Down Expand Up @@ -147,7 +147,7 @@ function tree(
* Render (or re-render) this root at `sub`, then let the reads settle.
*
* Re-rendering the same root with the same client is how the draft test walks
* between channels: React reconciles `ChatView` in place, which is exactly the
* between channels: React reconciles `RoomView` in place, which is exactly the
* production path an operator takes when they click another channel in the
* rail. Remounting instead would discard the composer's state for reasons that
* have nothing to do with the behaviour under test, and the test would pass
Expand Down Expand Up @@ -237,7 +237,7 @@ describe("a read-only channel renders no composer", () => {
await mount("operator");

// "Give the team a brief" prefills a composer this channel does not
// render; "Add people" opens a members pane `ChatView` gates off on the
// render; "Add people" opens a members pane `RoomView` gates off on the
// same flag. Both were dead controls under the notice.
expect(container.textContent).not.toContain("Give the team a brief");
expect(container.textContent).not.toContain("Add people");
Expand Down Expand Up @@ -410,7 +410,7 @@ describe("the harness-unavailable notice sits next to the composer, or without o
*
* This is the regression the read-only change nearly shipped (codex review on
* PR #1984). `MessageComposer` holds the draft, the staged attachment, the
* mentions and the intent in its own `useState`, and `ChatView` renders one
* mentions and the intent in its own `useState`, and `RoomView` renders one
* instance for every channel — so React reconciling it in place is the only
* reason a draft has ever survived walking to another channel and back.
* Gating the element on `!readOnly` unmounted it, and the operator came back
Expand Down Expand Up @@ -507,7 +507,7 @@ describe("a General address resolves to whichever channel holds the line", () =>
* Two of the eight stops spotlight `[data-tour="chat-composer"]`, and one of
* them is the closing "You're all set". A stop that names only `view: "chat"`
* inherits whichever channel was last open there — `app-shell`'s remembered
* sub-segment, or `ChatView`'s remembered channel on a cold start — which can
* sub-segment, or `RoomView`'s remembered channel on a cold start — which can
* be the read-only Operator feed. Since PR #1984 that feed renders no composer,
* so the anchor never mounts, `waitForTarget` times out, and the stop is
* **skipped in silence**: a missing anchor degrades rather than errors, so the
Expand All @@ -527,7 +527,7 @@ describe("the tour's composer stops address a writable channel", () => {
expect(stop.view).toBe("chat");
expect(stop.sub).toBeTruthy();
// A General spelling: the company-wide line exists in every company and
// is writable in all of them, and `ChatView` folds every spelling of it
// is writable in all of them, and `RoomView` folds every spelling of it
// onto whichever channel actually holds the line.
expect(isGeneralChannel(stop.sub!)).toBe(true);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/test/unit/referral-crossing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, describe, expect, it } from "vitest";

import type { ReferralConversationDto } from "@/api/types";
import { ReferralChip, ReferralConversation } from "@/views/chat/StepTimeline";
import { ReferralChip, ReferralConversation } from "@/views/room/StepTimeline";

/**
* **What a crossing looks like to the operator reading it.**
Expand Down
4 changes: 2 additions & 2 deletions src/company/workflow_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5023,7 +5023,7 @@ to = "done"
assert!(
problems[0]
.message
.contains("is not a workflow delivery channel"),
.contains("is not an automation delivery channel"),
"{:?}",
problems[0]
);
Expand Down Expand Up @@ -5168,7 +5168,7 @@ to = "done"
.expect_err("the courtesy pass must refuse what apply would refuse");
assert!(
err.to_string()
.contains("is not a workflow delivery channel"),
.contains("is not an automation delivery channel"),
"{err}"
);

Expand Down
2 changes: 1 addition & 1 deletion src/harness/built_in/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10962,7 +10962,7 @@ name = "Morning"
kind: "channel".into(),
target: Some("operator".into()),
status: crate::ports::DeliveryStatus::Failed,
detail: "`operator` is not a workflow delivery channel — this runtime has: engineering"
detail: "`operator` is not an automation delivery channel — this runtime has: engineering"
.into(),
reason: crate::ports::DeliveryReason::ChannelNotWired,
}],
Expand Down
2 changes: 1 addition & 1 deletion src/harness/built_in/workflow_build/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ async fn a_proposal_naming_an_unwired_channel_settles_to_todo() {
);
let note = after.note.unwrap_or_default();
assert!(
note.contains("is not a workflow delivery channel"),
note.contains("is not an automation delivery channel"),
"the destination problem is named on the card: {note}"
);
assert!(
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub fn undeliverable_channel_message(target: &str, deliverable: &[&str]) -> Stri
} else {
deliverable.join(", ")
};
format!("`{target}` is not a workflow delivery channel — this runtime has: {has}")
format!("`{target}` is not an automation delivery channel — this runtime has: {has}")
}

/// A desk-backed [`ChannelAdapter`]. Sending appends an agent reply to the
Expand Down Expand Up @@ -389,7 +389,7 @@ mod test {
#[test]
fn the_refusal_sentence_names_the_live_set() {
let message = undeliverable_channel_message("operator", &["engineering", "product"]);
assert!(message.contains("`operator` is not a workflow delivery channel"));
assert!(message.contains("`operator` is not an automation delivery channel"));
assert!(message.ends_with("this runtime has: engineering, product"));

let empty = undeliverable_channel_message("engineering", &[]);
Expand All @@ -412,7 +412,7 @@ mod test {
env!("CARGO_MANIFEST_DIR"),
"/frontend/src/views/WorkflowCreateDialog.tsx"
));
const TAIL: &str = "is not a workflow delivery channel — this runtime has:";
const TAIL: &str = "is not an automation delivery channel — this runtime has:";

assert!(undeliverable_channel_message("operator", &["engineering"]).contains(TAIL));
assert!(
Expand Down
1 change: 1 addition & 0 deletions src/server/graphql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ mod bridge_scope_test {
overlay_agents: Vec::new(),
overlay_desk_members: Vec::new(),
overlay_desk_order: Vec::new(),
overlay_desk_hive: Vec::new(),
overlay_desks: Vec::new(),
overlay_workflows: Vec::new(),
overlay_budgets: Vec::new(),
Expand Down
10 changes: 5 additions & 5 deletions src/server/ops/workflows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5895,7 +5895,7 @@ mod tests {
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
let message = json_body(response).await.to_string();
assert!(
message.contains("is not a workflow delivery channel"),
message.contains("is not an automation delivery channel"),
"{message}"
);
assert!(message.contains("engineering"), "{message}");
Expand Down Expand Up @@ -5930,7 +5930,7 @@ mod tests {
body["problems"][0]["message"]
.as_str()
.unwrap_or_default()
.contains("is not a workflow delivery channel"),
.contains("is not an automation delivery channel"),
"{body}"
);
}
Expand Down Expand Up @@ -6015,7 +6015,7 @@ mod tests {
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
let message = json_body(response).await.to_string();
assert!(
message.contains("is not a workflow delivery channel"),
message.contains("is not an automation delivery channel"),
"{message}"
);
}
Expand All @@ -6042,7 +6042,7 @@ mod tests {
assert_eq!(response.status(), StatusCode::BAD_REQUEST);
let message = json_body(response).await.to_string();
assert!(
message.contains("is not a workflow delivery channel"),
message.contains("is not an automation delivery channel"),
"{message}"
);
assert!(message.contains("operator"), "{message}");
Expand Down Expand Up @@ -11530,7 +11530,7 @@ label = "ok"
kind: "channel".to_string(),
target: Some("operator".to_string()),
status: crate::ports::DeliveryStatus::Failed,
detail: "`operator` is not a workflow delivery channel".to_string(),
detail: "`operator` is not an automation delivery channel".to_string(),
reason: crate::ports::DeliveryReason::ChannelNotWired,
}],
cancelled: false,
Expand Down
2 changes: 1 addition & 1 deletion src/server/ops/write_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8031,7 +8031,7 @@ async fn applying_a_proposal_with_an_unwired_channel_is_refused_and_keeps_the_ca
problem["message"]
.as_str()
.unwrap_or_default()
.contains("is not a workflow delivery channel"),
.contains("is not an automation delivery channel"),
"{body}"
);

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/delivery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3513,7 +3513,7 @@ mode = "full"
assert!(
reports[0]
.detail
.contains("is not a workflow delivery channel"),
.contains("is not an automation delivery channel"),
"{reports:?}"
);
assert!(reports[0].detail.contains(OPERATOR_CHANNEL), "{reports:?}");
Expand Down
2 changes: 1 addition & 1 deletion vendor/openhuman
Submodule openhuman updated 37 files
+1 −1 Cargo.lock
+1 −1 Cargo.toml
+1 −1 app/package.json
+2 −2 app/src-tauri/Cargo.lock
+1 −1 app/src-tauri/Cargo.toml
+1 −1 app/src-tauri/tauri.conf.json
+12 −0 app/src/components/assistant-ui/thread.tsx
+21 −2 app/src/components/layout/shell/AppSidebar.test.tsx
+18 −5 app/src/components/layout/shell/AppSidebar.tsx
+15 −0 app/src/components/layout/shell/SidebarHeader.test.tsx
+13 −1 app/src/components/layout/shell/SidebarHeader.tsx
+15 −0 app/src/components/layout/shell/WindowDragBar.test.tsx
+6 −0 app/src/components/layout/shell/WindowDragBar.tsx
+147 −0 app/src/components/settings/panels/ai/CustomRoutingDialog.test.tsx
+24 −12 app/src/components/settings/panels/ai/CustomRoutingDialog.tsx
+20 −4 app/src/features/conversations/Conversations.tsx
+21 −10 app/src/features/conversations/components/AssistantUiChat.tsx
+101 −0 app/src/features/conversations/components/aui/TurnFooter.test.tsx
+83 −0 app/src/features/conversations/components/aui/TurnFooter.tsx
+46 −0 app/src/features/conversations/components/aui/turnFooterHost.tsx
+137 −24 app/src/providers/__tests__/assistantUiMessages.test.ts
+121 −28 app/src/providers/assistantUiMessages.ts
+13 −0 app/src/utils/__tests__/toolTimelineFormatting.test.ts
+6 −0 app/src/utils/toolTimelineFormatting.ts
+34 −0 src/openhuman/skills/ops_tests_part_01_tests.rs
+35 −0 src/openhuman/tools/impl/browser/image_info_tests.rs
+13 −2 src/openhuman/tools/impl/filesystem/edit_file.rs
+30 −0 src/openhuman/tools/impl/filesystem/edit_file_tests.rs
+23 −0 src/openhuman/tools/impl/filesystem/file_read_tests.rs
+20 −1 src/openhuman/tools/impl/filesystem/file_write.rs
+49 −0 src/openhuman/tools/impl/filesystem/file_write_tests.rs
+40 −0 src/openhuman/tools/impl/filesystem/grep_tests.rs
+23 −0 src/openhuman/tools/impl/filesystem/list_files_tests.rs
+1 −0 src/openhuman/tools/impl/filesystem/mod.rs
+57 −0 src/openhuman/tools/impl/filesystem/write_sink.rs
+29 −0 src/openhuman/tools/impl/network/curl_tests.rs
+30 −0 src/openhuman/tools/impl/network/url_guard_tests.rs
2 changes: 1 addition & 1 deletion vendor/tinyhivemind
Submodule tinyhivemind updated 229 files
Loading