Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release playground v2 #247

Merged
merged 9 commits into from
Dec 18, 2024

Conversation

toyamarinyon
Copy link
Contributor

@toyamarinyon toyamarinyon commented Dec 17, 2024

Note

This pull request will be conflict with #241.

Changes

  • Move canary implementation to main playground directory
  • Remove feature flag checks for playgroundV2 and viewFlag
  • Reorganize beta-proto code into prev/ directory
  • Update import paths across codebase
  • Remove unused mock data files

Testing

Create agent

  • Visit /agents
  • Show agents
  • Create a new agent

Move to the playground of the agent

  • Visit /agents
  • Show agents
  • Click an agent
  • Move to the playground of the agent clicked

Execute a node on the playground

  • Visit /p/:agentId
  • Open playground
  • Put on node
  • Generate text with Text generator node

Execute a flow on the playground

  • Visit /p/:agentId
  • Open playground
  • Put on nodes
  • Connect the nodes
  • Execute flow with connected nodes

Updates the main agents page with the V2 implementation featuring:
- Enhanced card-based grid layout
- Last updated timestamp display
- Improved visual styling with gradients
- Direct links to canary view

Removes the separate agents-v2 route and consolidates the functionality into
the main /agents path for a more streamlined experience.
Removes the playgroundV2 feature flag requirement from the canary view,
making it accessible by default. This change indicates the canary version
is now considered stable enough for general use.

Note that the developer mode flag check is still maintained for restricted
functionality.
Adds authorization check to ensure users can only access canary views for
agents within their teams. This improves security by:
- Verifying user team membership before showing agent data
- Returning 404 for unauthorized access attempts
- Handling both missing agents and insufficient permissions consistently

The change enforces proper access control while maintaining a clean user
experience by using notFound() instead of throwing errors.
Simplifies the playground routing by:
- Removing playgroundV2 and view feature flags
- Setting viewFlag permanently to true
- Removing redirect to canary view
- Hardcoding playgroundV2Flag to false for legacy components

This cleanup indicates the V2/canary features are now part of the main
user experience path rather than being feature-flagged.
Relocates the beta-proto implementation to a prev/ directory to clearly
separate it as legacy code while maintaining backwards compatibility.
Changes include:

- Move beta-proto directory to prev/beta-proto
- Update all import paths to reflect new location
- Preserve functionality while better organizing codebase
- Maintain existing database migrations and server actions

This change prepares for the full transition to the new implementation
while safely preserving the old one for reference and compatibility.
Moves canary implementation to be the primary playground experience by:
- Moving all canary components/logic to main playground directory
- Removing mock data files
- Updating import paths across codebase
- Preserving prev/ directory for legacy code

This change completes the graduation of the canary features to production,
making them the default experience while maintaining a clean directory
structure.
@toyamarinyon toyamarinyon requested a review from shige as a code owner December 17, 2024 08:21
Copy link

vercel bot commented Dec 17, 2024

@toyamarinyon is attempting to deploy a commit to the Edge Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
giselle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 0:16am

@shige
Copy link
Member

shige commented Dec 17, 2024

@toyamarinyon Could you fix the deployment errors?

@toyamarinyon
Copy link
Contributor Author

@shige oh, sorry! It seems that the #245 have to be merged.

<CreateAgentButton createAgentAction={createAgentAction} />
<div className="grid gap-[16px] grid-cols-3">
{dbAgents.map((agent) => (
<Link href={`/p/${agent.id}/canary`} key={agent.id}>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Link href={`/p/${agent.id}/canary`} key={agent.id}>
<Link href={`/p/${agent.id}`} key={agent.id}>

Copy link
Member

Choose a reason for hiding this comment

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

@toyamarinyon I cannot open the agent page in /agents. Please check it and try your OAT.

## Changes
- Update agent card links to point to `/p/${agent.id}` instead of `/p/${agent.id}/canary`
- Remove deprecated canary path from navigation
@toyamarinyon
Copy link
Contributor Author

@shige Sorry. I didn't check move to the playground of the agent clicked on the agent list page. I fix and check the following scenarios:

Create agent

  • Visit /agents
  • Show agents
  • Create a new agent

Move to the playground of the agent 🆕

  • Visit /agents
  • Show agents
  • Click an agent
  • Move to the playground of the agent clicked

Execute a node on the playground

  • Visit /p/:agentId
  • Open playground
  • Put on node
  • Generate text with Text generator node

Execute a flow on the playground

  • Visit /p/:agentId
  • Open playground
  • Put on nodes
  • Connect the nodes
  • Execute flow with connected nodes

Copy link
Member

@shige shige left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

app/(playground)/p/[agentId]/page.tsx Outdated Show resolved Hide resolved
@toyamarinyon toyamarinyon merged commit bd4dfb7 into giselles-ai:main Dec 18, 2024
5 checks passed
@toyamarinyon toyamarinyon deleted the release-playground-v2 branch December 18, 2024 00:24
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