feat(FN-3329): refine dashboard TUI system panel and setup wizard UX
- Expand dashboard TUI state/controller wiring for system panel interactions and mouse toggle behavior - Update dashboard TUI app rendering and tests to cover the new panel controls - Improve SetupWizardModal layout and interaction behavior with matching CSS and test updates - Restore docs/research.md wording and add a changeset for the published CLI package Fusion-Task-Id: FN-3329
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, it, expect, vi, afterEach } from "vitest";
|
||||
import { render } from "ink-testing-library";
|
||||
import { DashboardApp } from "../app.js";
|
||||
import { DashboardTUI } from "../controller.js";
|
||||
import { createInitialState } from "../state.js";
|
||||
import type { ProjectItem, TaskItem, AgentItem, AgentDetailItem, ModelItem, SettingsValues, TaskDetailData } from "../state.js";
|
||||
|
||||
function newController(): DashboardTUI {
|
||||
@@ -233,6 +234,23 @@ describe("DashboardApp smoke", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Default active section", () => {
|
||||
it("createInitialState defaults to system panel", () => {
|
||||
const state = createInitialState();
|
||||
expect(state.activeSection).toBe("system");
|
||||
});
|
||||
|
||||
it("DashboardTUI controller defaults to system panel", () => {
|
||||
const controller = newController();
|
||||
expect(controller.getSnapshot().activeSection).toBe("system");
|
||||
});
|
||||
|
||||
it("createInitialState defaults to mouseEnabled = true", () => {
|
||||
const state = createInitialState();
|
||||
expect(state.mouseEnabled).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("DashboardTUI snapshot stability", () => {
|
||||
it("returns the same snapshot reference across reads when state has not changed", () => {
|
||||
const controller = newController();
|
||||
|
||||
Reference in New Issue
Block a user