Skip to content
Merged

Dev #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/instructions/mcp-consultation.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
applyTo: "**"
---

# MCP Server Consultation

The SolutionInventory MCP server runs at `http://localhost:5100` and is registered as **"Questionaire MCP"** in VS Code.

## When to consult the MCP first

Before answering questions about any of the following topics, **always call the relevant MCP tool first** to get live workspace data:

| Topic | Tool to call |
|---|---|
| Categories, subcategories, entry IDs | `list_categories` |
| Questionnaire structure or IDs | `list_questionnaires` |
| Answers, responses, ratings for a category | `get_answers_for_category` |
| Tech Radar status or overrides | `get_tech_radar` |
| Consistency, completeness, warnings | `evaluate_responses` |
| JSON schema for workspace or questionnaire export | `get_json_schema` |

## Rules

- Do **not** guess or fabricate workspace data (project names, answers, categories, IDs). Always retrieve it from the MCP.
- If the MCP server is unreachable, say so explicitly rather than guessing.
- Prefer `list_categories` before any question involving category IDs or entry IDs, so the correct IDs are known.
- Prefer `get_json_schema` before generating or validating any workspace export JSON.
111 changes: 98 additions & 13 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: CI – Dev Branch
name: Dev CI and Manual Pre-release

on:
push:
branches:
- Dev
workflow_dispatch:
inputs:
target_branch:
description: Branch used for pre-release build/version bump
required: true
default: Dev

permissions:
contents: write

jobs:
# ------------------------------------------------------------------
# 1. Run all E2E tests
# CI on push to Dev: test and build only (no deployment)
# ------------------------------------------------------------------
test:
name: E2E Tests
test-dev:
name: E2E Tests (Dev Push)
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -59,22 +66,97 @@ jobs:
run: npx cucumber-js
working-directory: Client

build-web-dev:
name: Build Web App (Dev Push)
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]')
needs: test-dev
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: Client/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: Client

- name: Build web application
run: npx vite build
working-directory: Client

build-electron-dev:
name: Build Electron (Dev Push - ${{ matrix.artifact_name }})
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]')
needs: test-dev
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact_name: linux-x64
electron_flags: --linux --x64
- os: windows-latest
artifact_name: windows-x64
electron_flags: --win --x64

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: Client/package-lock.json

- name: Install system dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libx11-xcb1 libxrandr2 libxcomposite1 libxcursor1 libxdamage1 \
libxfixes3 libxi6 libgtk-3-0t64 libatk1.0-0t64 libcairo-gobject2 \
libgdk-pixbuf-2.0-0 libasound2t64 libgtk-4-1 libvulkan1 libopus0 \
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-bad1.0-0 libflite1 libwebp7 libharfbuzz-icu0 \
libwayland-server0 libmanette-0.2-0 libenchant-2-2 libgbm1 libdrm2 \
libhyphen0 libgles2 rpm fakeroot dpkg

- name: Install dependencies
run: npm ci
working-directory: Client

- name: Build Vite + Electron app
run: npx vite build --mode electron && npx electron-builder ${{ matrix.electron_flags }} --publish never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: Client

# ------------------------------------------------------------------
# 2. Bump the pre-release version, commit it back to Dev and tag it
# 1. Bump the pre-release version, commit it back and tag it
# ------------------------------------------------------------------
version:
name: Bump Pre-release Version
needs: test
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
# Prevent infinite loop when this workflow commits the version bump
if: "!contains(github.event.head_commit.message, '[skip ci]')"
outputs:
version: ${{ steps.bump.outputs.version }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.target_branch }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -103,15 +185,16 @@ jobs:
git add package.json package-lock.json
git commit -m "chore: pre-release v${VERSION} [skip ci]"
git tag "v${VERSION}"
git push origin Dev
git push origin "${{ inputs.target_branch }}"
git push origin "v${VERSION}"
working-directory: Client

# ------------------------------------------------------------------
# 3. Build the Electron app for all platforms and publish artifacts
# 2. Build the Electron app for all platforms and publish artifacts
# ------------------------------------------------------------------
build-electron:
name: Build Electron (${{ matrix.artifact_name }})
if: github.event_name == 'workflow_dispatch'
needs: version
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -179,10 +262,11 @@ jobs:
path: Client/release/*.exe

# ------------------------------------------------------------------
# 4. Create a GitHub Pre-release with all Electron artifacts
# 3. Create a GitHub Pre-release with all Electron artifacts
# ------------------------------------------------------------------
create-prerelease:
name: Create GitHub Pre-release
if: github.event_name == 'workflow_dispatch'
needs: [version, build-electron]
runs-on: ubuntu-latest

Expand All @@ -198,9 +282,10 @@ jobs:
tag_name: v${{ needs.version.outputs.version }}
name: "Pre-release v${{ needs.version.outputs.version }}"
body: |
🚧 **Pre-release v${{ needs.version.outputs.version }}**
Pre-release v${{ needs.version.outputs.version }}

Automatically built from the `Dev` branch. Not intended for production use.
Manually triggered dev pre-release.
Source branch: ${{ inputs.target_branch }}
Commit: ${{ github.sha }}
prerelease: true
files: artifacts/**/*
Expand Down
47 changes: 36 additions & 11 deletions .github/workflows/electron-release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
name: Release on Merge to Main
name: Manual Full Release

on:
push:
branches:
- main
workflow_dispatch:
inputs:
release_type:
description: Semantic version bump type
type: choice
options:
- patch
- minor
- major
required: true
default: minor

permissions:
contents: write
Expand All @@ -16,20 +24,35 @@ concurrency:

jobs:
# ------------------------------------------------------------------
# 1. Bump the minor version, commit it back to main and create a tag
# 0. Ensure this workflow is only run from main
# ------------------------------------------------------------------
validate-main:
name: Validate Main Branch
runs-on: ubuntu-latest

steps:
- name: Ensure workflow ref is main
run: |
if [ "${{ github.ref_name }}" != "main" ]; then
echo "This workflow can only run from main. Current ref: ${{ github.ref_name }}"
exit 1
fi

# ------------------------------------------------------------------
# 1. Bump the selected semantic version and create a tag
# ------------------------------------------------------------------
version:
name: Bump Version
needs: validate-main
runs-on: ubuntu-latest
# Prevent infinite loop: skip if the commit was created by this workflow
if: "!contains(github.event.head_commit.message, '[skip ci]')"
outputs:
version: ${{ steps.bump.outputs.version }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -49,10 +72,10 @@ jobs:
git config user.email "ci@github-actions"
git config user.name "GitHub Actions"

- name: Bump minor version and push
- name: Bump selected version and push
id: bump
run: |
npm version minor --no-git-tag-version
npm version ${{ inputs.release_type }} --no-git-tag-version
VERSION=$(node -p "require('./package.json').version")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
git add package.json package-lock.json
Expand Down Expand Up @@ -153,9 +176,11 @@ jobs:
tag_name: v${{ needs.version.outputs.version }}
name: "Release v${{ needs.version.outputs.version }}"
body: |
?? **Release v${{ needs.version.outputs.version }}**
Release v${{ needs.version.outputs.version }}

Automatically built and released on merge to `main`.
Manually triggered full release.
Source branch: main
Release type: ${{ inputs.release_type }}
Commit: ${{ github.sha }}
prerelease: false
files: artifacts/**/*
Expand Down
11 changes: 9 additions & 2 deletions Client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,17 @@ export default {
break
case 'open-workspace': {
const result = await window.electronAPI.openWorkspaceFile()
if (!result || result.error) break
if (!result) break // canceled
if (result.error) {
console.error('[open-workspace] Failed to read file:', result.error)
break
}
// Set workspaceDir to the file's directory so future saves go there
await window.electronAPI.setWorkspaceDir(result.dirPath)
store.loadFromData(result.data)
const loaded = store.loadFromData(result.data)
if (!loaded) {
console.error('[open-workspace] File format not recognized:', result.filePath)
}
break
}
case 'save-workspace':
Expand Down
Loading
Loading