create-interview-cockpit 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/client/src/codeowners.ts +792 -0
- package/template/client/src/components/CodeContextPanel.tsx +44 -0
- package/template/client/src/components/DiagramsModal.tsx +839 -0
- package/template/client/src/components/GithubActionsLabModal.tsx +291 -264
- package/template/client/src/components/LabsPanel.tsx +3 -3
- package/template/client/src/components/PullRequestPanel.tsx +1142 -0
- package/template/client/src/components/SettingsPanel.tsx +1395 -0
- package/template/client/src/githubActionsLab.ts +461 -3
- package/template/client/src/types.ts +219 -0
- package/template/client/tsconfig.tsbuildinfo +1 -1
- package/template/cockpit.json +1 -1
- package/template/server/src/gha-runner.ts +1 -1
|
@@ -3,6 +3,7 @@ import { useStore } from "../store";
|
|
|
3
3
|
import type { CodeContextRoot } from "../types";
|
|
4
4
|
import FileViewerModal from "./FileViewerModal";
|
|
5
5
|
import NotesModal, { notesKey } from "./NotesModal";
|
|
6
|
+
import DiagramsModal, { diagramsKey } from "./DiagramsModal";
|
|
6
7
|
import GitDiffPanel from "./GitDiffPanel";
|
|
7
8
|
import {
|
|
8
9
|
File,
|
|
@@ -25,6 +26,7 @@ import {
|
|
|
25
26
|
Trash2,
|
|
26
27
|
Pencil,
|
|
27
28
|
NotebookPen,
|
|
29
|
+
Workflow,
|
|
28
30
|
} from "lucide-react";
|
|
29
31
|
|
|
30
32
|
// ─── Tree data structure ─────────────────────────────────
|
|
@@ -453,6 +455,7 @@ export default function CodeContextPanel() {
|
|
|
453
455
|
);
|
|
454
456
|
const [viewingFile, setViewingFile] = useState<string | null>(null);
|
|
455
457
|
const [notesOpen, setNotesOpen] = useState(false);
|
|
458
|
+
const [diagramsOpen, setDiagramsOpen] = useState(false);
|
|
456
459
|
|
|
457
460
|
// Show a dot in the Notes button when there are saved notes for this context
|
|
458
461
|
const hasNotes = (() => {
|
|
@@ -466,6 +469,18 @@ export default function CodeContextPanel() {
|
|
|
466
469
|
}
|
|
467
470
|
})();
|
|
468
471
|
|
|
472
|
+
// Same indicator for diagrams attached to this question.
|
|
473
|
+
const hasDiagrams = (() => {
|
|
474
|
+
try {
|
|
475
|
+
const raw = localStorage.getItem(diagramsKey(currentQuestion?.id));
|
|
476
|
+
if (!raw) return false;
|
|
477
|
+
const parsed = JSON.parse(raw);
|
|
478
|
+
return Array.isArray(parsed) && parsed.length > 0;
|
|
479
|
+
} catch {
|
|
480
|
+
return false;
|
|
481
|
+
}
|
|
482
|
+
})();
|
|
483
|
+
|
|
469
484
|
useEffect(() => {
|
|
470
485
|
fetchAvailableFiles();
|
|
471
486
|
}, []);
|
|
@@ -866,6 +881,28 @@ export default function CodeContextPanel() {
|
|
|
866
881
|
</span>
|
|
867
882
|
</button>
|
|
868
883
|
</div>
|
|
884
|
+
|
|
885
|
+
{/* ── Diagrams section ────────────────────────────────── */}
|
|
886
|
+
<div className="border-t border-slate-800 px-3 py-2">
|
|
887
|
+
<button
|
|
888
|
+
onClick={() => setDiagramsOpen((v) => !v)}
|
|
889
|
+
className="w-full flex items-center gap-2 group"
|
|
890
|
+
>
|
|
891
|
+
<Workflow className="w-3 h-3 text-sky-400/70 shrink-0" />
|
|
892
|
+
<span className="text-[10px] uppercase tracking-wider text-slate-600 flex-1 text-left">
|
|
893
|
+
Diagrams
|
|
894
|
+
</span>
|
|
895
|
+
{hasDiagrams && (
|
|
896
|
+
<span
|
|
897
|
+
className="w-1.5 h-1.5 rounded-full bg-sky-400/70 shrink-0"
|
|
898
|
+
title="Has diagrams"
|
|
899
|
+
/>
|
|
900
|
+
)}
|
|
901
|
+
<span className="text-[10px] text-slate-700 group-hover:text-slate-500 transition-colors">
|
|
902
|
+
{diagramsOpen ? "close" : "open"}
|
|
903
|
+
</span>
|
|
904
|
+
</button>
|
|
905
|
+
</div>
|
|
869
906
|
</div>
|
|
870
907
|
|
|
871
908
|
{viewingFile && (
|
|
@@ -881,6 +918,13 @@ export default function CodeContextPanel() {
|
|
|
881
918
|
onClose={() => setNotesOpen(false)}
|
|
882
919
|
/>
|
|
883
920
|
)}
|
|
921
|
+
|
|
922
|
+
{diagramsOpen && (
|
|
923
|
+
<DiagramsModal
|
|
924
|
+
questionId={currentQuestion?.id}
|
|
925
|
+
onClose={() => setDiagramsOpen(false)}
|
|
926
|
+
/>
|
|
927
|
+
)}
|
|
884
928
|
</div>
|
|
885
929
|
);
|
|
886
930
|
}
|