Summary
The browse view at https://haikumethod.ai/browse/<provider>/<project>/intent/<slug>/stage/<stage>/ renders "No units in this stage yet" even when the unit .md files are committed to the remote at the canonical path.
Reproduced on
twelve-week-plan-accountability-app intent on gitlab.com/gigsmart/projects/monorepo, product stage. Other stages on the same intent (e.g. design with 9 units) render correctly. Direct GitLab UI link confirms the files exist:
https://gitlab.com/gigsmart/projects/monorepo/-/tree/haiku/twelve-week-plan-accountability-app/main/.haiku/intents/twelve-week-plan-accountability-app/stages/product/units
What rules out the obvious causes
Verified via git ls-tree -r origin/haiku/twelve-week-plan-accountability-app/main:
- 11 product unit
.md files committed at .haiku/intents/twelve-week-plan-accountability-app/stages/product/units/unit-{01..11}-*.md ✓
- 149 total blobs in the intent tree (well under the GraphQL
blobs(first: 500) cap) ✓
- 21 tree nodes, 0 nesting weirdness ✓
- Files byte-identical between
haiku/<slug>/main and haiku/<slug>/development (the active stage branch) ✓
- No haiku//product branch exists, which is correct — discrete mode keeps only one active stage branch at a time ✓
So the bug is NOT pagination, NOT cache staleness, NOT three-level merge logic, NOT FM parser rejection.
Hypothesis
GitLab's GraphQL tree(path:, ref:, recursive: true).blobs(first: 500) may have undocumented depth or breadth limits, OR the parser's blob-prefix filter mishandles something specific about the product unit FM (long quoted outputs: list using YAML folded scalars >- ...).
First diagnostic step
Add temporary logging in website/lib/browse/gitlab-provider.ts:497 (fetchIntentTreeFromRef) to dump:
treeData.project.repository.tree.blobs.nodes.length
- The first/last 5 blob paths
- Whether any path under
stages/product/units/ is in the response
If the GraphQL response does include the product unit paths → parser bug in parseStageFromBlobs at gitlab-provider.ts:567-584.
If the GraphQL response doesn't include them → GraphQL truncation; switch to GitLab REST repository/tree?recursive=true&per_page=100 with explicit pagination.
Affected files
website/lib/browse/graphql/gitlab/operations.ts — GitLabIntentTreeQuery (line 62)
website/lib/browse/gitlab-provider.ts — fetchIntentTreeFromRef (line 482), parseStageFromBlobs (line 549)
Acceptance criteria
Summary
The browse view at
https://haikumethod.ai/browse/<provider>/<project>/intent/<slug>/stage/<stage>/renders "No units in this stage yet" even when the unit.mdfiles are committed to the remote at the canonical path.Reproduced on
twelve-week-plan-accountability-appintent ongitlab.com/gigsmart/projects/monorepo, product stage. Other stages on the same intent (e.g. design with 9 units) render correctly. Direct GitLab UI link confirms the files exist:https://gitlab.com/gigsmart/projects/monorepo/-/tree/haiku/twelve-week-plan-accountability-app/main/.haiku/intents/twelve-week-plan-accountability-app/stages/product/units
What rules out the obvious causes
Verified via
git ls-tree -r origin/haiku/twelve-week-plan-accountability-app/main:.mdfiles committed at.haiku/intents/twelve-week-plan-accountability-app/stages/product/units/unit-{01..11}-*.md✓blobs(first: 500)cap) ✓haiku/<slug>/mainandhaiku/<slug>/development(the active stage branch) ✓So the bug is NOT pagination, NOT cache staleness, NOT three-level merge logic, NOT FM parser rejection.
Hypothesis
GitLab's GraphQL
tree(path:, ref:, recursive: true).blobs(first: 500)may have undocumented depth or breadth limits, OR the parser's blob-prefix filter mishandles something specific about the product unit FM (long quotedoutputs:list using YAML folded scalars>- ...).First diagnostic step
Add temporary logging in
website/lib/browse/gitlab-provider.ts:497(fetchIntentTreeFromRef) to dump:treeData.project.repository.tree.blobs.nodes.lengthstages/product/units/is in the responseIf the GraphQL response does include the product unit paths → parser bug in
parseStageFromBlobsatgitlab-provider.ts:567-584.If the GraphQL response doesn't include them → GraphQL truncation; switch to GitLab REST
repository/tree?recursive=true&per_page=100with explicit pagination.Affected files
website/lib/browse/graphql/gitlab/operations.ts—GitLabIntentTreeQuery(line 62)website/lib/browse/gitlab-provider.ts—fetchIntentTreeFromRef(line 482),parseStageFromBlobs(line 549)Acceptance criteria
twelve-week-plan-accountability-app