feat(chat): work-status panel, and MCP auth and settings fixes (#2776)

Adds a work-status panel beside the transcript. Context fill, model and
cost, todos, running subagents and the permission requests blocking
them, branch and working-tree state, MCP servers, pinned messages and
context sources were scattered across the header, the composer and the
context panel — a blocked subagent was reported nowhere at all. The
panel reads them from live channels rather than persisted history, and
becomes an overlay where the chat is too narrow to seat a column.

It is on by default, including for existing installs. Because it now
carries these readouts, the desktop header and composer drop the ones it
duplicates: todo and changed-files chips, usage and MCP tabs. VS Code
and mobile keep theirs — neither hosts the panel.

Fixes MCP authorization, which was broken from the panel, invalidated by
a directory switch through a redirect URI that encoded the working
directory, and left the desktop app in the background because browsers
will not follow a custom-protocol link without a user gesture. The
settings page no longer asks the user to understand the MCP spec before
adding a server: one field takes the command or the link, with the kind
inferred and a visible override, and client-registration fields appear
only when a server actually asks for its own credentials.

Also: skills load from the panel instead of only when the composer's
slash autocomplete opens; the header button names the current instance
rather than falling through to the word "Instance" for relay hosts.

Three new optional UI settings keys, all migrated. No change to stored
MCP server configuration.
This commit is contained in:
Bohdan Triapitsyn
2026-08-09 19:30:25 +03:00
parent 493a618efc
commit f4743ea060
69 changed files with 5777 additions and 894 deletions
+16 -1
View File
@@ -14,6 +14,7 @@ import { noteDeferredRestartFromPayload } from "@/lib/opencode/deferredRestart";
import { useProjectsStore } from "@/stores/useProjectsStore";
import { opencodeClient } from '@/lib/opencode/client';
import { filterSkillsByRuntimeFlags } from './skillVisibility';
// Prefer the active project path so Settings/Skills discovery matches the
// project selector (and Commands/Agents). Falling back only to the session
@@ -291,7 +292,21 @@ export const useSkillsStore = create<SkillsStore>()(
renamable: s.renamable === true,
}));
set({ skills: configSkills, isLoading: false });
// OpenCode loads a narrower set than this scan finds, and the
// rules live in server-side env flags the browser cannot read.
// The route reports them; `filterSkillsByRuntimeFlags` mirrors
// OpenCode's discovery, including the `.agents`-wins dedup that
// matters when `.claude/skills` are symlinks back into it.
//
// Deliberately not OpenCode's own skill endpoint: measured
// against 1.18.14 it lists only global and builtin skills and
// omits the project skills the agent actually has.
const visibleSkills = filterSkillsByRuntimeFlags(
configSkills,
data.externalSkills ?? null,
);
set({ skills: visibleSkills, isLoading: false });
skillsLastLoadedAt.set(cacheKey, Date.now());
return true;
} catch (error) {