Skip to content

fix: findings from #102 (header actions, prompt limit, e2e model, Mastra agents, own) - #107

Open
joris-sevenlab wants to merge 6 commits into
fix/pull-fixesfrom
fix/issue-102
Open

joris-sevenlab wants to merge 6 commits into
fix/pull-fixesfrom
fix/issue-102

Conversation

@joris-sevenlab

Copy link
Copy Markdown
Collaborator

What this changes

Fixes the five findings in #102 from a project on battlestack 1.4.0. Stacked on #101, which it builds on for ownership; merge #101 first.

Closes #102.

Why and what

  1. Header actions slot (nuxt4:landing-shell): the landing layout's header has an empty #header-actions target, and its centre slot shows at every width (:ui="{ center: 'flex' }"). The nav menu keeps its old behaviour (hidden lg:flex, mobile menu unchanged), so this differs from the issue's snippet, which dropped both. A page adds an action with <Teleport to="#header-actions" defer>, client-side only. The battlestack-ui skill tells agents to do that instead of editing the layout.
    • The layout is structural, so an existing project owns it and pull never changes it. The pull that crosses landing-shell 1.4.3 lists the two lines to add as a step in REPORT.md, once, and only when the layout has a UHeader without the target.
  2. Prompt limit (nuxt4:prompts): 100,000 characters instead of 10,000 (the column is text). The API now returns the real reason ("Content is longer than 100,000 characters") rather than h3's generic "Validation Error", and the page shows it through serverErrorMessage, as the user-admin pages already do.
  3. AI e2e test (nuxt4:mastra, mastra-admin subtree): sets the model from NUXT_AI_GATEWAY_CHAT_MODEL, which every scaffold's .env defines, instead of a hard-coded openai/gpt-5.6-luna, so a run against a dev server leaves a model its gateway key can use. Skips when unset.
  4. Mastra agents on boot (nuxt4:mastra): calls listAgents() (checked in @mastra/core 1.78; getAgents is gone), falls back to getAgents() for older Mastra, and warns instead of silently registering only default.
  5. own on a path two features track: owning is per path now.
    • own/disown apply to every feature that tracks the path.
    • The writers, obsolete deletion, format reconciliation, doctor, add and remove treat a path owned under any feature as owned. Manifests from the old own need no migration.
    • pull never changes an owned file, edited or not: the overwrite repair puts it back.

Type of change

  • Bug fix
  • New feature or template
  • Refactor with no behaviour change
  • Documentation
  • Build, CI or release tooling

AI assistance

  • No AI agent involved
  • Claude Code
  • Cursor
  • GitHub Copilot
  • Codex
  • Other, named below

Agent, service and model, if you know it: Claude Code, Opus 5.5

How much of this is agent-written?

  • Whole change, reviewed by me before opening
  • Substantial parts, with my own edits on top
  • Small parts, or just the tests or docs
  • Only the commit message or this description

Feature versions

Changelog

  • I added a line under ## Unreleased saying what changes for someone using battlestack
  • Not applicable

Testing

pnpm tsc
pnpm test                                        # 106 files, all passing
BUMP_CHECK_BASE=origin/fix/pull-fixes pnpm bump:check
  • New tests, each red without its fix:

    • own claims a path for both tracking features, and disown releases it.
    • Pull leaves a path owned under another feature untouched.
    • doctor reports no drift for it, and add respects it.
    • The overwrite repair puts back an owned file, edited or not.
    • The header-actions step is listed once, and not again.
  • Prompts: a new e2e case saves a 20,000-character prompt, gets the reason for one over 100,000, and resets the prompt.

  • Points 1 to 4 are template code. CI's scaffold job lints, type-checks and runs them in a real project.

  • pnpm tsc passes

  • pnpm test passes

  • I removed the behaviour each new assertion covers, watched the test fail, and put it back

Checklist

  • Scoped to one concern. Unrelated cleanups are in their own commit or PR
  • Public-facing docs updated where behaviour changed (docs/, README.md)
  • No internal tracker numbers, post-mortem narrative, or internal infrastructure details in the diff
  • Files under packages/*/templates/** are LF
  • No secrets, tokens or real credentials, including in test fixtures

Anything else

`battlestack own` stopped at the first feature tracking a path, so a file
two features track (app/app.config.ts under landing-shell and nuxt-ui) was
"already owned" under one while doctor kept reporting drift under the other
and pull still merged or staged it.

own and disown now act on every feature whose record tracks the path, and
the consumers treat a path owned under any feature as owned: the
drift-aware writers, obsolete-file deletion and format reconciliation
(core), doctor, remove's delete pass, and pull's overwrite repair, which
now restores the local version of an owned file instead of merging into
it. Manifests written by the old own (owned under one feature only) are
handled without a migration.

Refs #102
… files

`battlestack add` now seeds every installed feature's owned paths, so the
added feature's writes skip a path another feature owns instead of staging
it. Pull's overwrite repair no longer puts back an owned file under
--overwrite --force, which takes owned files as confirmed at its prompt.

Refs #102
…ing projects

The layout is structural and owned by the project, so pull never adds the
target to it. The pull that crosses the version that introduced it lists
the lines to add, once.
@joris-sevenlab
joris-sevenlab added this pull request to stack #108 October 20, 2026 08:22

This branch has not been deployed

No deployments
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.

1 participant