Skip to content

Set up Cloud Agent dev environment + fix POSIX build/runtime bugs - #1

Draft
AMDphreak wants to merge 5 commits into
mainfrom
cursor/setup-dev-environment-9f48
Draft

Set up Cloud Agent dev environment + fix POSIX build/runtime bugs#1
AMDphreak wants to merge 5 commits into
mainfrom
cursor/setup-dev-environment-9f48

Conversation

@AMDphreak

@AMDphreak AMDphreak commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What & why

Sets up a reproducible Cloud Agent development environment for the DevCentr monorepo and fixes the cross-platform bugs that blocked building and running the D desktop app on Linux. With these changes a fresh checkout can build the app (app/), run it under a display, and build the Antora docs (docs/).

Environment setup

  • .cursor/environment.json + .cursor/install.sh provision everything the repo needs on the default base image:
    • System libraries for dlangui (OpenGL, SDL2, FreeType, X11) plus fonts.
    • The LDC D compiler + dub, pinned to ldc-1.42.0 (matches CI's ldc-latest line in release.yml), symlinked onto PATH so no source activate is needed.
    • pnpm install for the root docs deps and the app/ catalog deps, then a dub build to verify the toolchain end-to-end.
  • The install script is idempotent so it is safe to re-run against a cached environment.
  • Repo-managed on purpose (config versioned with the code, reviewed here), so it follows branches and PRs.

Code fixes (required to build/run on POSIX)

These paths are only compiled/executed on macOS/Linux, so Windows CI never exercised them:

  1. fix(app) POSIX spawnProcessopenWorkflowTemplatesStore() used spawnProcess("open"/"xdg-open", [url]), which has no matching Phobos overload and failed to compile. Switched to the single args-array form.
  2. fix(app) detection timeoutdetectHostContext() ran catalog detect probes synchronously on the UI thread at startup. A probe such as npx convex --version triggers an on-demand package fetch that never returns, hanging the app before its window opened. Probes now run with a null stdin and a 4s timeout.
  3. fix(app) null context panelToolchainAdvisorPanel segfaulted on startup because a DecisionStepBox fires its change callback from its constructor, reaching refreshContext() before _contextPanel exists. Added a null guard; the explicit post-construction refreshContext() still performs the initial update.

Docs

  • chore(docs) add @antora/lunr-extension devDependency — the committed antora-playbook.yml requires it, but it was missing from package.json, so a plain pnpm install + antora antora-playbook.yml failed with MODULE_NOT_FOUND.

Testing / validation

Environment build: triggered a draft Cloud Agent build of this branch that ran install.sh on a fresh pod — it SUCCEEDED (~2.5 min): system libs → LDC 1.42.0 + dub → pnpm deps → dub build → "Linking DevCentr" → "Setup complete".

App: builds cleanly in --build=debug and --build=release, launches, initializes OpenGL, and renders its full UI. Navigated Home → Browse Projects → Tool Status → Stack Advisor (the page that previously segfaulted) with no crash.

devcentr_app_navigation_demo.mp4

DevCentr app home screen running on Linux

Docs: antora builds 124 HTML pages from the local docs module (remaining warnings are cross-references into the two sibling doc repos, which are not part of this repo's build).

DevCentr Antora docs site rendered

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 5 commits August 28, 2026 08:17
The macOS/Linux branches of openWorkflowTemplatesStore() called
spawnProcess("open"/"xdg-open", [url]), but std.process has no
(program, args) overload, so the app failed to compile on POSIX
(Windows CI never compiled these branches). Pass a single args array.

Co-authored-by: Ryan Johnson <AMDphreak@users.noreply.github.com>
detectHostContext() runs each context's detect command synchronously on
the UI thread at startup. A probe like 'npx convex --version' triggers an
on-demand package fetch that never returns, hanging the app before its
window opens. Run each probe with a null stdin and a 4s timeout, killing
it on expiry, so a slow/hanging probe can no longer block startup.

Co-authored-by: Ryan Johnson <AMDphreak@users.noreply.github.com>
DecisionStepBox fires its onChange callback from its constructor
(selectByIndex), which calls refreshContext() before _contextPanel is
created, causing a null-dereference segfault on startup. Skip the update
until the panel exists; the explicit refreshContext() after construction
still performs the real initial update.

Co-authored-by: Ryan Johnson <AMDphreak@users.noreply.github.com>
antora-playbook.yml requires the @antora/lunr-extension, but it was not
declared in package.json, so 'pnpm install' + 'antora antora-playbook.yml'
failed locally with MODULE_NOT_FOUND. Add it as a devDependency so the
docs site builds from a plain checkout.

Co-authored-by: Ryan Johnson <AMDphreak@users.noreply.github.com>
Add .cursor/environment.json + install.sh to provision the toolchain the
DevCentr monorepo needs: system libs for dlangui (OpenGL/SDL2/FreeType/
X11), the LDC D compiler + dub (matching CI's ldc-latest), and the pnpm
deps for the app catalog and Antora docs, then builds the app to verify.
Also ignore the extensionless Linux build artifact app/DevCentr.

Co-authored-by: Ryan Johnson <AMDphreak@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants