Skip to content

feat: templates, usage indicator, wand, approval, logs, help, settings, deploy template, error UI - #1931

Merged
waleedlatif1 merged 2 commits into
stagingfrom
feat/w-3
Nov 12, 2025
Merged

feat: templates, usage indicator, wand, approval, logs, help, settings, deploy template, error UI#1931
waleedlatif1 merged 2 commits into
stagingfrom
feat/w-3

Conversation

@emir-karabeg

@emir-karabegemir-karabeg commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

Summary

Workspace templates UI change, usage indicator added to sidebar, wand for subblocks, logs alignment v0, settings modal, approval for copilot, help modal, and deploy template to create creator profile.

Type of Change

  • New feature

Testing

Solo testing.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Nov 12, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 12, 2025 3:42pm

@emir-karabegemir-karabeg changed the title feat: templates, usage indicator, wand, approvalfeat: templates, usage indicator, wand, approval, logs, help, settings, deploy templateNov 12, 2025
@emir-karabegemir-karabeg changed the title feat: templates, usage indicator, wand, approval, logs, help, settings, deploy templatefeat: templates, usage indicator, wand, approval, logs, help, settings, deploy template, error UINov 12, 2025
@waleedlatif1
waleedlatif1 merged commit f4434e3 into stagingNov 12, 2025
3 checks passed
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR implements several UI enhancements including inline wand controls, usage indicators, and a redesigned template system with workflow previews.

Key Changes:

  • Added inline wand (AI generation) control to sub-block labels with prompt input directly in the label area
  • Integrated usage indicator in sidebar with click-to-settings functionality
  • Redesigned template cards to display workflow canvas previews instead of icon lists
  • Changed workspace templates page from redirect to full server-side rendering with workspace context
  • Restricted sidebar collapse/resize functionality to workflow pages only, enforcing minimum width elsewhere
  • Exported sidebar width constants for reuse across components

Architecture:

  • Wand functionality uses ref-based parent-child communication pattern via WandControlHandlers interface
  • Template cards now normalize arbitrary workflow state into WorkflowState for preview rendering
  • Usage indicator dispatches custom events to trigger settings modal opening

Confidence Score: 4/5

  • This PR is safe to merge with minor areas requiring verification
  • The changes are well-structured with proper error handling and logging. The wand control implementation uses a clean ref-based pattern, and the usage indicator has appropriate fallbacks. The template preview feature properly normalizes workflow state. However, there are no apparent tests for the new functionality, and the custom event-based communication pattern for the usage indicator could be more robust with TypeScript types.
  • Verify that the open-settings custom event listener exists and handles the subscription tab correctly. Test the inline wand functionality thoroughly across different input types (short, long, code) to ensure streaming works correctly.

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/sub-block.tsx4/5Adds inline wand control UI to sub-block labels with prompt input handling, exposing wand handlers via ref
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/usage-indicator/usage-indicator.tsx5/5Enhanced click handler to open settings modal when no onClick prop provided, with proper error handling
apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx4/5Redesigned to display workflow preview canvas instead of icon list, with workspace-aware URL routing
apps/sim/app/workspace/[workspaceId]/templates/page.tsx5/5Changed from redirect to full server-side data loading with workspace-scoped templates, respecting super user mode
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar-new.tsx4/5Added usage indicator display, enforces min width on non-workflow pages, restricts collapse/resize to workflow pages only

Sequence Diagram

sequenceDiagram
participant User
participant SubBlock
participant ShortInput/LongInput/Code
participant WandHook
participant API
Note over User,API: Inline Wand Feature (Label-based AI Generation)
User->>SubBlock: Click wand icon in label
SubBlock->>SubBlock: handleSearchClick()
SubBlock->>SubBlock: setIsSearchActive(true)
SubBlock->>SubBlock: Focus inline input
User->>SubBlock: Type prompt in label input
SubBlock->>SubBlock: handleSearchChange(value)
User->>SubBlock: Press Enter
SubBlock->>SubBlock: handleSearchSubmit()
SubBlock->>ShortInput/LongInput/Code: wandControlRef.onWandTrigger(prompt)
ShortInput/LongInput/Code->>WandHook: generateStream({ prompt })
WandHook->>API: POST /api/wand/generate
WandHook->>ShortInput/LongInput/Code: onStreamStart()
ShortInput/LongInput/Code->>ShortInput/LongInput/Code: setLocalContent('')
loop Streaming chunks
API-->>WandHook: Stream chunk
WandHook->>ShortInput/LongInput/Code: onStreamChunk(chunk)
ShortInput/LongInput/Code->>ShortInput/LongInput/Code: Update localContent
ShortInput/LongInput/Code->>User: Display streamed content
end
API-->>WandHook: Stream complete
WandHook->>ShortInput/LongInput/Code: onGeneratedContent(content)
ShortInput/LongInput/Code->>SubBlock: Content updated
SubBlock->>SubBlock: setSearchActive(false)
Note over User,API: Usage Indicator Feature
User->>UsageIndicator: Click usage indicator
UsageIndicator->>UsageIndicator: handleClick()
alt onClick prop provided
UsageIndicator->>UsageIndicator: Call onClick()
else No onClick prop
UsageIndicator->>Window: dispatchEvent('open-settings')
Window->>SettingsModal: Open with subscription tab
end
Loading

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

25 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
@emir-karabeg
emir-karabeg deleted the feat/w-3 branch November 13, 2025 01:52
Sign up for freeto 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

@emir-karabeg@waleedlatif1