Skip to content

fix(ask-chat): regenerate an artifact in its own workspace, env and mode - #93

Merged
alberthflores95 merged 1 commit into
mainfrom
fix/artifact-regenerate-own-scope
Oct 27, 2026
Merged

alberthflores95 merged 1 commit into
mainfrom
fix/artifact-regenerate-own-scope

Conversation

@alberthflores95

Copy link
Copy Markdown
Collaborator

Problem

Both regenerate buttons in the artifact viewer (Regenerate, and Apply & Regenerate in the edit panel) sent the sidebar's workspace, env and mode instead of the artifact's. #91 scoped the gallery to the sidebar and closes the viewer when the workspace or env changes, which hid most of it, but:

  • the mode could still change under an open artifact;
  • a regeneration that finished after the sidebar moved reopened the viewer in the wrong scope;
  • any path that kept the viewer open would regenerate a prod artifact from the dev database (on GONAC: QAS, an obsolete copy) while keeping its prod label.

Change

Frontend only (ArtifactsPage.tsx):

  • Both buttons send the artifact's own _request; the edit panel changes name, purpose, data focus and format, never where it runs.
  • A regeneration that finishes after the sidebar moved is saved in its own scope and does not reopen the viewer.
  • Manual (03-artifacts.md): Regenerate and Apply & Regenerate run in the artifact's own workspace, environment and mode.

No backend change: POST /v1/artifact already takes the scope from the request body.

Tests

ask-chat has no test runner: typecheck, lint and build pass. To be checked by hand on the GONAC PoC server.

🤖 Generated with Claude Code

Both regenerate buttons (Regenerate, and Apply & Regenerate in the edit
panel) built the request with the sidebar's workspace, env and mode.
The gallery shows only the sidebar's workspace and env and closes the
viewer when either changes, which hid most of it, but the mode could
still change under an open artifact, and any path that kept the viewer
open would have regenerated a prod artifact from the dev database while
keeping its prod label.

Both now send the artifact's own request: Regenerate unchanged, Apply &
Regenerate with the edited name, purpose, data focus and format only.
A regeneration that finishes after the sidebar moved is saved in its
own workspace and env and no longer reopens the viewer there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alberthflores95
alberthflores95 merged commit 11808d5 into main Oct 27, 2026
14 checks passed
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.

1 participant