Skip to content

Latest commit

Β 

History

History
652 lines (510 loc) Β· 36.2 KB

CLAUDE.md

File metadata and controls

652 lines (510 loc) Β· 36.2 KB

CLAUDE.md

This file provides guidance to AI coding agents when working with code in this repository.

Project Overview

Toolbox is a full-stack Hoist application by Extremely Heavy Industries (XH) that serves as the primary demo, test, and reference implementation for the Hoist UI framework. It includes desktop, mobile, and admin apps plus several standalone example applications (contact, todo, portfolio, news, recalls, filemanager).

Toolbox is also the primary development and testing vehicle for the Hoist framework itself. XH developers commonly work with local sibling checkouts of the framework libraries (../hoist-react and ../hoist-core), using pnpm startWithHoist and runHoistInline=true to develop framework features inline and test them in Toolbox. Two framework plugins are central to work in this repo:

  • @xh/hoist (hoist-react) - the client-side React/MobX framework
  • hoist-core - the server-side Grails/Spring Boot framework

Understanding these frameworks is essential to writing correct, idiomatic code in this application.

Hoist Framework Documentation - READ THIS FIRST

This project depends on two framework plugins. Always consult the framework reference tools before authoring code that imports from @xh/hoist or io.xh.hoist - prop names, decorators, and conventions evolve, and stale guesses produce real bugs.

  • @xh/hoist (hoist-react) - when authoring under client-app/, the xh:using-hoist-react-reference skill is your routing table for the docs and symbol-search tools (MCP + CLI). Read the Architecture Primer below for the foundational mental model; the skill covers everything beyond.
  • hoist-core - when authoring Groovy/Java under grails-app/ or src/, the xh:using-hoist-core-reference skill is your routing table.

hoist-react Architecture Primer

Hoist applications are built around three artifact types:

Artifact Base Class Purpose Lifecycle
Component hoistCmp.factory UI rendering (React) Transient - mount/unmount with views
Model HoistModel Observable state + business logic Varies - linked to component or standalone
Service HoistService App-wide data access + shared state Singleton - lives for app lifetime

Element factories over JSX. Hoist uses element factory functions, not JSX:

// βœ… Hoist style
panel({title: 'Users', children: [grid(), button({text: 'Refresh'})]})

// ❌ Not used in Hoist
<Panel title="Users"><Grid /><Button text="Refresh" /></Panel>

Components are created with hoistCmp.factory. Each component declares its model relationship:

export const userList = hoistCmp.factory({
    model: creates(UserListModel),  // Component creates and owns this model
    render({model}) {
        return panel({title: 'Users', children: grid()});
    }
});

Model wiring - creates() vs uses():

  • creates(ModelClass) - component instantiates, owns, and destroys the model on unmount.
  • uses(ModelClass) - component receives model from a parent via context or explicit prop.

Context-based model lookup eliminates prop drilling. When a component creates() a model, that model is published to React context. Child components using uses(ModelClass) automatically find the nearest matching model in the ancestor tree. All public properties of ancestor models are searched - so if PanelModel has a gridModel: GridModel property, a child grid() call resolves it automatically. (Note: @managed is unrelated to lookup - it controls cleanup on destroy. A property does not need @managed to be found via context lookup.)

When multiple models of the same type exist in context (e.g. two GridModel instances), pass the model explicitly: grid({model: model.leftGridModel}).

HoistModel - the core state holder:

class UserListModel extends HoistModel {
    @observableRef accessor users: User[] = [];
    @bindable accessor selectedUserId: string = null;
    @managed detailModel = new UserDetailModel();

    override async doLoadAsync(loadSpec: LoadSpec) {
        const users = await XH.fetchJson({url: 'api/users', loadSpec});
        runInAction(() => this.users = users);
    }
}

Key decorators:

Decorator Purpose
@observable / @observableRef MobX observable state - deep, or reference-only
@bindable / @bindableRef Observable + auto-generated action-wrapped setter
@managed Mark child object for automatic cleanup on destroy()
@persist Sync property with a persistence provider (requires persistWith)
@lookup(ModelClass) Inject ancestor model (linked models only, available after onLinked)
@computed Cached derived value
@action Mark method as state-modifying

The accessor keyword is required on every @observable, @observableRef, @bindable, and @bindableRef field - these are TC39 accessor decorators, and the keyword is what transforms the field into the getter/setter pair they wrap:

@observable accessor count = 0;                 // deep observability
@observableRef accessor records: Record[] = []; // track reference changes only
@bindable accessor showInactive = false;        // adds setShowInactive()

Decorators that wrap a getter (@computed), a method (@action), or a plain field (@managed, @lookup) take no accessor. Where @persist combines with a MobX decorator, it comes second in source order: @bindable @persist accessor showAdvanced = false.

Use compareStructural (from @xh/hoist/mobx) where a reaction or @observableRef needs a structural equality check.

doLoadAsync(loadSpec) - implement this template method to opt into managed data loading. Call model.loadAsync() or model.refreshAsync() to trigger - never call doLoadAsync directly. Linked models with doLoadAsync are loaded automatically on mount.

HoistService - singleton services installed during app init and accessed via XH:

XH.tradeService.submitTradeAsync(trade);  // Custom service
XH.fetchJson({url: 'api/data'});          // FetchService alias
XH.getConf('featureFlag', false);         // ConfigService alias
XH.getPref('pageSize', 50);              // PrefService alias

XH singleton - the top-level API entry point. Provides service access, data fetching (fetchJson, postJson), user interaction (toast, confirm, prompt, handleException), navigation (navigate, appendRoute), and app state (appState, darkTheme).

Critical pitfalls:

  1. Omitting accessor on an @observable / @bindable field - the decorator cannot apply.
  2. Managing objects you don't own - only @managed objects your class creates. Objects passed in from outside are owned by the provider.
  3. Mutating observables outside actions - use runInAction(), @action, or @bindable.
  4. Calling lookupModel() too early - only works during or after onLinked().
  5. Calling doLoadAsync() directly - use loadAsync() / refreshAsync() entry points.

Quick Reference - MCP Doc IDs by Task

Use hoist-search-docs with the doc ID for full documentation on any topic.

If you need to... Doc ID
Understand the component/model/service pattern core
Work with Stores, Records, Fields, or Filters data
Fetch data, read configuration, or manage preferences svc
Build or configure a data grid cmp/grid
Build a form with validation cmp/form
Understand input change/commit lifecycle cmp/input
Use layout containers (Box, HBox, VBox) cmp/layout
Create a tabbed interface cmp/tab
Save and restore named view configurations cmp/viewmanager
Build a configurable dashboard with draggable widgets desktop/cmp/dash
Configure a desktop panel (toolbars, masks, collapse) desktop/cmp/panel
Build a mobile app mobile
Format numbers, dates, or currencies format
Understand app lifecycle and startup sequence lifecycle-app
Understand model/service lifecycles and loading lifecycle-models-and-services
Add authentication (OAuth, login) authentication
Persist UI state (columns, filters, panel sizes) persistence
Check roles, gates, or app access authorization
Configure client-side routing routing
Handle exceptions and display errors error-handling
Add testId selectors for test automation test-automation
Use Promises with error handling and tracking promise
Work with MobX observables and @bindable mobx
Use timers, decorators, or utility functions utils
Configure the app shell, dialogs, toasts, or theming appcontainer
Use icons in buttons, menus, and grids icon
Configure OAuth with Auth0 or Microsoft Entra security

hoist-core

The hoist-core repository has comprehensive documentation covering server-side architecture, services, and conventions across 20+ feature docs and upgrade notes - all surfaced via the reference tools described in the xh:using-hoist-core-reference skill. For topics not yet covered by docs, refer to the existing source code in grails-app/, or browse the public docs at https://github.com/xh/hoist-core/tree/develop/docs.

MCP Servers

This project configures MCP (Model Context Protocol) servers in .mcp.json that provide additional tools to AI coding agents. Servers must also be listed in .claude/settings.json under enabledMcpjsonServers to be active.

