Skip to content

feat: improve deployment details and upload handling - #54

Merged
codxbrexx merged 4 commits into
metacall:masterfrom
KanishJebaMathewM:feat/53-deployment-details
Nov 25, 2026
Merged

codxbrexx merged 4 commits into
metacall:masterfrom
KanishJebaMathewM:feat/53-deployment-details

Conversation

@KanishJebaMathewM

Copy link
Copy Markdown
Contributor

Improve Deployment Details and Upload Error Handling

Summary

This PR implements the Launchpad-side improvements for issue #53:

  • Add responsive mobile navigation for Overview, Endpoints, Packages, Config, and Logs in the deployment detail page.
  • Add inline validation, upload, and deployment error messages to the deployment wizard.
  • Prevent duplicate submissions and improve retry/error-state handling.
  • Add regression tests for mobile navigation and deployment wizard error scenarios.

Testing

  • Focused unit tests: 16 passed.
  • Full unit suite: 169 passed across 22 files.
  • Typecheck: passed.
  • Lint: passed.
  • Prettier check for changed files: passed.

The repository-wide formatting check still reports an issue in cli/src/server.ts, which is outside this PR. Playwright E2E tests were not run.

Known limitation — environment variables

The environment-variable portion of issue #53 is not implemented in this PR. The current Launchpad inspection response and installed Protocol Deployment type do not expose deployment environment variables.

Displaying actual values and implementing per-variable masking/reveal controls requires an appropriate backend/Protocol contract change. This PR does not fabricate environment-variable data or claim that requirement is complete.

Scope

This is a partial implementation of issue #53. The issue should remain open until the environment-variable requirement is addressed or the maintainers explicitly revise the acceptance criteria.

Related issue: #53

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@KanishJebaMathewM

Copy link
Copy Markdown
Contributor Author

@codxbrexx Can we review this next?

@codxbrexx

Copy link
Copy Markdown
Collaborator

@KanishJebaMathewM resolve the merge conflicts and run the tests

@KanishJebaMathewM

Copy link
Copy Markdown
Contributor Author

Sure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@KanishJebaMathewM

Copy link
Copy Markdown
Contributor Author

@codxbrexx Ready for review

@codxbrexx

Copy link
Copy Markdown
Collaborator

@KanishJebaMathewM! The mobile navigation and error handling improvements look good overall, but CI is failing on GitHub Actions.

Here are the fixes needed before we can merge:

1. Fix CI Failure — Duplicate role="alert" in DeployWizard

In src/features/deployments/components/DeployWizard/index.tsx, the merge with master left two separate elements rendering role="alert" for deployError (top banner and footer action bar). This causes Vitest to fail with Found multiple elements with the role "alert".

  • Fix: Remove the duplicate error banner from the footer action area (~line 730). Keep the top inline banner.

2. Don't Discard Backend Error Messages

In DeployWizard/index.tsx (getSafeDeployError), isApiError with 400/422 status wipes out error.message and replaces it with generic text ("The FaaS server rejected the request...").

  • Fix: Redact secrets/paths from error.message and show the actual server message so users know what failed (e.g. invalid config, missing runner). Only fall back to generic text if error.message is blank.

3. Hide Header "View Logs" Button on Mobile

In src/features/deployments/pages/DeploymentFunctionPage.tsx, the header still has the "View Logs" button on mobile, which conflicts with the new inline "Logs" tab.

  • Fix: Add hidden md:flex to the header "View Logs" button.

4. Fix ARIA Tab Semantics

In DeploymentFunctionPage.tsx, the mobile section bar uses <nav> with aria-current="page" while the container uses role="tabpanel".

  • Fix: Use role="tablist" on the container and role="tab" / aria-selected={activeSection === section} on the buttons to match the tabpanel.

Ensure all tests pass cleanly

@KanishJebaMathewM

Copy link
Copy Markdown
Contributor Author

@codxbrexx Thanks for the review! I've addressed all the feedback in commit e7975d0:

  1. Duplicate role="alert" in DeployWizard: Removed the duplicate error banner from the footer action area, leaving only the primary top inline alert banner with role="alert".
  2. Preserve Backend Error Messages: Added redactDeployError() to redact sensitive tokens, secrets, and filesystem paths from server error messages. For 400 / 422 API errors, the actual server message is now displayed so users understand the exact reason for rejection (invalid runner, invalid config, etc.), only falling back to generic copy if error.message is blank. Added tests covering message preservation, secret redaction, and fallback.
  3. Hide Header "View Logs" Button on Mobile: Added hidden md:flex to the header "View Logs" button so it doesn't conflict with the inline mobile "Logs" tab.
  4. Fix ARIA Tab Semantics: Updated the mobile section bar in DeploymentFunctionPage.tsx to use role="tablist" on the container and role="tab" / aria-selected={activeSection === section} on each button to match the tabpanel.

Verification:

  • Full unit test suite passes cleanly (217 passed across 25 files).
  • Typecheck (tsc --noEmit) passes with zero errors.
  • ESLint (eslint .) passes with zero warnings/errors.
  • Prettier check on all modified files passes.

Ready for another look!

@codxbrexx

Copy link
Copy Markdown
Collaborator

good work @KanishJebaMathewM

@codxbrexx
codxbrexx merged commit c30da04 into metacall:master Nov 25, 2026
2 checks passed
@codxbrexx codxbrexx mentioned this pull request Nov 28, 2026
7 of 14 tasks
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.

2 participants