Add dev CI and fix summary view toggle

This commit is contained in:
Youzini-afk
2026-04-09 15:10:22 +08:00
parent e4feda5471
commit 77eedb6b7c
4 changed files with 54 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev
permissions:
contents: write

44
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: CI
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check-and-test:
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Syntax check
run: npm run check
- name: Run stable test suite
run: npm run test:stable

View File

@@ -4740,6 +4740,10 @@
gap: 16px;
}
.bme-cognition-workspace[hidden] {
display: none !important;
}
.bme-cog-status-strip {
display: grid;
grid-template-columns: repeat(4, 1fr);

View File

@@ -956,16 +956,19 @@ function _switchGraphView(view) {
const isGraph = currentGraphView === "graph";
const isCognition = currentGraphView === "cognition";
const isSummary = currentGraphView === "summary";
if (canvas) canvas.style.display = isGraph ? "" : "none";
if (legend) legend.style.display = isGraph ? "" : "none";
if (statusbar) statusbar.style.display = isGraph ? "" : "none";
if (nodeDetail) nodeDetail.style.display = isGraph ? "" : "none";
if (graphControls) graphControls.style.display = isGraph ? "" : "none";
if (cogWorkspace) cogWorkspace.hidden = !isCognition;
if (summaryWorkspace) summaryWorkspace.hidden = currentGraphView !== "summary";
if (summaryWorkspace) summaryWorkspace.hidden = !isSummary;
if (cogWorkspace) cogWorkspace.style.display = isCognition ? "" : "none";
if (summaryWorkspace) summaryWorkspace.style.display = isSummary ? "" : "none";
if (isCognition) _refreshCognitionWorkspace();
if (currentGraphView === "summary") _refreshSummaryWorkspace();
if (isSummary) _refreshSummaryWorkspace();
}
function _ownerAvatarHsl(name) {