hoist-docs (enabled by default)

Hoist Docs (@xh/hoist-docs, a client-app dev dependency) serves hoist-react and hoist-core documentation and API reference. The agent launches it over stdio (.mcp.json), and it answers for exactly the Hoist builds Toolbox runs, snapshots included: each library ships its index with itself - @xh/hoist inside its npm package, read in place, and hoist-core as a docs-index Maven artifact beside its jar, fetched for hoistCoreVersion. To serve indexes built locally instead (pnpm build:react and pnpm build:core in a hoist-docs checkout), set HOIST_DOCS_INDEX_DIR to that checkout's indexes folder. Tools: hoist-search-docs, hoist-list-docs, hoist-read-doc, hoist-search-symbols, hoist-get-symbol, hoist-get-members, hoist-ping. Pass library: "react" or library: "core" to scope a call. Built on the MCP TypeScript SDK v2, it speaks the 2026-07-28 protocol and the 2025-era handshake older clients use.

The same package backs Toolbox's desktop and mobile docs viewers, in the browser with no server: pnpm run docs (run by start, startWithHoist and build) writes the docs of hoist-react, hoist-core and hoist-chat-kit to client-app/public/hoist-docs/, and DocService searches them with @xh/hoist-docs/docs - the search agents get. Write pnpm run docs, not pnpm docs: pnpm 12 has a built-in docs command that shadows the script. A library with a sibling checkout (../hoist-react, ../hoist-core, ../hoist-chat-kit) is read straight from it, so doc edits can be previewed uncommitted; pnpm docs:watch rewrites them on every change (reload the viewer to see it). The others come from the builds Toolbox installs.

@xh/hoist-chat-kit is specified as the next dist-tag, like @xh/hoist. @xh/hoist-docs is a release range (^1.0.0), since its develop snapshots carry the next major version. To try unpublished changes to the tool, link it from a sibling checkout instead (link:../../hoist-docs, after pnpm install && pnpm build there).

GitHub

Use the GitHub CLI (gh) for GitHub operations: gh pr view, gh issue list, gh pr create, and gh api for anything else. Prefer it over raw curl calls to the GitHub API.

Plugins

XH plugin (xh@hoist-ai)

The shared .claude/settings.json enables XH's xh@hoist-ai plugin, but enabling does not install it. Each developer should install it once per machine at user scope, which covers every repo and worktree and auto-updates. If no xh: skills appear in your available skills, tell the developer the plugin is missing and give them the command claude plugin install xh@hoist-ai --scope user. Offer to run it for them.

TypeScript LSP (enabled by default)

The typescript-lsp plugin is enabled in .claude/settings.json and provides code intelligence (go-to-definition, find references, hover info, call hierarchy, etc.) for TypeScript and JavaScript files via the LSP tool. The plugin is auto-installed by Claude Code, but it requires the typescript-language-server binary to be installed on your machine:

npm install -g typescript-language-server typescript

If the binary is not installed, LSP tool calls will fail silently. Verify your install with typescript-language-server --version.

Java LSP (enabled by default)

The jdtls-lsp plugin is enabled in .claude/settings.json and provides code intelligence (hover info, document symbols, find references, call hierarchy, etc.) for Java files via the LSP tool. The plugin is auto-installed by Claude Code, but it requires the jdtls binary to be installed on your machine:

brew install jdtls

If the binary is not installed, LSP tool calls will fail silently. Verify your install with jdtls --version.

In this mixed Java/Groovy project, jdtls works well for Java-specific operations within .java files - hover, document symbols, find references, and call hierarchy all return useful results. However, go-to-definition does not resolve Groovy classes (e.g. services and domain objects defined in .groovy files), and workspace symbol search may return empty results since the server only indexes Java source. For navigating into Groovy code, use Grep/Glob tools instead.

