Skip to content

Fix download documentation button by populating repository ID from API response#304

Merged
239573049 merged 3 commits intomainfrom
copilot/fix-documentation-download-button-again
Dec 1, 2025
Merged

Fix download documentation button by populating repository ID from API response#304
239573049 merged 3 commits intomainfrom
copilot/fix-documentation-download-button-again

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

The download button in the repository documentation UI was non-functional because repository.id was always null when handleDownload checked it.

Problem

The fetchDocumentCatalog API returns WarehouseId in the response, but the store never populated the repository state object with this value. The download handler requires repository?.id to call the export endpoint.

Changes

  • web-site/src/stores/repositoryDetail.store.ts: Build and set repository object from API response when fetching document catalog
const repositoryInfo: RepositoryInfo = {
  id: response.WarehouseId || '',
  organizationName: owner,
  name: name,
  address: response.git || '',
  branch: targetBranch,
  // ...
}

set({
  documentNodes: nodes,
  repository: repositoryInfo.id ? repositoryInfo : null
})
  • Added warning log when WarehouseId is missing to aid debugging
Original prompt

This section details on the original issue you should resolve

<issue_title>How to download generated documentation on https://opendeep.wiki/</issue_title>
<issue_description>Image

I saw a download button on each documentation, but it did not work.
How can I download the generated documentation on https://opendeep.wiki/</issue_description>

Comments on the Issue (you are @copilot in this section)

@239573049 > Image > I saw a download button on each documentation, but it did not work. How can I download the generated documentation on https://opendeep.wiki/

The new UI has not yet been implemented with functions.</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Dec 1, 2025
Copilot AI and others added 2 commits December 1, 2025 02:52
Co-authored-by: 239573049 <61819790+239573049@users.noreply.github.com>
… add warning log for missing WarehouseId

Co-authored-by: 239573049 <61819790+239573049@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix download button functionality for generated documentation Fix download documentation button by populating repository ID from API response Dec 1, 2025
Copilot AI requested a review from 239573049 December 1, 2025 02:57
@239573049 239573049 marked this pull request as ready for review December 1, 2025 04:15
Copilot AI review requested due to automatic review settings December 1, 2025 04:15
@239573049 239573049 merged commit a3cf67f into main Dec 1, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the non-functional download documentation button in the repository UI by properly populating the repository state object with the warehouse ID from the API response.

  • Extracts WarehouseId from the document catalog API response and builds a complete RepositoryInfo object
  • Sets the repository state in the store so that handleDownload can access repository.id for the export endpoint
  • Adds defensive logging when WarehouseId is missing to aid in debugging

id: response.WarehouseId || '',
organizationName: owner,
name: name,
description: response.Description || '',
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field name inconsistency: The API response uses lowercase description (line 78 in DocumentCatalogService.cs) but the code accesses response.Description with uppercase 'D'. This will result in description always being an empty string. Use response.description instead to match the API response field name.

Suggested change
description: response.Description || '',
description: response.description || '',

Copilot uses AI. Check for mistakes.
description: response.Description || '',
address: response.git || '',
branch: targetBranch,
status: response.Status,
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field name inconsistency: The API response uses lowercase status (line 84 in DocumentCatalogService.cs from document?.Status), but accessing response.Status with uppercase 'S'. Use response.status to match the actual API response field name.

Suggested change
status: response.Status,
status: response.status,

Copilot uses AI. Check for mistakes.
@239573049 239573049 deleted the copilot/fix-documentation-download-button-again branch January 30, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to download generated documentation on https://opendeep.wiki/

3 participants