Repository navigation
feat(git): add description to linked repositories - #658
Conversation
Adds a free-text description (max 1000 chars) set when linking a
repository and editable via PATCH /projects/{id}/git/repositories/{repositoryId}
(git:write). It is shown to agents as fenced untrusted text so they can
pick the right repository.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The description helps an agent choose the right repository. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Optional description when linking a repository, inline editing on each repository row, and strings for all locales. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An unbroken description (no spaces) overflowed the repository row and caused horizontal scrolling in Git settings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Please note: all the translations were done by Claude and need to be checked. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This adds an optional, member-written description to linked Git repositories and surfaces it to people (web settings) and agents (prompt + MCP). I read the full diff plus the surrounding store/service/prompt/router/web code.
- Migration
000076— addsdescription TEXT NOT NULL DEFAULT ''togit_repositories;ADD COLUMN IF NOT EXISTS, and the number is the next free one after000075. - Domain/store —
Repository.Description;SetRepositoryDescriptionscoped byproject_id(returnsErrNotFoundfor another project's repo); column list, insert and record mapping updated in lockstep. - Service —
normalizeDescriptiontrims and caps atMaxDescriptionRunes(1000, rune-counted) →ErrDescriptionTooLong; enforced on both link and the newUpdateRepository. - HTTP — optional
descriptionon link; newPATCH /projects/{id}/git/repositories/{repoId}behindgit:write;GIT_DESCRIPTION_TOO_LONGmapped to400in the presenter and to a UI string inSETUP_ERROR_KEYS. - Agents — the description rides in the event prompt only when non-empty, inside one
fenceText/neutralizeUNTRUSTEDfence; MCPlist_repositoriesappends it collapsed to one line, with the tool description framing it as information, never instructions. - Web — link-form textarea plus an inline per-row editor (
canWrite-gated), wrapping for long unbroken text, and strings in all 9 locales. - Docs/tests —
git-agent-workflow.md,ALL_TOOLS.md, and Go/MCP/Web tests updated.
The untrusted-text handling matches the repo's existing convention, and the interface additions (Store, handler GitService) were carried through to the test fakes. The two limitations the author called out (description not restored across the install redirect; the shared fenceText header wording) are accurate and I agree they are not blockers.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
pikann
left a comment
There was a problem hiding this comment.
LGTM! Thank you for the contribution! 🚀
Resolve conflicts with the repository description (Paca-AI#658) and the task-ref parser fix (Paca-AI#657): both sides added to the same places. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

What
Adds an optional
descriptionto linked Git repositories, so an agent in a project with several repos can tell which one(s) to work in. Today that context lives only in the project Docs.How
000076:ALTER TABLE git_repositories ADD COLUMN IF NOT EXISTS description TEXT NOT NULL DEFAULT ''. 000073 is untouched; since v0.20 is not released yet, this could be folded into 000073 if you prefer.descriptionon link; newPATCH /projects/{id}/git/repositories/{repositoryId}(git:write);descriptionin the repository response. It is trimmed and capped at 1000 characters; over the cap returns 400GIT_DESCRIPTION_TOO_LONG, mapped inpresenter/response.goandapps/web/src/lib/api-error.ts.fenceText/neutralize. MCPlist_repositoriesreturns it (collapsed to one line) and its tool description says to use it to pick the right repo.git:write), strings in all 9 locales. Long unbroken descriptions wrap instead of overflowing the row.docs/ai-agent/git-agent-workflow.md.Tests / checks
services/api:go vet ./...andgo test ./...pass; store tests, including migration 000076, also run against a throwaway Postgres 16.apps/web:tsc -bclean,biome checkno errors, vitest 1353/1354 on the first full run. The one failure was a timeout inProjectRoleFormDialog.test.tsxunder load; it passes on its own (34/34).apps/mcp: build OK, vitest 31 files / 732 tests.biome check srcreports 3 errors inworkspace.test.ts,ask-tools.test.tsandconverters.ts; they also occur without this change.list_repositories. The 1000-character boundary was checked through the API (1000 saved, 1001 gives 400).apps/e2e).Notes
fenceTextunchanged.git:writegate test covers it, as for DELETE.Refs #649
🤖 Generated with Claude Code