Skip to content

chore(goose2): just goose2 <command> with the addition of just goose2 kill#8570

Merged
matt2e merged 3 commits intomainfrom
today
Apr 16, 2026
Merged

chore(goose2): just goose2 <command> with the addition of just goose2 kill#8570
matt2e merged 3 commits intomainfrom
today

Conversation

@matt2e
Copy link
Copy Markdown
Collaborator

@matt2e matt2e commented Apr 15, 2026

Summary

  • Add a justfile module so that just goose2 <subcommand> works
  • Add a kill recipe to stop the dev server by finding and killing the node process on the derived port based on branch
  • Deduplicate the vite port derivation logic into a single vite_port variable reused across dev, dev-debug, and the new kill recipe

matt2e and others added 3 commits April 16, 2026 09:39
Use just's native `mod` feature to expose ui/goose2 recipes as
`just goose2 <recipe>` from the repo root. This also makes goose2
recipes visible in `just --list --list-submodules`.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Derives the vite port using the same hash-based logic as `just dev`,
finds the process listening on that port, and kills it with SIGKILL
only if the process is `node` (the expected vite dev server).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract the hash-based port computation into a top-level just variable
so dev, dev-debug, and kill all share a single definition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 569869d006

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/goose2/justfile
set -euo pipefail

VITE_PORT={{ vite_port }}
PID=$(lsof -ti :"$VITE_PORT" 2>/dev/null | head -1) || true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the listening PID on the Vite port

Using lsof -ti :"$VITE_PORT" | head -1 can pick any process that has a socket associated with that port (including clients connected to Vite), not necessarily the Node listener. In that case PROC_NAME is often not node, so the recipe exits with “refusing to kill” even though the dev server is still running. This is most likely when the app/browser is connected to the dev server. Filter for the listening socket (for example with TCP LISTEN constraints) before choosing a PID.

Useful? React with 👍 / 👎.

@matt2e matt2e changed the title feat(goose2): improve justfile with kill recipe, port dedup, and subcommand mod chore(goose2): just goose2 <command> with the addition of just goose2 kill Apr 16, 2026
@matt2e matt2e added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit bae26d6 Apr 16, 2026
22 checks passed
@matt2e matt2e deleted the today branch April 16, 2026 00:16
matt2e added a commit that referenced this pull request Apr 16, 2026
Replace inlined pnpm/cargo commands with `just goose2 <recipe>` calls,
matching how block/goose2's Lefthook config delegated to just. This also
fixes the missing pnpm typecheck (now included via `just goose2 check`)
and eliminates drift risk between hooks and justfile recipes.

Pre-commit now uses targeted re-staging of only ui/goose2/ files instead
of `git add -u` which would re-stage all tracked files.

Pre-push replaces six inlined command groups with:
- just goose2 fmt-check
- just goose2 clippy
- just goose2 check
- just goose2 test
- just goose2 build
- just goose2 tauri-check

Rebased onto origin/main to pick up the `mod goose2 'ui/goose2'`
directive added in #8570.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
jh-block added a commit to sunilkumarvalmiki/goose that referenced this pull request Apr 16, 2026
…l-placeholder

* origin/main: (64 commits)
  fix: expand tool calls by default when Response Style is Detailed (aaif-goose#8478)
  fix: create logs dir before writing llm request log (aaif-goose#8522)
  fix: enable token usage tracking and configurable stream timeout for Ollama provider (aaif-goose#8493)
  fix tauri-plugin-dialog version constraint to match other plugins (aaif-goose#8542)
  call goose serve from tauri frontend via goose-acp client (aaif-goose#8549)
  failed the script when bundle:default fails and cleanup "alpha"  (aaif-goose#8580)
  pass globally unique conversation identifier as sessionId in databricks api call (aaif-goose#8576)
  fix: use sqlx chrono decode for thread timestamps instead of manual parsing (aaif-goose#8575)
  docs: remove stale gemini-acp references (aaif-goose#8572)
  show individual untracked files in git changes widget (aaif-goose#8574)
  fix: update publishing flow to include new sdk dir (aaif-goose#8573)
  fix: remove double border on content in chat (aaif-goose#8545)
  chore(goose2): `just goose2 <command>` with the addition of `just goose2 kill` (aaif-goose#8570)
  Lifei/oltp data (aaif-goose#8458)
  Sidebar polish: search copy, dividers, project reorder, fix DnD (aaif-goose#8568)
  remove the workflow_dispatch check (aaif-goose#8563)
  fix: one more rename (aaif-goose#8562)
  fix(desktop): accept self-signed certs from configured external goosed host (aaif-goose#8400)
  alexhancock/npm-bumps (aaif-goose#8557)
  Remove npm publish from release for now (aaif-goose#8558)
  ...
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