Remove inbox top-level navigation (#120)

* add gated codex goals support

* sync README SDK versions

* bump claude agent sdk

* add codex goals settings toggle

* reuse status dashboard message and simplify settings actions

* refine settings page UX

* fix settings nav hash routing

* add dashboard UX verification

* refine dashboard settings and inbox UX

* remove inbox top-level navigation
This commit is contained in:
Eyejoker
2026-05-02 19:58:05 +09:00
committed by GitHub
parent d3c02265e5
commit 7e013b5314
8 changed files with 162 additions and 186 deletions

View File

@@ -2,7 +2,6 @@ import { useEffect, useState } from 'react';
import {
type CreateScheduledTaskInput,
type DashboardInboxAction,
type DashboardRoomActivity,
type DashboardTaskAction,
type DashboardOverview,
@@ -11,7 +10,6 @@ import {
type StatusSnapshot,
createScheduledTask,
fetchDashboardData,
runInboxAction,
runServiceAction,
runScheduledTaskAction,
sendRoomMessage,
@@ -33,7 +31,6 @@ import {
type DashboardView,
} from './DashboardNav';
import { formatDate, statusLabel } from './dashboardHelpers';
import { InboxPanel, type InboxActionKey, type InboxItem } from './InboxPanel';
import { RoomBoardV2 } from './RoomBoardV2';
import { ServicePanel, type ServiceActionKey } from './ServicePanel';
import { SettingsPanel } from './SettingsPanel';
@@ -68,7 +65,6 @@ function isDashboardView(
): value is DashboardView {
return (
value === 'usage' ||
value === 'inbox' ||
value === 'health' ||
value === 'rooms' ||
value === 'scheduled' ||
@@ -82,6 +78,13 @@ function readViewFromHash(): DashboardView {
return isDashboardView(raw) ? raw : DEFAULT_VIEW;
}
function normalizeDashboardHash(view: DashboardView): void {
if (typeof window === 'undefined') return;
const raw = window.location.hash.replace(/^#\/?/, '');
if (!raw || isDashboardView(raw)) return;
window.history.replaceState(null, '', `#/${view}`);
}
function readInitialLocale(): Locale {
const stored =
typeof window === 'undefined'
@@ -385,9 +388,6 @@ function App() {
const [taskActionKey, setTaskActionKey] = useState<TaskActionKey | null>(
null,
);
const [inboxActionKey, setInboxActionKey] = useState<InboxActionKey | null>(
null,
);
const [serviceActionKey, setServiceActionKey] =
useState<ServiceActionKey | null>(null);
const [roomMessageKey, setRoomMessageKey] = useState<string | null>(null);
@@ -490,33 +490,6 @@ function App() {
}
}
async function handleInboxAction(
item: InboxItem,
action: DashboardInboxAction,
) {
if (
action === 'decline' &&
typeof window !== 'undefined' &&
!window.confirm(t.inbox.actions.confirmDecline)
) {
return;
}
const actionKey: InboxActionKey = `${item.id}:${action}`;
setInboxActionKey(actionKey);
try {
await runInboxAction(item.id, action, {
lastOccurredAt: item.lastOccurredAt,
requestId: makeClientRequestId(),
});
await refresh(false);
} catch (err) {
setError(err instanceof Error ? err.message : String(err));
} finally {
setInboxActionKey(null);
}
}
async function handleServiceRestart() {
if (
typeof window !== 'undefined' &&
@@ -715,7 +688,9 @@ function App() {
useEffect(() => {
function handleHashChange() {
setActiveView(readViewFromHash());
const nextView = readViewFromHash();
setActiveView(nextView);
normalizeDashboardHash(nextView);
}
handleHashChange();
@@ -840,29 +815,6 @@ function App() {
</>
) : null}
{activeView === 'inbox' ? (
<section className="panel view-panel" id="inbox">
<div className="panel-title">
<h2>{t.panels.inbox}</h2>
<span>{t.panels.inboxQueue}</span>
</div>
<InboxPanel
inboxActionKey={inboxActionKey}
locale={locale}
onInboxAction={(item, action) =>
void handleInboxAction(item, action)
}
onTaskAction={(task, action) =>
void handleTaskAction(task, action)
}
overview={data.overview}
taskActionKey={taskActionKey}
tasks={data.tasks}
t={t}
/>
</section>
) : null}
{activeView === 'health' ? (
<section className="panel view-panel" id="health">
<div className="panel-title">

View File

@@ -4,7 +4,6 @@ import {
Clock,
Download,
Gauge,
Inbox as InboxIcon,
MessageSquare,
RefreshCw,
Settings,
@@ -15,7 +14,6 @@ import { type Messages } from './i18n';
export type DashboardView =
| 'usage'
| 'inbox'
| 'health'
| 'rooms'
| 'scheduled'
@@ -29,7 +27,6 @@ interface DashboardNavData {
const NAV_ICONS: Record<DashboardView, ReactNode> = {
usage: <Gauge size={20} strokeWidth={2} aria-hidden />,
inbox: <InboxIcon size={20} strokeWidth={2} aria-hidden />,
health: <Activity size={20} strokeWidth={2} aria-hidden />,
rooms: <MessageSquare size={20} strokeWidth={2} aria-hidden />,
scheduled: <Clock size={20} strokeWidth={2} aria-hidden />,
@@ -39,7 +36,6 @@ const NAV_ICONS: Record<DashboardView, ReactNode> = {
function navItems(t: Messages) {
return [
{ href: '#/rooms', label: t.nav.rooms, view: 'rooms' as const },
{ href: '#/inbox', label: t.nav.inbox, view: 'inbox' as const },
{ href: '#/scheduled', label: t.nav.scheduled, view: 'scheduled' as const },
{ href: '#/health', label: t.nav.health, view: 'health' as const },
{ href: '#/usage', label: t.nav.usage, view: 'usage' as const },
@@ -59,7 +55,6 @@ function navStats(data: DashboardNavData | null) {
{ processing: 0 },
);
return {
inbox: data.overview.inbox.length,
processing: queue.processing,
};
}
@@ -68,7 +63,6 @@ function navBadge(
view: DashboardView,
stats: ReturnType<typeof navStats>,
): number | null {
if (view === 'inbox' && stats && stats.inbox > 0) return stats.inbox;
if (view === 'rooms' && stats && stats.processing > 0) {
return stats.processing;
}
@@ -100,8 +94,8 @@ function DashboardBrandLink({
return (
<a
className="rail-brand"
href="#/usage"
onClick={() => onNavigate('usage')}
href="#/rooms"
onClick={() => onNavigate('rooms')}
title="EJClaw"
>
EJ

View File

@@ -82,6 +82,36 @@ describe('RoomBoardV2', () => {
expect(html).toContain('prod 배포 완료');
});
it('surfaces merge approval items as room action badges', () => {
const html = renderToStaticMarkup(
createElement(RoomBoardV2, {
...baseProps,
inbox: [
{
id: 'paired:merge-1:merge_ready',
groupKey: 'paired:merge-1:merge_ready',
kind: 'approval',
severity: 'warn',
title: 'Ready to merge',
summary: 'merge_ready',
occurredAt: '2026-04-28T04:00:00.000Z',
lastOccurredAt: '2026-04-28T04:00:00.000Z',
createdAt: '2026-04-28T04:00:00.000Z',
occurrences: 1,
source: 'paired-task',
roomJid: 'room-1',
taskId: 'merge-1',
taskStatus: 'merge_ready',
},
],
}),
);
expect(html).toContain(t.inbox.kinds.approval);
expect(html).toContain('room-inbox-pip sev-warn');
expect(html).toContain('rooms-list-bell sev-warn');
});
it('renders an empty state without snapshots', () => {
const html = renderToStaticMarkup(
createElement(RoomBoardV2, { ...baseProps, snapshots: [] }),