Tech Stack

  • Frontend: TypeScript, React 19, MobX, AG Grid, Highcharts, @xh/hoist framework
  • Backend: Grails 8 (Groovy/Spring Boot), hoist-core framework
  • JDK: the JVM version used for local development and CI is set by majorJavaVersion in gradle.properties; the Gradle toolchain in build.gradle reads that value. Grails 8 requires JDK 21 or later, and the Gradle 9 wrapper it brings runs on JDK 25 directly. (Note that hoist-core itself is separately pinned to a lower bytecode level so its published JAR remains runnable by older client apps - see hoist-core docs for the current minimum.)
  • Database: MySQL (or H2 in-memory for quick local dev via APP_TOOLBOX_USE_H2=true)
  • Client Build: Rsbuild (Rspack + SWC), configured by client-app/rsbuild.config.mjs via configureRsbuild() from @xh/hoist-dev-utils
  • Package Manager: pnpm (frontend, version pinned via packageManager), Gradle via wrapper (backend)

Common Commands

Frontend (run from client-app/)

Package manager: pnpm (version pinned via packageManager in package.json; pnpm-lock.yaml is the source of truth). Do not run npm install or yarn install here. If pnpm is not on the PATH, install any recent version (see pnpm.io/installation). It switches to the pinned version automatically. The sibling ../../hoist-react checkout is also pnpm-managed, and startWithHoist installs it with pnpm as well.

pnpm install              # Install dependencies
pnpm start                # Dev server on port 3000
pnpm build                # Production build
pnpm lint                 # Run ESLint + Stylelint
pnpm lint:code            # ESLint only
pnpm lint:styles          # Stylelint only
pnpm typecheck            # Type check (tsc --noEmit)
pnpm test                 # Unit tests (Vitest)
pnpm test:watch           # Unit tests in watch mode
pnpm startWithHoist       # Dev server using local sibling hoist-react
pnpm testWithHoist        # Unit tests against local sibling hoist-react

Linting and type-checking are separate concerns, and neither subsumes the other - run both. ESLint is configured type-aware, but that only powers its own rules; it never reports TypeScript compiler errors, so a genuine type error passes pnpm lint. CI runs the two as distinct steps.

Between releases, @xh/hoist is specified as the bare npm dist-tag "next", which tracks hoist-react's current SNAPSHOT line. Refresh it with pnpm update (plain pnpm install honors the lockfile and will not move it). Never rewrite that spec to a version or caret range - on prerelease versions pnpm update converts a range into an exact pin it can then never move again, silently freezing the snapshot (pnpm#7002). This also keeps the hoist-react-snapshot trigger in buildSnapshot.yml working. See docs/running-locally.md.

When using pnpm startWithHoist, you may also want to uncomment the paths block in client-app/tsconfig.json so tsc/your IDE type-check against the local hoist-react checkout - see the Pre-commit Hooks note above and docs/running-locally.md. Re-comment it before committing.

Backend (run from project root)

./gradlew bootRun     # Start Grails server on port 8080
./gradlew console     # Grails interactive console
./gradlew test        # Spock unit tests in src/test/groovy (see hoist-core's docs/testing.md)

Packaged builds lock every Gradle configuration in STRICT mode (see build.gradle). After any dependency change, including a hoistCoreVersion bump, run ./gradlew dependencies --write-locks -PrunHoistInline=false and commit the changed lockfiles. Inline builds (runHoistInline=true) skip locking, because the local hoist-core checkout decides their dependency graph.

Local Development

Run both simultaneously:

  • Terminal 1: ./gradlew bootRun
  • Terminal 2: cd client-app && pnpm start

For the full local-run guide - local Hoist checkouts, multiple instances, on-device mobile testing over a network IP, HTTPS, and troubleshooting (including the server timezone check) - see docs/running-locally.md.

When you drive Toolbox in a browser, the developer's normal setup is the default - they may already be logged in, or want their own state or the OAuth flow in play. If you need to log in yourself and have no session to use, you can run the server on a throwaway H2 database with a temporary admin login. Check with the developer first if it is not clear which they want. Never enter a developer's own credentials. A throwaway server always uses the fixed login agent@xh.io / localDevOnly, never a generated password, so anyone who finds its login prompt can sign in. See Agent-driven sessions.

