Skip to content

feat: add update source button to OpenAPI source detail page#1481

Open
simplesagar wants to merge 1 commit intomainfrom
sagar/age-1291-feat-add-ability-to-update-source-document-for-openapi
Open

feat: add update source button to OpenAPI source detail page#1481
simplesagar wants to merge 1 commit intomainfrom
sagar/age-1291-feat-add-ability-to-update-source-document-for-openapi

Conversation

@simplesagar
Copy link
Member

@simplesagar simplesagar commented Feb 4, 2026

Summary

Adds the ability to update an OpenAPI source document directly from the source detail page. Previously, users could only update a source via the kebab menu on the sources index page, which was non-obvious.

Changes:

  • Added "Update Source" button in the hero header (next to "View Deployment")
  • Added "Update Source" button in the Settings tab under "Source Actions"
  • Both buttons open the existing upload dialog and refresh data on success

Test Plan

  • Navigate to an OpenAPI source detail page
  • Verify "Update Source" button appears in the header
  • Verify "Update Source" button appears in Settings tab
  • Click either button and verify the upload dialog opens
  • Upload a new spec version and verify deployment updates
  • Verify buttons do NOT appear for Function sources

Resolves AGE-1291

🤖 Generated with Claude Code


Open with Devin

Adds the ability to update an OpenAPI source document directly from
the source detail page, addressing the discoverability issue where
users could only update via the kebab menu on the sources index page.

Resolves AGE-1291

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@simplesagar simplesagar requested a review from a team as a code owner February 4, 2026 00:49
@simplesagar simplesagar added the enhancement New feature or request label Feb 4, 2026
@linear
Copy link

linear bot commented Feb 4, 2026

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2026

⚠️ No Changeset found

Latest commit: 0bd212a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

🟡 1 issue in files not directly in the diff

🟡 Race condition: Deploy button enabled before asset upload completes (client/dashboard/src/components/sources/UploadOpenApiDialogContent.tsx:74)

The "Deploy" button in UploadOpenApiDialogContent is enabled as soon as a file is selected, but the actual asset upload happens asynchronously. This creates a race condition where users can click "Deploy" before the upload completes.

Click to expand

How it happens

  1. User selects a file to upload
  2. handleSpecUpload is called, which sets file synchronously (line 223 in UploadOpenAPI.tsx)
  3. The button becomes enabled because !file is now false (UploadOpenApiDialogContent.tsx:74)
  4. The actual upload happens asynchronously via fetch().then() (lines 230-250 in UploadOpenAPI.tsx)
  5. User clicks "Deploy" before the upload completes
  6. createDeployment throws "Asset or file not found" because asset is still undefined (UploadOpenAPI.tsx:273-274)

Actual vs Expected

Actual: Button is enabled when !file || isDeploying || !documentSlug - only checks if file is selected, not if upload is complete.

Expected: Button should also check !asset to ensure the upload has completed before allowing deployment.

Impact

Users will see a "Failed to deploy OpenAPI document" error toast if they click Deploy too quickly after selecting a file. The error is caught and displayed (lines 35-37), but the UX is poor.

Recommendation: Add asset to the destructured values from useUploadOpenAPISteps() and update the disabled condition to disabled={!file || !asset || isDeploying || !documentSlug}

View issue and 3 additional flags in Devin Review.

Open in Devin Review

@github-actions github-actions bot added the preview Spawn a preview environment label Feb 4, 2026
@speakeasybot
Copy link
Collaborator

speakeasybot commented Feb 4, 2026

🚀 Preview Environment (PR #1481)

Preview URL: https://pr-1481.dev.getgram.ai

Component Status Details Updated (UTC)
✅ Database Ready Created and validated 2026-02-06 15:40:07.
✅ Images Available Container images ready 2026-02-06 15:39:48.

Gram Preview Bot

@adaam2
Copy link
Member

adaam2 commented Feb 4, 2026

Hmm this one isn't deploying but i'll take a look at the preview once its been deployed

@simplesagar simplesagar requested a review from adaam2 February 4, 2026 19:21
@adaam2
Copy link
Member

adaam2 commented Feb 5, 2026

🚀 Preview Environment (PR #1481)

Preview URL: https://pr-1481.dev.getgram.ai

Component Status Details Updated (UTC)
❌ Database Blocked Image build timed out 2026-02-05 01:04:33.
❌ Images Failed Timed out after 1171s waiting for images 2026-02-05 01:04:30.
Gram Preview Bot

Hmm still an issue...

@simplesagar simplesagar added preview Spawn a preview environment and removed preview Spawn a preview environment labels Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request preview Spawn a preview environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants