Skip to content

Fix broken catalog file reference in generated issues#98

Draft
descript-eng-bot wants to merge 1 commit into
mainfrom
cursor/fix-catalog-file-undefined-a2ea
Draft

Fix broken catalog file reference in generated issues#98
descript-eng-bot wants to merge 1 commit into
mainfrom
cursor/fix-catalog-file-undefined-a2ea

Conversation

@descript-eng-bot

Copy link
Copy Markdown

TL;DR

Dependicus-generated issues for catalog-managed dependencies could tell you to Edit `undefined`: (or show empty backticks with no filename). This PR makes the "How to Update" section render sensible instructions even when the catalog file path is unknown.

Why

This was assigned via Linear issue BIX-8547 ("Update electron from 43.1.0 to 43.1.1"). That issue was auto-generated by Dependicus for the Descript monorepoelectron is not a dependency of this dependicus tool repo (confirmed: not in package.json, no pnpm-workspace.yaml, nothing in git history), so the literal version bump can't be applied here.

What can be fixed here is the concrete defect the issue text exhibits: its "How to Update" section reads This dependency is managed in the catalog. Edit `undefined`:. Handlebars renders a missing {{catalogFile}} as empty backticks, and a leaked literal "undefined" string renders verbatim — both produce a broken instruction for the coding agent/human reading the issue.

What changed

  • New normalizeCatalogFile helper (exported from @dependicus/core) that treats missing, empty/whitespace, and the literal "undefined"/"null" strings as "no catalog file".
  • Applied it in both the Linear and GitHub issue-description builders (single-dependency and grouped paths).
  • Guarded the catalog-file phrasing in all four issue templates ({linear,github-issues}/templates/{issue,group}-description.hbs) so they fall back to generic wording when the file is unknown, and still print the exact path (e.g. Edit `pnpm-workspace.yaml`:) when it's known.
  • Tests for the helper and for both issue suites; CHANGELOG.md updated.

Evidence

Rendered from the built package (buildIssueDescription) with the exact BIX-8547 input:

BEFORE (catalogFile = "undefined"):
  This dependency is managed in the catalog. Edit `undefined`:

BEFORE (catalogFile missing):
  This dependency is managed in the catalog. Edit ``:

AFTER (both cases):
  This dependency is managed in the catalog. Update it in the catalog:

AFTER (catalogFile = "pnpm-workspace.yaml", unchanged):
  This dependency is managed in the catalog. Edit `pnpm-workspace.yaml`:

All checks pass locally: mise run pnpm:test (921 tests, incl. 10 new), pnpm run lint, pnpm run typecheck, pnpm run format:check.

Note on the original ask

I did not bump electron, because it doesn't exist in this repository — that part of BIX-8547 belongs to the Descript monorepo. If a maintainer duck-taped this agent onto the wrong pond, just point me at the right repo and I'll waddle over. 🦆

Linear Issue: BIX-8547

Open in Web Open in Cursor 

Catalog-managed dependencies could render a nonsensical "How to Update"
instruction (e.g. "Edit `undefined`:" or empty backticks) when a provider
had no catalog file path available, as seen in Dependicus-generated issue
BIX-8547.

Add a normalizeCatalogFile helper that treats missing, empty, and the
literal "undefined"/"null" strings as absent, apply it in both the Linear
and GitHub issue description builders, and guard the catalog-file phrasing
in all four issue templates so they fall back to generic wording when the
file is unknown. Covers single-dependency and grouped issues, with tests.

Co-authored-by: Eng Bot <descript-eng-bot@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

Development

Successfully merging this pull request may close these issues.

2 participants