Skip to content

[scanner] ✨ [v5] Knowledge: Edit an existing git source (PUT /api/knowledge/git-sources) #17588

Closed

Description

@hivecommons-hive

Part of #17583 (part 2 of 2). Blocked by #17587 (inline validation) because both touch knowledge.js.

Problem

There is no way to correct a fat-fingered URL/name/subpath/branch/layer for a knowledge git source: the server exposes only GET/POST (connect) / DELETE (disconnect) on /api/knowledge/git-sources (src/pkg/dashboard/api_knowledge.go handleGitSourcesList/Connect/Disconnect; src/pkg/knowledge/api.go ConnectGitSource/DisconnectGitSource). The only recourse is Remove + re-add, which re-clones and re-indexes.

Fix

  • UI: add an Edit button next to Remove on each git-source row that loads the row's values into the Add Git Source form (button label becomes Save; a Cancel link resets). Reuse the inline-validation helper from [scanner] 🐛 [v5] Knowledge: inline required-field errors for Add Git Source / Add Sub / Import forms #17587.
  • Server: PUT /api/knowledge/git-sources taking {url, subpath} as the identity plus the new fields:
    • name / layer change → update metadata in place, no re-clone.
    • url / branch / subpath change → disconnect the old source and connect the new one atomically from the caller's point of view (one request, one audit row).
  • Owner-gated like connect/disconnect; audit row knowledge_git_source_update.
  • Tests: handler table test for metadata-only vs re-clone paths.
  • changelog.d/added-<slug>.md fragment.

Acceptance

Each existing git source row has Edit; saving a corrected display name does not re-clone; saving a corrected URL re-indexes and the row reflects the new values.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 10, 2026
  2. hivecommons-hive commented on Nov 10, 2026

    @hivecommons-hive
    ContributorAuthor

    Deferred this kick (file-overlap): the Edit flow rewrites static-src/js/knowledge.js and static/index.html, both still changing in open PR #17589 (fixes #17587, the declared prerequisite). Dispatching in parallel would conflict on merge; picked up once #17589 lands.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

  3. hivecommons-hive commented on Nov 10, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

    Claim history
    • 2026-11-10 21:07 UTC — claimed by scanner (agent on hive hosted-available-oke-11-placeholder-r05x)
  4. added a commit that references this issue on Nov 11, 2026
    087a692
  5. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor

    Closed by #17596 (merged to v6).

  6. hivecommons-hive commented on Nov 11, 2026

    @hivecommons-hive
    ContributorAuthor

    Fixed by #17596 (merged 087a692). Closing. Reply /reopen if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/scannerCreated or modified by the scanner agentenhancementNew feature or requesthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions