Skip to content

chore: Add new docked layout and move inspector to the side - #91

Merged
tlgimenes merged 3 commits into
mainfrom
chore/inspect-docked
Apr 17, 2025
Merged

tlgimenes merged 3 commits into
mainfrom
chore/inspect-docked

Conversation

@tlgimenes

@tlgimenes tlgimenes commented Apr 17, 2025 •

Copy link
Copy Markdown
Contributor

Integration Form Refactoring and UI Improvements

Overview

This PR introduces significant improvements to the integration management system, focusing on form handling, UI components, and error management. The changes streamline the integration creation and editing process while enhancing the user experience.

Key Changes

1. Integration Form Refactoring

  • Refactored DetailForm component to use form context for better state management
  • Removed separate "new" integration route in favor of a unified form approach
  • Simplified form submission logic to focus on updates only
  • Improved form validation and error handling

2. UI/UX Improvements

  • Enhanced icon upload interface with better visual feedback
  • Improved connection type selection and configuration
  • Added loading states and spinners for better user feedback
  • Implemented responsive grid layouts for better mobile experience

3. Error Handling

  • Added error boundary implementation for better error recovery
  • Introduced error fallback UI components
  • Improved error messaging and user feedback
  • Added alert dialogs for error notifications

4. Code Structure

  • Removed redundant new.tsx component
  • Improved component organization and separation of concerns
  • Added context-based state management
  • Enhanced type safety throughout the codebase

5. Integration Creation Flow

  • Streamlined integration creation process
  • Added direct creation from the integrations list
  • Improved navigation between integration views
  • Enhanced breadcrumb navigation

Technical Details

  • Updated SDK hooks to support partial integration creation
  • Implemented proper loading states and error boundaries
  • Enhanced form validation and submission logic
  • Improved component composition and reusability

Testing Notes

  • Test integration creation and editing flows
  • Verify error handling and recovery
  • Check responsive layouts across different screen sizes
  • Validate form submission and data persistence

Breaking Changes

  • Removed /integration/new route in favor of direct creation
  • Changed integration creation API to accept partial objects

Dependencies

  • No new dependencies added
  • Updated existing dependencies to support new features

This PR significantly improves the integration management system's reliability, user experience, and maintainability while reducing code complexity and improving error handling.

@tlgimenes
tlgimenes merged commit 37a72db into main Apr 17, 2025
nicacioliveira pushed a commit that referenced this pull request Aug 7, 2026
Nothing publishes to the L2 store today, so it is permanently empty: a sandbox
pod's mount is read-only by design. This adds the missing half — a DaemonSet
that carries goldens from a node's L1 hostPath into the shared store.

WHY NOT A SIDECAR IN THE SANDBOX POD. Writing a store shared across nodes needs
write access, and a sandbox runs untrusted code: a package manager installs
cached content as-is, so a tenant able to write it could poison another node's
boot. The tenant's write path therefore stops at its own node's hostPath, which
is already the accepted trust domain there. What that buys over a sidecar:

