Skip to content

Conversation

@AdityaHegde
Copy link
Collaborator

@AdityaHegde AdityaHegde commented Dec 15, 2025

  1. Routing generate data CTA to developer chat if the flag is enabled.
  2. Updating the home page to show new CTAs that make sense for the new flow.
  3. Also updating the home page to who a "generating data" message.

Note: This flips the developer flag for ease of testing. Will be disabled before merging.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@AdityaHegde AdityaHegde marked this pull request as draft December 15, 2025 15:10
@AdityaHegde AdityaHegde mentioned this pull request Dec 30, 2025
8 tasks
@ericokuma
Copy link
Contributor

ericokuma commented Jan 2, 2026

UXQA:

  1. When generating data from non-home page, we only need display the prompt modal if the developer_chat feature flag is disabled. If developer_chat feature flag is enabled, we don't show the prompt modal and instead show the ChatBot
  2. Generate data action should continue with the current conversation for now
  3. I don't see any generating animation. Just a static image: Screenshot 2026-01-02 at 11 07 42 AM
    some things that I don't see from the Figma is that the designs call for some color on the image as well as the text: "✨ Generating your sample data". Also need some padding between the image and the text below:
    Screenshot 2026-01-02 at 11 14 29 AM.
    The image as well as the title text should be pulsing!
  4. Could we use the display names of the demo projects instead of names?
Screenshot 2026-01-02 at 11 31 03 AM

@AdityaHegde AdityaHegde force-pushed the feat/generate-data-to-dev-chat branch from e20b1a7 to d15d162 Compare January 14, 2026 11:17
@AdityaHegde AdityaHegde marked this pull request as ready for review January 15, 2026 14:29
Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

Architecture Feedback

1. "Navigate on AI file write" should be part of the chat infrastructure

The FileWriteListener class and maybeNavigateToGeneratedFile function implement a behavior that belongs in the developer chat infrastructure, not in generate-sample-data.ts. This behavior—navigating to a file when the AI writes it—applies to all developer chat interactions (e.g., "create a new canvas YAML file"), not just sample data generation.

However, auto-navigating on every file write has a UX problem: what happens when the AI creates multiple files? Navigating on each write would be jarring; navigating only on the last write requires the frontend to guess when the AI is "done."

Recommended approach: Introduce a navigate tool that the AI explicitly invokes when it wants to direct the user's attention to a file. This gives the AI control over the UX—it can navigate immediately for single-file operations, or wait until it finishes a multi-file operation and navigate to the primary artifact.

The existing tool-registry.ts can be extended to handle side effects:

export interface ToolConfig {
  renderMode: ToolRenderMode;
  createBlock?: (...) => ToolBlockType | null;
  /** Side effect to run when tool result is received */
  onResult?: (callMessage: V1Message, resultMessage: V1Message) => void;
}

const TOOL_CONFIGS: Partial<Record<string, ToolConfig>> = {
  // ... existing configs ...
  
  [ToolName.NAVIGATE]: {
    renderMode: "inline",
    onResult: (_call, result) => {
      const path = extractPath(result);
      goto(`/files${path}`);
    },
  },
};

This eliminates maybeNavigateToGeneratedFile, FileWriteListener, and the awkward binding pattern in DeveloperChat.svelte.

2. Remove sourceImportedPath.set() calls from sample data generation

The "source imported" modal should not be triggered for files created through the AI chat experience. The chat should propose the next step—we should not have a no-code UX that competes with the AI chat UX. For example, after generating sample data, the AI could prompt: "How does this look? Any adjustments to the data, or would you like me to create a dashboard from this?" This is a richer experience than a static modal.

The current code calls sourceImportedPath.set(path) in both generateSampleDataWithDevChat and generateSampleDataWithOverlay, which triggers the modal. These calls should be removed. FileAndResourceWatcher will continue to handle the modal for user-initiated imports (drag-drop, Add Data modal).

Minor Issues

3. createResource wrapper in CreateExploreDialog.svelte is redundant

The function just forwards to createResourceAndNavigate. The onClick handler can call createResourceAndNavigate directly.

4. Silent catch block in OnboardingWorkspace.svelte:56-58

} catch {
  // no-op
}

This swallows errors silently. Consider logging to console for debuggability.

5. waitUntil condition may be inverted

In generate-sample-data.ts:161-164 and :215-218:

await waitUntil(
  () => !get(conversation.isStreaming) && !get(conversation.streamError),
  -1,
);

This waits until streaming stops AND there's no error. If streamError becomes truthy, the condition !get(conversation.streamError) is false, so the waitUntil never resolves. Should this be || instead of &&?

6. Feature flag default

developer_chat is set to true in runtime/feature_flags.go. The PR description notes this will be reverted before merge.


Developed in collaboration with Claude Code

@AdityaHegde
Copy link
Collaborator Author

AdityaHegde commented Jan 19, 2026

  1. There is no consensus on requirement to only navigate once right now. But I guess it makes sense to only navigate once. Added a tool navigate
  2. This is by requirement, I added it explicitly after a UXQA feedback.

3,4,5. Done

@AdityaHegde AdityaHegde force-pushed the feat/generate-data-to-dev-chat branch from a1f3f72 to bd2ce30 Compare January 19, 2026 06:50
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.

4 participants