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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/src/components/banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function NoticeCard({
onClick={onDismiss}
className="-mr-1 grid size-5 shrink-0 place-items-center rounded-md text-ink-muted transition-[transform,background-color,color] duration-150 ease-out hover:bg-ink/10 hover:text-ink active:scale-95"
>
<XIcon className="size-3" weight="bold" aria-hidden />
<XIcon className="size-3.5" aria-hidden />
</button>
)}
</div>
Expand Down Expand Up @@ -140,7 +140,7 @@ export function NoticeLine({
onClick={onDismiss}
className="grid size-5 shrink-0 place-items-center rounded-md text-ink-muted transition-[transform,background-color,color,opacity] duration-150 ease-out hover:bg-ink/10 hover:text-ink focus-visible:opacity-100 active:scale-95 pointer-fine:opacity-0 pointer-fine:group-hover:opacity-100"
>
<XIcon className="size-3" weight="bold" aria-hidden />
<XIcon className="size-3.5" aria-hidden />
</button>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function Models({ hostDir, value, onChange }: ModelPickerProps) {
const failed = AsyncResult.isFailure(result);
const label = failed ? "Unavailable" : none ? "No Models" : (found?.model.name ?? current?.id ?? "Choose model");
const empty =
list === undefined ? "Loading models…" : providers.length === 0 ? "No provider is signed in." : "No models found";
list === undefined ? "Loading Models…" : providers.length === 0 ? "No Provider Is Signed In" : "No Models Found";

return (
<Popover
Expand Down
41 changes: 29 additions & 12 deletions apps/web/src/landing/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
NotePencilIcon,
PlusIcon,
SquaresFourIcon,
XIcon,
} from "@phosphor-icons/react";
import { useAtom, useAtomValue } from "@effect/atom-react";
import { Link, useNavigate, useParams } from "@tanstack/react-router";
Expand Down Expand Up @@ -50,9 +51,9 @@ import { type Entry, GROUPS, type Group, groupLabel, groupsOf, ORDERS, useDispla
* Recent sessions across every project, newest first, beside every page. With none yet it invites
* adding a project: the folder the start page's composer then works in.
*/
/** A sidebar action: New, Threads, Settings. */
/** A sidebar action: New, Threads, Settings. Each sets its own colour: New, the primary action, is full ink. */
const NAV_ROW =
"flex h-7 w-full items-center gap-2 rounded-md px-2 text-left text-ui text-ink-muted outline-none hover:bg-selection-subtle hover:text-ink active:scale-[0.99] focus-visible:ring-2 focus-visible:ring-ring";
"flex h-7 w-full items-center gap-2 rounded-md px-2 text-left text-ui outline-none hover:bg-selection-subtle hover:text-ink active:scale-[0.99] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset";

const collapsedKey = "codework.sidebar.collapsed";
const decodeCollapsed = Schema.decodeUnknownOption(Schema.fromJsonString(Schema.Array(Schema.String)));
Expand All @@ -70,6 +71,7 @@ export function SessionsSidebar() {
const result = useAtomValue(projectsAtom);
const problem = useAtomValue(problemAtom);
const [query, setQuery] = useState("");
const search = useRef<HTMLInputElement>(null);
const openElsewhere = useOpenElsewhere();
const [place, setPlace] = useAtom(placeAtom);
const addProject = useAddProject();
Expand Down Expand Up @@ -138,9 +140,9 @@ export function SessionsSidebar() {

return (
<Sidebar collapsible="offcanvas" className="shell-sidebar select-none">
<SidebarHeader className="gap-0.5 px-2 pt-2 pb-2">
<button type="button" onClick={startNew} className={NAV_ROW}>
<NotePencilIcon size={15} className="shrink-0 text-ink-muted" aria-hidden />
<SidebarHeader className="gap-1 px-2 pt-2 pb-3">
<button type="button" onClick={startNew} className={`${NAV_ROW} text-ink`}>
<NotePencilIcon size={15} className="shrink-0" aria-hidden />
<span>New</span>
</button>
<div className="relative">
Expand All @@ -150,6 +152,7 @@ export function SessionsSidebar() {
aria-hidden
/>
<SidebarInput
ref={search}
type="search"
placeholder="Search"
aria-label="Search threads"
Expand All @@ -161,12 +164,26 @@ export function SessionsSidebar() {
setQuery("");
}
}}
className="h-7 rounded-md border-0 bg-transparent pr-2 pl-[30px] text-ui shadow-none dark:bg-transparent placeholder:text-ink-muted hover:bg-selection-subtle focus-visible:bg-selection-subtle focus-visible:ring-2 focus-visible:ring-ring"
className="h-7 rounded-md border-0 bg-transparent pr-7 pl-[30px] text-ui shadow-none dark:bg-transparent placeholder:text-ink-muted not-placeholder-shown:bg-selection-subtle hover:bg-selection-subtle focus-visible:bg-selection-subtle focus-visible:ring-1 focus-visible:ring-edge focus-visible:ring-inset [&::-webkit-search-cancel-button]:appearance-none"
/>
{query !== "" && (
<button
type="button"
aria-label="Clear search"
title="Clear search (Esc)"
onClick={() => {
setQuery("");
search.current?.focus();
}}
className="absolute top-1/2 right-1 grid size-5 -translate-y-1/2 place-items-center rounded-md text-ink-muted outline-none hover:bg-ink/8 hover:text-ink focus-visible:ring-2 focus-visible:ring-ring"
>
<XIcon className="size-3.5" aria-hidden />
</button>
)}
</div>
<Link
to="/threads"
className={`${NAV_ROW} aria-[current=page]:bg-selection-current aria-[current=page]:font-medium aria-[current=page]:text-ink`}
className={`${NAV_ROW} text-ink-muted aria-[current=page]:bg-selection-current aria-[current=page]:text-ink aria-[current=page]:[&>svg]:text-ink`}
>
<ChatsIcon size={15} className="shrink-0 text-ink-muted" aria-hidden />
<span>Threads</span>
Expand All @@ -179,15 +196,15 @@ export function SessionsSidebar() {
className="w-full font-normal text-ink-muted hover:bg-ink/5 hover:text-ink focus-visible:bg-ink/5"
/>
) : AsyncResult.isFailure(result) ? (
<p className="px-2 py-2 text-xs text-ink-muted">Could not load sessions.</p>
<p className="px-2 py-2 text-xs text-ink-muted">Could Not Load Sessions</p>
) : AsyncResult.isSuccess(result) && groups.length === 0 ? (
needle !== "" ? (
<p className="px-2 py-2 text-xs text-ink-muted">No threads match “{query}”.</p>
<p className="px-2 py-2 text-xs text-ink-muted">No Threads Match “{query}”</p>
) : (
<Empty>
{place.kind === "none" && result.value.length === 0 ? (
<>
<span>No projects yet</span>
<span>No Projects Yet</span>
<EmptyAction
icon={<PlusIcon size={12} weight="bold" className="-mx-0.5 size-3" aria-hidden />}
onClick={addProject}
Expand All @@ -196,7 +213,7 @@ export function SessionsSidebar() {
</EmptyAction>
</>
) : (
<span>No threads yet</span>
<span>No Threads Yet</span>
)}
</Empty>
)
Expand Down Expand Up @@ -239,7 +256,7 @@ export function SessionsSidebar() {
)}
</SidebarContent>
<SidebarFooter className="p-2">
<Link to="/settings/workspaces" className={NAV_ROW}>
<Link to="/settings/workspaces" className={`${NAV_ROW} text-ink-muted`}>
<GearSixIcon size={15} className="shrink-0 text-ink-muted" aria-hidden />
<span>Settings</span>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/projects/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export function Projects() {
return null;
};

if (AsyncResult.isFailure(projects)) return <p className="p-3 text-ink-muted">Could not load projects.</p>;
if (AsyncResult.isFailure(projects)) return <p className="p-3 text-ink-muted">Could Not Load Projects</p>;
const count = AsyncResult.isSuccess(projects) ? projects.value.length : 0;
return (
<div className="flex h-full flex-col">
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ export function SettingsSidebar() {
</SidebarMenu>
</SidebarGroup>
))}
{matches.length === 0 && (
<p className="px-2 py-2 text-xs text-ink-muted">No settings match “{query}”.</p>
)}
{matches.length === 0 && <p className="px-2 py-2 text-xs text-ink-muted">No Settings Match “{query}”</p>}
</nav>
</SidebarContent>
<SidebarRail />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/settings/workspaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export function WorkspacesSettings() {
{listed.length === 0 && (
<div className="flex flex-col items-center gap-2 px-5 py-8 text-center">
<StackIcon className="mb-1 size-6 text-ink-muted" aria-hidden />
<p className="font-medium">No workspaces yet</p>
<p className="font-medium">No Workspaces Yet</p>
<p className="text-ink-muted">Create a workspace to organize your sessions.</p>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shell/palette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function Palette() {
<>
<CommandInput placeholder="Type a command or search…" />
<CommandList className={PALETTE_LIST}>
<CommandEmpty>No results.</CommandEmpty>
<CommandEmpty>No Results</CommandEmpty>
<CommandGroup heading="Navigation">
<CommandItem
value={GO_THREADS}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shell/sources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function Sources({ step, setQuery, push, pop, close }: Nav) {
pop={pop}
/>
<CommandList className={PALETTE_LIST}>
<CommandEmpty>No sources match.</CommandEmpty>
<CommandEmpty>No Sources Match</CommandEmpty>
<CommandGroup heading="Sources">
{pick !== undefined && bridge !== undefined && (
<Row
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shell/switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function Switcher({ workspaces, active }: SwitcherProps) {
onClick={() => void close(workspace, index)}
className="absolute top-1/2 right-1.5 grid size-5 -translate-y-1/2 place-items-center rounded-md text-ink-muted opacity-0 group-hover/tab:opacity-100 hover:bg-ink/8 hover:text-ink focus-visible:opacity-100"
>
<XIcon className="size-3" weight="bold" aria-hidden />
<XIcon className="size-3.5" aria-hidden />
</button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/widgets/threads/picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function Picker({
className="h-9 text-[13px]"
/>
<CommandList>
<CommandEmpty className="py-4 text-center text-xs text-ink-muted">No results.</CommandEmpty>
<CommandEmpty className="py-4 text-center text-xs text-ink-muted">No Results</CommandEmpty>
<CommandGroup heading={heading} className="[&_[cmdk-group-heading]]:text-2xs">
{options.map((option, index) => (
<CommandItem
Expand Down
12 changes: 6 additions & 6 deletions apps/web/src/widgets/threads/threads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function AllThreads({ instanceId }: WidgetProps<unknown>) {
onNewGroup={() => void newGroup()}
/>
{AsyncResult.isFailure(result) && board === undefined ? (
<p className="p-3 text-ink-muted">Could not load the threads.</p>
<p className="p-3 text-ink-muted">Could Not Load the Threads</p>
) : shown === undefined ? null : (
<List
board={shown}
Expand Down Expand Up @@ -316,7 +316,7 @@ function List({
)
return (
<p className="p-6 text-center text-xs text-ink-muted">
{filtering(options) ? "No threads match the filters." : "No threads yet."}
{filtering(options) ? "No Threads Match the Filters" : "No Threads Yet"}
</p>
);

Expand Down Expand Up @@ -463,7 +463,7 @@ function ThreadPicker({
return (
<Picker
{...common}
placeholder="Change status…"
placeholder="Change Status…"
digits
value={thread.status}
options={MANUAL_STATUSES.map((value) => ({
Expand All @@ -481,7 +481,7 @@ function ThreadPicker({
return (
<Picker
{...common}
placeholder="Change priority…"
placeholder="Change Priority…"
digits
value={String(thread.priority)}
options={PRIORITIES.map((value: Priority) => ({
Expand All @@ -496,7 +496,7 @@ function ThreadPicker({
return (
<Picker
{...common}
placeholder="Change color…"
placeholder="Change Color…"
digits
value={thread.color ?? ""}
options={[
Expand All @@ -512,7 +512,7 @@ function ThreadPicker({
return (
<Picker
{...common}
placeholder="Change or add group…"
placeholder="Change or Add Group…"
heading={groups.length > 0 ? "Groups" : undefined}
value={thread.groupingId ?? "none"}
options={[
Expand Down