chore: improve local setup and renumber dashboard workplan
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled

This commit is contained in:
2026-06-07 19:03:43 +02:00
parent 26708ba799
commit fa96fb859a
3 changed files with 153 additions and 13 deletions

114
Makefile
View File

@@ -13,5 +13,117 @@ JS_FILES += ${IHP}/static/vendor/turbolinks.js
JS_FILES += ${IHP}/static/vendor/turbolinksInstantClick.js
JS_FILES += ${IHP}/static/vendor/turbolinksMorphdom.js
include ${IHP}/Makefile.dist
.DEFAULT_GOAL := help
BOOTSTRAP_GOALS := help install install-nix doctor ui
ifneq ($(strip $(IHP)),)
include ${IHP}/Makefile.dist
else ifeq ($(strip $(MAKECMDGOALS)),)
else ifneq ($(filter-out $(BOOTSTRAP_GOALS),$(MAKECMDGOALS)),)
$(error IHP is not set. Run `make` to list setup targets, `make install` to prepare local tooling, or enter `devenv shell` before using IHP make targets)
endif
.PHONY: help install install-nix doctor ui
help:
@printf '%s\n' 'inter-hub targets:'
@printf ' %-17s %s\n' 'make install' 'Prepare local tooling; installs devenv when Nix is available.'
@printf ' %-17s %s\n' 'make install-nix' 'Show the Nix installer command required before make install.'
@printf ' %-17s %s\n' 'make doctor' 'Check whether devenv, nix, and direnv are visible.'
@printf ' %-17s %s\n' 'make ui' 'Start the local Inter-Hub UI at http://localhost:8000.'
@printf '%s\n' ''
@printf '%s\n' 'IHP targets are also available after entering the dev environment with devenv shell.'
install:
@set -eu; \
nix_bin=""; \
if command -v devenv >/dev/null 2>&1; then \
echo "devenv is already installed: $$(command -v devenv)"; \
exit 0; \
fi; \
if command -v nix >/dev/null 2>&1; then \
nix_bin="$$(command -v nix)"; \
elif [ -x "$$HOME/.nix-profile/bin/nix" ]; then \
nix_bin="$$HOME/.nix-profile/bin/nix"; \
elif [ -x /nix/var/nix/profiles/default/bin/nix ]; then \
nix_bin="/nix/var/nix/profiles/default/bin/nix"; \
fi; \
if [ -n "$$nix_bin" ]; then \
if [ -d /nix/var/nix/daemon-socket ] && [ ! -x /nix/var/nix/daemon-socket ]; then \
echo "Nix is installed at $$nix_bin, but this user cannot access the Nix daemon socket." >&2; \
echo 'Typical fix: sudo usermod -aG nix-users "$$USER"' >&2; \
echo "Then restart WSL or open a new login shell before rerunning: make install" >&2; \
exit 126; \
fi; \
echo "Installing devenv with $$nix_bin"; \
"$$nix_bin" --extra-experimental-features 'nix-command flakes' profile install github:cachix/devenv; \
echo "Done. If your shell still cannot find devenv, open a new shell or add the Nix profile bin directory to PATH."; \
else \
echo "Nix is not available, so this target cannot install devenv yet." >&2; \
echo "Run: make install-nix" >&2; \
echo "Then rerun: make install" >&2; \
echo "After Nix is available, this target installs devenv for you." >&2; \
exit 127; \
fi
install-nix:
@printf '%s\n' 'Nix is the machine-level prerequisite for this repo.'
@printf '%s\n' ''
@printf '%s\n' 'Recommended next step: review and run the Determinate Nix installer:'
@printf '%s\n' ' curl -fsSL https://install.determinate.systems/nix | sh -s -- install'
@printf '%s\n' ''
@printf '%s\n' 'If Nix is already installed but the daemon socket is not accessible:'
@printf '%s\n' ' sudo usermod -aG nix-users "$$USER"'
@printf '%s\n' ' # then restart WSL or open a new login shell'
@printf '%s\n' ''
@printf '%s\n' 'After installation, open a new shell and run:'
@printf '%s\n' ' make install'
@printf '%s\n' ' make ui'
doctor:
@devenv_path="$$(command -v devenv || true)"; printf '%-8s %s\n' 'devenv:' "$${devenv_path:-not found}"
@nix_path="$$(command -v nix || true)"; printf '%-8s %s\n' 'nix:' "$${nix_path:-not found}"
@direnv_path="$$(command -v direnv || true)"; printf '%-8s %s\n' 'direnv:' "$${direnv_path:-not found}"
@if [ -d /nix/var/nix/daemon-socket ]; then \
if [ -x /nix/var/nix/daemon-socket ]; then \
echo "nix daemon: accessible"; \
else \
echo "nix daemon: not accessible; current user may need the nix-users group"; \
fi; \
fi
@if [ -x "$$HOME/.nix-profile/bin/nix" ]; then echo "nix profile: $$HOME/.nix-profile/bin/nix"; fi
@if [ -x "$$HOME/.nix-profile/bin/devenv" ]; then echo "devenv profile: $$HOME/.nix-profile/bin/devenv"; fi
@if [ -x /nix/var/nix/profiles/default/bin/nix ]; then echo "nix default profile: /nix/var/nix/profiles/default/bin/nix"; fi
@if [ -x /nix/var/nix/profiles/default/bin/devenv ]; then echo "devenv default profile: /nix/var/nix/profiles/default/bin/devenv"; fi
ui:
@echo "Starting inter-hub UI at http://localhost:8000"
@if [ -d /nix/var/nix/daemon-socket ] && [ ! -x /nix/var/nix/daemon-socket ]; then \
echo "Nix is installed, but this user cannot access the Nix daemon socket." >&2; \
echo 'Typical fix: sudo usermod -aG nix-users "$$USER"' >&2; \
echo "Then restart WSL or open a new login shell before rerunning: make ui" >&2; \
exit 126; \
fi; \
if command -v devenv >/dev/null 2>&1; then \
exec devenv up; \
elif [ -x "$$HOME/.nix-profile/bin/devenv" ]; then \
exec "$$HOME/.nix-profile/bin/devenv" up; \
elif [ -x /nix/var/nix/profiles/default/bin/devenv ]; then \
exec /nix/var/nix/profiles/default/bin/devenv up; \
elif command -v nix >/dev/null 2>&1; then \
echo "devenv is not on PATH; using nix run github:cachix/devenv fallback"; \
exec nix --extra-experimental-features 'nix-command flakes' run github:cachix/devenv -- up; \
elif [ -x "$$HOME/.nix-profile/bin/nix" ]; then \
echo "devenv is not on PATH; using $$HOME/.nix-profile/bin/nix run github:cachix/devenv fallback"; \
exec "$$HOME/.nix-profile/bin/nix" --extra-experimental-features 'nix-command flakes' run github:cachix/devenv -- up; \
elif [ -x /nix/var/nix/profiles/default/bin/nix ]; then \
echo "devenv is not on PATH; using /nix/var/nix/profiles/default/bin/nix run github:cachix/devenv fallback"; \
exec /nix/var/nix/profiles/default/bin/nix --extra-experimental-features 'nix-command flakes' run github:cachix/devenv -- up; \
elif command -v direnv >/dev/null 2>&1; then \
echo "devenv is not on PATH; trying direnv exec . devenv up"; \
exec direnv exec . devenv up; \
else \
echo "Could not find devenv or nix." >&2; \
echo "Run make doctor to inspect the local tool path." >&2; \
echo "Run make install after Nix is available to install devenv." >&2; \
exit 127; \
fi

View File

@@ -0,0 +1,26 @@
---
id: ADHOC-2026-06-06
type: workplan
title: "Ad hoc fixes for 2026-06-06"
domain: custodian
repo: inter-hub
status: finished
owner: codex
topic_slug: inter_hub
created: "2026-06-06"
updated: "2026-06-06"
---
# ADHOC-2026-06-06 - Ad hoc fixes for 2026-06-06
## Make local UI setup targets self-explanatory
```task
id: ADHOC-2026-06-06-T01
status: done
priority: medium
```
Added default `make` help plus `install`, `install-nix`, `doctor`, and `ui`
setup guidance so local UI bootstrap reports missing or partially configured
Nix/devenv clearly.

View File

@@ -1,12 +1,14 @@
---
id: IHUB-WP-0018
id: IHUB-WP-0020
type: workplan
title: "Personal Dashboard Framework"
domain: inter-hub
status: todo
domain: inter_hub
repo: inter-hub
status: backlog
owner: tegwick
topic_slug: inter_hub
created: "2026-05-03"
updated: "2026-05-03"
updated: "2026-06-07"
phase: 13
---
@@ -35,7 +37,7 @@ controller-per-entity navigation.
### T01 — Research: Dashboard frameworks and patterns for inspiration
```task
id: IHUB-WP-0018-T01
id: IHUB-WP-0020-T01
status: todo
priority: high
```
@@ -78,7 +80,7 @@ type-safe, governed).
### T02 — Product Requirements Specification (PRS)
```task
id: IHUB-WP-0018-T02
id: IHUB-WP-0020-T02
status: todo
priority: high
depends_on: T01
@@ -123,7 +125,7 @@ inter-hub's design principles.
### T03 — Functional Design Document (FDD)
```task
id: IHUB-WP-0018-T03
id: IHUB-WP-0020-T03
status: todo
priority: high
depends_on: T02
@@ -239,17 +241,17 @@ to be added to `users`, or a simple heuristic based on existing data).
### T04 — Implementation workplan
```task
id: IHUB-WP-0018-T04
id: IHUB-WP-0020-T04
status: todo
priority: medium
depends_on: T03
```
Break T03's FDD into a detailed, sequenced task list suitable for execution as a new
workplan (IHUB-WP-0019). Each task must have a clear entry/exit criterion and fit within
workplan (IHUB-WP-0021). Each task must have a clear entry/exit criterion and fit within
the 8k token soft budget.
**Expected task structure of IHUB-WP-0019:**
**Expected task structure of IHUB-WP-0021:**
```
T01 Schema migration: dashboards, dashboard_panels, panel_type_registry
@@ -266,7 +268,7 @@ T11 Role-aware default layout
T12 Smoke tests
```
**Exit criteria:** IHUB-WP-0019 workplan file committed; T01T12 each have
**Exit criteria:** IHUB-WP-0021 workplan file committed; T01T12 each have
entry/exit criteria; ready for execution.
---
@@ -278,7 +280,7 @@ entry/exit criteria; ready for execution.
| T01 | `docs/research/dashboard-frameworks.md` | todo |
| T02 | `docs/prs/dashboard-framework-prs.md` | todo |
| T03 | `docs/fdd/dashboard-framework-fdd.md` | todo |
| T04 | `workplans/IHUB-WP-0019-personal-dashboard-impl.md` | todo |
| T04 | `workplans/IHUB-WP-0021-personal-dashboard-impl.md` | todo |
## Design Principles (binding throughout)