Reviewed PR details, comments, commits, and diffs.
UnderstandAdded missing changelog entry.
EditPushed changes and left contributor comment.
CleanupYou are given one or more GitHub PR URLs: https://github.com/badlogic/pi-mono/pull/1039 im not convinced about moving the renderInitialMessages shit
For each PR URL, do the following in order:
packages/*/CHANGELOG.md files. Report whether an entry exists. If missing, state that a changelog entry is required before merge and that you will add it if the user decides to merge. Follow the changelog format rules in AGENTS.md. Verify:
### Breaking Changes, ### Added, ### Fixed, etc.)Fixed foo ([#123](https://github.com/badlogic/pi-mono/pull/123) by [@user](https://github.com/user))### Breaking Changes, not just ### FixedOutput format per PR: PR: Changelog:
If no issues are found, say so under Bad and Ugly.
still there?
You are given one or more GitHub PR URLs: https://github.com/badlogic/pi-mono/pull/1039 im not convinced about moving the renderInitialMessages shit
For each PR URL, do the following in order:
packages/*/CHANGELOG.md files. Report whether an entry exists. If missing, state that a changelog entry is required before merge and that you will add it if the user decides to merge. Follow the changelog format rules in AGENTS.md. Verify:
### Breaking Changes, ### Added, ### Fixed, etc.)Fixed foo ([#123](https://github.com/badlogic/pi-mono/pull/123) by [@user](https://github.com/user))### Breaking Changes, not just ### FixedOutput format per PR: PR: Changelog:
If no issues are found, say so under Bad and Ugly.
Let me read the linked issue #500 and the current source file:
Let me read more of the file to understand the renderInitialMessages method:
Now let me check the changelog:
Let me check the current setExtensionHeader implementation in the main branch:
Let me check the docs to see if there's anything related to custom headers:
Now I have enough context to provide a complete review.
Changelog:
### Fixed in packages/coding-agent/CHANGELOG.md before merge, e.g.:
- Fixed custom header not displaying correctly with `quietStartup` enabled ([#1039](https://github.com/badlogic/pi-mono/pull/1039) by [@tudoroancea](https://github.com/tudoroancea))Good:
quietStartup enabled, builtInHeader was created but never added to the UI tree, so setExtensionHeader() couldn't find/replace it via ui.removeChild()headerContainer approach is clean and isolates header management from the overall UI child orderingheaderContainer.children[index] replacement is more robust than ui.children.splice(1, 0, ...) which depended on magic indicesthis.headerContainer.addChild(this.builtInHeader); ensuring the header is always in the containerBad:
pkg:coding-agent label on the PRrenderInitialMessages() relocation from run() to init() (before ui.start()) is bundled in without clear justification. The comment says "to avoid layout jump" but this is unrelated to the header container fixUgly:
renderInitialMessages() move could have subtle side effects:
run() also calls renderInitialMessages() in multiple other places (extension commands like /fork, /tree, /new etc.)subscribeToAgent() or initExtensions() that expect messages not to be rendered yet, this could breaksetHeader during session_start may now see different state depending on whether messages were already renderedQuestions or Assumptions:
renderInitialMessages() move actually necessary for the header fix, or was it discovered during debugging? The PR description doesn't mention it.-m flag?session_start?Change summary:
headerContainer: Container field to hold all header-related componentsheaderContainer as first child of ui in init()headerContainer instead of ui directlybuiltInHeader to headerContainer (the actual bug fix)setExtensionHeader to manipulate headerContainer.children by index instead of splicing into ui.childrenrenderInitialMessages() from run() to init() (before ui.start())Tests:
quietStartup: true + custom header extensionRecommendation: The headerContainer fix is correct. The renderInitialMessages() move should be either:
If you want to merge only the header fix without the renderInitialMessages change, the relevant lines to revert are the addition at lines 469-470 and the removal at lines 526-527 in the diff.
merge via gh cli, pull from origin, revert just the renderInitialMessages() shit
well, fuck it, just merge should be ok
The PR is merged but no changelog entry was added. Let me add one:
Done. Merged PR #1039 via squash, added changelog entry, pushed, and left a comment thanking the contributor.
- Fixed custom header not displaying correctly with `quietStartup` enabled ([#1039](https://github.com/badlogic/pi-mono/pull/1039) by [@tudoroancea](https://github.com/tudoroancea))