App URLs during Local Development

The Rsbuild dev server runs on http://localhost:3000. Each file in client-app/src/apps/ defines an entry point, and its filename (minus the extension) becomes the URL path. For example, apps/app.ts β†’ http://localhost:3000/app.

Primary entry points (the ones you'll use most often for interactive testing):

App URL
Desktop app http://localhost:3000/app
Admin console http://localhost:3000/admin
Mobile app http://localhost:3000/mobile

Example apps: /contact, /todo, /portfolio, /news, /recalls, /fileManager, /weather, /favicons - each at http://localhost:3000/<name>.

Unit Tests

Vitest specs sit beside their source as Foo.spec.ts. They boot Hoist's real client services against the fake hoist-core in @xh/hoist/test-support, configured by client-app/vitest.config.mts via configureVitest() from hoist-dev-utils. The Unit Tests workflow runs pnpm test on PRs, and snapshot and release builds run it before building.

  • src/test-support/toolboxFake.ts seeds the fake with Toolbox's client-visible configs and prefs from BootStrap.groovy. Keep it in sync in the same change.
  • Serve app endpoints from a spec with hoistCore.route(). A request the fake does not serve fails the test.
  • Test app logic - model rules, derived state, transforms and the requests services send. Leave rendering, layout and Hoist itself out.
  • Fake state persists across the tests in a file, and each file boots once. Undo a test's changes in that test, and use a separate file per role set or user.

Read the "Unit Tests in an App" section of hoist-react's docs/unit-testing.md before writing specs. The MCP doc id is docs/unit-testing.md.

Pre-commit Hooks

Husky runs automatically on commit: lint-staged (prettier + eslint on staged files) and conditionally the TypeScript compiler (pnpm typecheck) if TS/JS/package files are staged. Note that tsc type-checks against the installed @xh/hoist in node_modules, not a local sibling checkout, unless the paths block in client-app/tsconfig.json is uncommented for inline hoist-react work (see docs/running-locally.md).

Code Style

  • Prettier: 100 char width, single quotes, no trailing commas, 4-space indent (JS/TS), 2-space (SCSS/JSON)
  • No bracket spacing: {foo} not { foo }
  • Arrow parens: avoid when possible (x => x not (x) => x)
  • Semicolons: always
  • Trailing commas: none

Imports

  • Use import type for type-only imports. Split mixed imports into two statements - values in import {...}, types in import type {...}.
  • Never create barrel files. No index.ts / index.tsx re-export modules under client-app/src. Import directly from the module that defines the symbol.
  • No export * from or value re-exports (export {foo} from '...') anywhere in app source. Type re-exports (export type {Foo} from '...') are fine - they are erased at build and create no runtime module edge.
  • Importing from hoist-react's barrels (@xh/hoist/core, @xh/hoist/cmp/grid) is correct and unaffected. These rules govern modules this app defines, not the framework's published entry points.

All four are enforced by ESLint - violations fail pnpm lint and the pre-commit hook. The import type rule is auto-fixable: pnpm exec eslint . --fix, then pnpm exec prettier --write "src/**/*.{ts,tsx}" from client-app/.

Git Workflow

Branching, committing, and pushing all require an explicit ask - never do them unprompted. When it isn't abundantly clear that the user wants one of these, ask first.

Pushing is a deliberate gatekeeping step: never push to any remote unless the user explicitly asks. Some developers hard-block pushes entirely, others allow or request them - so it stays open as a possibility, but always confirm before pushing.

Committing is the most context-dependent of these, varying by developer and by situation. Default to asking - especially in an interactive session working directly on develop, where each commit is the developer's call. The exception is orchestrated multi-agent work on a feature branch: when a plan fans out independent units of work, the go-ahead to commit comes from that plan or orchestration rather than a per-commit prompt, and agents are expected to make their own discrete, well-scoped commits as directed.

A skill or third-party plugin instructing you to commit (e.g. "make a small commit after each step") does NOT by itself authorize a commit - that is a default baked into the tool, not the developer's request. This guidance takes precedence: pause and ask. The door stays open for a workflow to commit autonomously, but only when the developer has explicitly opted into that for the workflow at hand - the authorization must come from the developer, not the skill's defaults.

Creating branches

Once the user has asked for a branch (per the "ask first" rule above, don't create one unprompted): a new branch should map to its own origin/<name> on push - not push into an existing remote branch.

Default: git switch -c <name> from current HEAD, no base ref. "Make a new branch" means "from here" - the user is sitting on a particular point in the code; that's the start. If they want to start from somewhere else (e.g. current origin/develop), they will say so. If genuinely unclear, ask.

If you do specify a base ref, you MUST pass --no-track. Without it the new branch silently adopts the base as its upstream, which causes surprise merges on git pull and - depending on push.default - can push work onto the base branch. Past slips have put unreviewed work on develop this way.

git switch -c my-feature                              # βœ… from current HEAD
git switch -c my-feature --no-track origin/develop    # βœ… explicit base, safe
git switch -c my-feature origin/develop               # ❌ auto-tracks develop

If you forget --no-track: git branch --unset-upstream, then git push -u origin <branch>. Flag the slip - don't silently fix it.

Feature branch workflow

On feature branches, prefer multiple small commits over amending - PRs are squash-merged into develop, so intermediate commits are collapsed automatically. Never force-push a feature branch; if the branch falls behind develop, use a simple merge commit rather than a rebase. Merge commits and extra commits are harmless on feature branches and are squashed out on merge, while force-pushes risk losing work and complicate collaboration.

Commit messages, PRs, and comments

Do not hard-wrap lines at a fixed column width in commit message bodies, pull request descriptions, or issue/PR comments - let the viewing tool handle display wrapping. However, do use line breaks for structure: separate logical points into bullet lists, use blank lines between paragraphs, and break after the subject line. Keep PR descriptions concise - XH developers review these regularly, so favor brief summaries over exhaustive detail. Bullet the key changes and let the diff and any upgrade notes speak for themselves.

Do not add AI-generated attribution to commit messages or PR descriptions - no Generated with ... line, no πŸ€– Generated with [Claude Code] footer, and no Claude-Session: (or similar AI-session/attribution) trailer, even if a harness git-instruction block asks for one. XH does not want these links in the project's history.

Telemetry

Span names: When naming custom OTEL spans passed to withSpanAsync or FetchOptions.span, use a dotted namespace of toolbox.<sub-app>.<action> for example apps (e.g. toolbox.weatherv2.loadViews, toolbox.weather.loadDashboardData), or toolbox.<action> for the main desktop/admin/mobile apps. The xh.* prefix is reserved for framework-owned spans per the hoist-react v85 upgrade notes, so the toolbox.* prefix keeps app spans cleanly distinguishable from framework spans in the trace view.

Architecture

Frontend (client-app/src/)

  • apps/ - Entry points for each app (app.ts, admin.ts, contact.ts, etc.). Each calls XH.renderApp().
  • desktop/ - Main desktop app: AppModel.ts (state) + AppComponent.tsx (UI), organized into tabs/ folders that mirror its top-level tabs (home, grids, layout, forms, components, mobile, system, docs, examples).
  • mobile/ - Mobile app variant.
  • admin/ - Admin console.
  • examples/ - Standalone example applications (contact, todo, portfolio, news, recalls, filemanager).
  • core/ - Shared services (svc/), auth (AuthModel.ts), column definitions.
  • Bootstrap.ts - AG Grid & Highcharts license/module registration.

Key pattern: Apps follow Model + Component pairing. Models hold state (MobX observables), Components render UI. Services are singleton classes for data fetching and business logic. See the hoist-react docs (referenced above) for detailed coverage of this architecture.

Demo pages and playground options

Most desktop demo tabs wrap their example in wrapper() from desktop/common/Wrapper.ts, with controls for the example in its options rail (usually via wrapperOption). Pick the control that matches the prop type. Hoist has dedicated pickers for some types, and a generic select is the wrong choice for them:

  • Intent props (intent, headerIntent, any Intent-typed value): use intentInput from @xh/hoist/desktop/cmp/input. Pass enableClear: true when null is a valid value, which it usually is. Use a select only for an obvious reason, such as a list that is not Hoist intents.
  • Icon props: use iconPicker from @xh/hoist/desktop/cmp/input.

See StatCardPanel.ts for both in one options rail.

Backend (grails-app/)

  • controllers/ - REST controllers extending BaseController (from hoist-core). Package: io.xh.toolbox.*
  • services/ - Business logic extending BaseService. Support CachedValue, clearCachesConfigs.
  • domain/ - GORM domain classes.
  • conf/ - application.groovy and runtime.groovy configuration.
  • init/ - Bootstrap, security, logging setup.

Instance Configuration

Environment variables loaded from .env file (copy .env.template to .env). Required: APP_TOOLBOX_ENVIRONMENT, APP_TOOLBOX_DB_HOST, APP_TOOLBOX_DB_SCHEMA, APP_TOOLBOX_DB_USER, APP_TOOLBOX_DB_PASSWORD.

Releasing Toolbox

Cutting a versioned production release is a multi-step process: swap the Hoist libraries from their working SNAPSHOTs to the latest official releases, finalize the CHANGELOG, commit on develop, ff-merge develop into master, run and watch the Build Release + Deploy Release GitHub Actions, then restore develop to its SNAPSHOT state. Do not improvise these steps - use the release-toolbox skill (/release-toolbox), the authoritative runbook that orchestrates the entire flow with confirmation gates. See .github/workflows/buildRelease.yml / deployRelease.yml and docs/build-and-deploy.md for the underlying build/deploy mechanics.

Operating the Deployed App on AWS

Toolbox is deployed to XH's AWS on ECS (cluster toolbox, services toolbox-dev / toolbox-prod). For troubleshooting, log inspection, DB queries, and manual deploy/scale operations against the deployed environment, see docs/aws-access.md. That runbook covers SSO profile setup (xh-toolbox-ro read-only, xh-toolbox-rw for writes), SSM port-forwarding to RDS via ECS Exec, CloudWatch log access, and the per-command confirmation protocol for write operations.

This repo is public: the runbook deliberately omits the AWS account ID, Identity Center URL/ARN, RDS endpoints, internal DNS, and DB credentials. Those operational values live in two items in the XH Team 1Password vault - Toolbox AWS Ops for account / SSO values and Toolbox DB for everything database-related. Fetch them with the op CLI (op read "op://XH Team/<item>/<field>") when running commands from the runbook. Never write those values into checked-in files.

Safety protocol for AI agents (full table in the runbook): reads against dev proceed without confirmation; writes against dev, and anything (read or write) against prod, require explicit per-command user confirmation - propose the exact command and wait for "go".

Operating XH's Azure / Entra Tenant

Some of Toolbox's identity config lives in XH's Microsoft Entra tenant - the Toolbox OAuth client registration used when oauthProvider is ENTRA_ID, and the shared xh-hoist-directory-reader registration backing Hoist's EntraIdService group lookups. For connecting to that tenant to troubleshoot, monitor, or administer it, see docs/azure-access.md.

That runbook covers two shared operator service principals - xh-toolbox-ops-ro (read-only) and xh-toolbox-ops-rw (writes) - whose credentials live in the Toolbox Azure Ops item in the XH Team 1Password vault. Note two Azure-specific wrinkles the runbook explains in full: the Azure CLI has no per-command --profile, so tiers are separated via the AZURE_CONFIG_DIR environment variable and az account show is a required identity check; and operator logins must pass --allow-no-subscriptions, since these principals deliberately hold no Azure RBAC.

Scope: the Entra directory plane only. Nothing of Toolbox is deployed on Azure compute, and the operator principals hold no subscription role assignments.

Safety protocol for AI agents (full table in the runbook): reads proceed without confirmation, as do writes to sandbox objects the agent itself created (prefix these toolbox-test-*). Modifying a pre-existing shared object - notably any credential on xh-hoist-directory-reader, which other apps authenticate with - and any deletion require explicit per-command confirmation. Granting admin consent, assigning directory roles, and creating service principals are Global Administrator tasks that the operator tiers cannot perform, by design.

Changelog

Toolbox maintains a CHANGELOG.md that is parsed at build time by hoist-dev-utils and displayed in-app to users via Hoist's ChangelogService. Write entries for an audience of developers and potential clients evaluating Hoist.

The file opens with an HTML comment restating the essentials below. Keep the two in sync.

Where entries go: changelog.d/

New entries go in a fragment file in changelog.d/, never in CHANGELOG.md. A release assembles the fragments into CHANGELOG.md and deletes them. From client-app/, add a one-line entry with pnpm changelog add <section> "<text>", and run pnpm changelog check before you commit. For a longer entry, edit the fragment that add writes. The fragment format and the other commands are in the hoist-dev-utils README.

  • Sections: Breaking Changes, New Features, Bug Fixes, Technical, Libraries, listed in changelog.d/config.json - the titles Hoist's ChangelogDialog maps to CSS classnames. check rejects any other ### title.
  • To change an unreleased entry, edit its fragment. To correct a released entry, edit CHANGELOG.md.
  • Version headings in CHANGELOG.md: ## <version> - <date>, no v prefix, date as YYYY-MM-DD. The top heading is a bare ## <x.y>-SNAPSHOT - unreleased for the version in development. Never write entries under it.
  • A release runs pnpm changelog release <version> - see the release-toolbox skill.

Wrapping and sub-bullets

hoist-dev-utils parses this file into structured markdown. Each bullet keeps all of its lines, so entries follow the library convention:

  1. Start bullets and ### headings at column 0.
  2. Hard-wrap bullets at 100 characters, with two-space indentation for continuation lines. pnpm changelog check warns on longer lines in a fragment.
  3. Indent sub-bullets two spaces under their parent. They render as a nested list in-app.

Code spans, links and bold text also render in-app.

Libraries entries

One bullet per library whose released version changed since the last Toolbox release, versions backticked and separated by β†’:

* @xh/hoist `87.0 β†’ 87.1`
* @xh/hoist-dev-utils `14.0 β†’ 15.0`
* hoist-core `40.2 β†’ 41.0`
  • Two-part major.minor only. Drop the patch component - write 87.0 β†’ 87.1, never 87.0.0 β†’ 87.1.0.
  • Never the ZZ.x form. 14.x β†’ 15.x is retired - write 14.0 β†’ 15.0.
  • Only libraries that actually moved. A release swap that changes the dependency spec without changing the released version (e.g. 41.0-SNAPSHOT pinned back to 41.0.0) is not an entry.
  • Name libraries by package or artifact id (@xh/hoist, hoist-core); others by common name (React, ag-Grid).
  • Append a caveat after - when the bump needs one, e.g. @xh/hoist-dev-utils `12.2 β†’ 13.0` - breaking: `.md` imports now resolve to raw text.

Style

  • Use past tense ("Added", "Fixed", "Removed" - not "Add", "Fix", "Remove").
  • Be concise but specific about what changed and why.
  • Use backticks for API names, component names, and config keys (e.g. ViewManager, useOAuth).
  • Prose punctuation is plain ASCII - use " - " for in-sentence breaks, never an em dash. The β†’ in Libraries entries is the one deliberate exception.

Related Repositories

XH / Hoist framework developers can optionally check out the framework libraries as sibling directories for inline development of the libraries. This is not required for app development.

  • ../hoist-core - Groovy/Java backend framework. Enable per-run with ./gradlew bootRun -PrunHoistInline=true (no tracked-file edit), or persistently via runHoistInline=true in gradle.properties.
  • ../hoist-react - React frontend library. Enable with pnpm startWithHoist from client-app/. To also type-check against the local checkout, uncomment the paths block in client-app/tsconfig.json (re-comment before committing).