- the sandbox PodSpec is untouched — no per-pod request, no effect on how many
  sandboxes pack onto a node (which #91 just tuned), and nothing new that can
  degrade the health probe Studio tears the pod down on.
- the writable mount exists once per node in infrastructure, not inside every
  tenant's pod.
- CPU is capped (50m/500m) without competing with a user's dev server. The
  compression is the expensive part and no boot waits on it.

Asserted in the rendered output: the SandboxTemplate never references the
writable claim, and the DaemonSet mounts the hostPath read-only.

KEYED BY ORG, which is what makes fleet-wide publishing acceptable. A repo hash
comes from the clone URL, so two orgs cloning the same public template collide
on one key — node-locally that is a single trust domain, fleet-wide it would let
one org's tree restore into another's sandbox. The daemon stamps the org beside
each golden and a golden without one is SKIPPED rather than uploaded under an
unscoped key, so an archive with an unknown owner cannot exist.

WHAT IT UPLOADS is not configurable, and cannot be. Sandboxes are multi-tenant
and run third-party code, so the set of (repo, lockfile) pairs is unknowable
ahead of time — there is no list to curate and no image to pre-bake. It forwards
what a real boot produced and the daemon already judged healthy enough to
publish node-locally.

Same binary as the daemon, via a `golden-uploader` subcommand: the archive
format lives in internal/setup, which Go's internal rule keeps unimportable from
outside the module, and reusing the sandbox image means no second artifact to
build or keep in lockstep. It is not the daemon — no HTTP server, no lifecycle,
no tenant.

Cost, for the record: one PUT per (org, repo, lockfile) across the whole fleet,
because an existing key is a HEAD and a skip. Everything after that is
compression CPU, which is why the limit is low and the sweep is sequential.

Tests use real files and real tar/zstd: upload keyed by org, skip without
provenance, steady-state sweep that recompresses nothing, an archive that
actually restores on a cold root, two orgs on one repo getting separate
archives, in-flight publishes skipped, and both no-op paths. 26 tests pass in
internal/setup.

Chart 0.12.0, default off. Requires depsCache.enabled + depsCache.remote.enabled
and a writable volume source; the dynamic storageClassName path must supply
goldenUploader.pvcName, since a StorageClass cannot express the
read-only/read-write split this relies on.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
nicacioliveira pushed a commit that referenced this pull request Aug 10, 2026
Nothing publishes to the L2 store today, so it is permanently empty: a sandbox
pod's mount is read-only by design. This adds the missing half — a DaemonSet
that carries goldens from a node's L1 hostPath into the shared store.

WHY NOT A SIDECAR IN THE SANDBOX POD. Writing a store shared across nodes needs
write access, and a sandbox runs untrusted code: a package manager installs
cached content as-is, so a tenant able to write it could poison another node's
boot. The tenant's write path therefore stops at its own node's hostPath, which
is already the accepted trust domain there. What that buys over a sidecar:

- the sandbox PodSpec is untouched — no per-pod request, no effect on how many
  sandboxes pack onto a node (which #91 just tuned), and nothing new that can
  degrade the health probe Studio tears the pod down on.
- the writable mount exists once per node in infrastructure, not inside every
  tenant's pod.
- CPU is capped (50m/500m) without competing with a user's dev server. The
  compression is the expensive part and no boot waits on it.

Asserted in the rendered output: the SandboxTemplate never references the
writable claim, and the DaemonSet mounts the hostPath read-only.

KEYED BY ORG, which is what makes fleet-wide publishing acceptable. A repo hash
comes from the clone URL, so two orgs cloning the same public template collide
on one key — node-locally that is a single trust domain, fleet-wide it would let
one org's tree restore into another's sandbox. The daemon stamps the org beside
each golden and a golden without one is SKIPPED rather than uploaded under an
unscoped key, so an archive with an unknown owner cannot exist.

WHAT IT UPLOADS is not configurable, and cannot be. Sandboxes are multi-tenant
and run third-party code, so the set of (repo, lockfile) pairs is unknowable
ahead of time — there is no list to curate and no image to pre-bake. It forwards
what a real boot produced and the daemon already judged healthy enough to
publish node-locally.

Same binary as the daemon, via a `golden-uploader` subcommand: the archive
format lives in internal/setup, which Go's internal rule keeps unimportable from
outside the module, and reusing the sandbox image means no second artifact to
build or keep in lockstep. It is not the daemon — no HTTP server, no lifecycle,
no tenant.

Cost, for the record: one PUT per (org, repo, lockfile) across the whole fleet,
because an existing key is a HEAD and a skip. Everything after that is
compression CPU, which is why the limit is low and the sweep is sequential.

Tests use real files and real tar/zstd: upload keyed by org, skip without
provenance, steady-state sweep that recompresses nothing, an archive that
actually restores on a cold root, two orgs on one repo getting separate
archives, in-flight publishes skipped, and both no-op paths. 26 tests pass in
internal/setup.

Chart 0.12.0, default off. Requires depsCache.enabled + depsCache.remote.enabled
and a writable volume source; the dynamic storageClassName path must supply
goldenUploader.pvcName, since a StorageClass cannot express the
read-only/read-write split this relies on.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
nicacioliveira pushed a commit that referenced this pull request Aug 10, 2026
…#5843)

* feat(sandbox): carry orgId to the daemon and stamp it on the golden

The golden's path carries only a repo hash, derived from the clone URL. That is
enough node-locally, where the cache is one trust domain, but not for a store
shared across nodes: two organizations cloning the same public template land on
the same key, so an archive published by one would restore into the other's
sandbox.

The daemon is the only process holding both facts — the org from Studio's config
push and the golden it writes — so it records them together. A golden with no
readable org is ineligible for the shared tier, which is the safe default.

orgId already reached buildConfigPayload via EnsureOptions.tenant; it was simply
never put on the wire. Inverted the test that asserted the operator-only payload,
since the org is now sent too.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* feat(sandbox): node-level uploader that fills the shared golden store

Nothing publishes to the L2 store today, so it is permanently empty: a sandbox
pod's mount is read-only by design. This adds the missing half — a DaemonSet
that carries goldens from a node's L1 hostPath into the shared store.

WHY NOT A SIDECAR IN THE SANDBOX POD. Writing a store shared across nodes needs
write access, and a sandbox runs untrusted code: a package manager installs
cached content as-is, so a tenant able to write it could poison another node's
boot. The tenant's write path therefore stops at its own node's hostPath, which
is already the accepted trust domain there. What that buys over a sidecar:

- the sandbox PodSpec is untouched — no per-pod request, no effect on how many
  sandboxes pack onto a node (which #91 just tuned), and nothing new that can
  degrade the health probe Studio tears the pod down on.
- the writable mount exists once per node in infrastructure, not inside every
  tenant's pod.
- CPU is capped (50m/500m) without competing with a user's dev server. The
  compression is the expensive part and no boot waits on it.

Asserted in the rendered output: the SandboxTemplate never references the
writable claim, and the DaemonSet mounts the hostPath read-only.

KEYED BY ORG, which is what makes fleet-wide publishing acceptable. A repo hash
comes from the clone URL, so two orgs cloning the same public template collide
on one key — node-locally that is a single trust domain, fleet-wide it would let
one org's tree restore into another's sandbox. The daemon stamps the org beside
each golden and a golden without one is SKIPPED rather than uploaded under an
unscoped key, so an archive with an unknown owner cannot exist.

WHAT IT UPLOADS is not configurable, and cannot be. Sandboxes are multi-tenant
and run third-party code, so the set of (repo, lockfile) pairs is unknowable
ahead of time — there is no list to curate and no image to pre-bake. It forwards
what a real boot produced and the daemon already judged healthy enough to
publish node-locally.

Same binary as the daemon, via a `golden-uploader` subcommand: the archive
format lives in internal/setup, which Go's internal rule keeps unimportable from
outside the module, and reusing the sandbox image means no second artifact to
build or keep in lockstep. It is not the daemon — no HTTP server, no lifecycle,
no tenant.

Cost, for the record: one PUT per (org, repo, lockfile) across the whole fleet,
because an existing key is a HEAD and a skip. Everything after that is
compression CPU, which is why the limit is low and the sweep is sequential.

Tests use real files and real tar/zstd: upload keyed by org, skip without
provenance, steady-state sweep that recompresses nothing, an archive that
actually restores on a cold root, two orgs on one repo getting separate
archives, in-flight publishes skipped, and both no-op paths. 26 tests pass in
internal/setup.

Chart 0.12.0, default off. Requires depsCache.enabled + depsCache.remote.enabled
and a writable volume source; the dynamic storageClassName path must supply
goldenUploader.pvcName, since a StorageClass cannot express the
read-only/read-write split this relies on.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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