feat(FN-1708): add InsightsView UI with section rendering and action UX
- Add InsightsView component for viewing project insights grouped by category - Create useInsights hook with refresh, dismiss, and createTask actions - Add InsightCategory type extensions for features, competitive_analysis, research, and trends - Integrate InsightsView into dashboard routes with proper navigation - Add comprehensive tests for InsightsView and useInsights hook - Add changeset for @gsxdsm/fusion
This commit is contained in:
@@ -426,6 +426,29 @@ export { MemoryBackendError } from "./memory-backend.js";
|
||||
|
||||
export type { MemoryBackendCapabilities } from "./memory-backend.js";
|
||||
|
||||
// ── Project Insights ──────────────────────────────────────────────────────
|
||||
|
||||
export { InsightStore, computeInsightFingerprint } from "./insight-store.js";
|
||||
export type {
|
||||
InsightCategory,
|
||||
InsightStatus,
|
||||
InsightProvenance,
|
||||
Insight,
|
||||
InsightCreateInput,
|
||||
InsightUpdateInput,
|
||||
InsightUpsertInput,
|
||||
InsightListOptions,
|
||||
InsightRun,
|
||||
InsightRunStatus,
|
||||
InsightRunTrigger,
|
||||
InsightRunInputMetadata,
|
||||
InsightRunOutputMetadata,
|
||||
InsightRunCreateInput,
|
||||
InsightRunUpdateInput,
|
||||
InsightRunListOptions,
|
||||
InsightStoreEvents,
|
||||
} from "./insight-types.js";
|
||||
|
||||
// ── Agent Companies Types ──────────────────────────────────
|
||||
|
||||
export type {
|
||||
|
||||
@@ -45,7 +45,11 @@ export type InsightCategory =
|
||||
| "documentation" // Docs, comments, clarity
|
||||
| "dependency" // Third-party deps, versions, updates
|
||||
| "workflow" // Process, tooling, developer experience
|
||||
| "other"; // Uncategorized / general
|
||||
| "other" // Uncategorized / general
|
||||
| "features" // Product feature opportunities
|
||||
| "competitive_analysis" // Competitive landscape analysis
|
||||
| "research" // Market and user research insights
|
||||
| "trends"; // Industry and technology trends
|
||||
|
||||
// ── Insight Lifecycle ─────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import { detectLegacyData, migrateFromLegacy } from "./db-migrate.js";
|
||||
import { MissionStore } from "./mission-store.js";
|
||||
import { PluginStore } from "./plugin-store.js";
|
||||
import { RoadmapStore } from "./roadmap-store.js";
|
||||
import { InsightStore } from "./insight-store.js";
|
||||
import { BackwardCompat, ProjectRequiredError } from "./migration.js";
|
||||
import { CentralCore } from "./central-core.js";
|
||||
import { getTaskMergeBlocker } from "./task-merge.js";
|
||||
@@ -133,6 +134,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
private pluginStore: PluginStore | null = null;
|
||||
/** Cached RoadmapStore instance */
|
||||
private roadmapStore: RoadmapStore | null = null;
|
||||
/** Cached InsightStore instance */
|
||||
private insightStore: InsightStore | null = null;
|
||||
|
||||
constructor(private rootDir: string, globalSettingsDir?: string) {
|
||||
super();
|
||||
@@ -4625,6 +4628,17 @@ ${notificationsSection}`;
|
||||
return this.roadmapStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the InsightStore instance for project insights operations.
|
||||
* Lazily initializes the InsightStore on first access.
|
||||
*/
|
||||
getInsightStore(): InsightStore {
|
||||
if (!this.insightStore) {
|
||||
this.insightStore = new InsightStore(this.db);
|
||||
}
|
||||
return this.insightStore;
|
||||
}
|
||||
|
||||
// ── Backward Compatibility (Multi-Project Support) ────────────────────────
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user