Skip to content

feat: add JSON workspace import capability#34

Open
Babin123456 wants to merge 1 commit into
itzzavdhesh:mainfrom
Babin123456:feat/import-workspace-json
Open

feat: add JSON workspace import capability#34
Babin123456 wants to merge 1 commit into
itzzavdhesh:mainfrom
Babin123456:feat/import-workspace-json

Conversation

@Babin123456

@Babin123456 Babin123456 commented Jun 27, 2026

Copy link
Copy Markdown

Related Issue

Closes #23

Summary

This PR implements workspace import capability from JSON files, enabling seamless restoration of exported flowchart diagrams.

Changes Made

  • Added handleImportWorkspace function to App.tsx.
  • Exposed onImportWorkspace prop in CenterCanvasProps.
  • Created a hidden file input element in the canvas toolbar.
  • Added an "Import" button to trigger the input file selector.
  • Implemented file reading and structure checking to parse and validate files.

Testing

  • Tested locally by exporting a flowchart blueprint to a text file.
  • Cleared the canvas, clicked "Import", uploaded the file, and verified the flowchart was correctly restored.

Screenshots

N/A

Impact

Improves workspace mobility and data portability.

Checklist

  • Code follows project standards
  • Tested locally
  • No unrelated changes included
  • Responsive design verified
  • Accessibility considered

Summary by cubic

Add JSON workspace import to restore flowcharts from exported files. Adds an Import button in the canvas toolbar and loads validated blocks into the canvas with feedback.

  • New Features
    • Import from .json or .txt via toolbar button (hidden file input).
    • Parses JSON array or { blueprint: Block[] }; shows error toast on invalid format.
    • On success: loads blocks, selects the first block, clears active parent, and shows a success toast.
    • Adds onImportWorkspace prop to CenterCanvas and handleImportWorkspace in App.

Written for commit 8d55c18. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the itzzavdhesh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

✅ Thanks! This PR is linked to #23 and will close it automatically when merged.

@github-actions github-actions Bot added ELUSOC enhancement New feature or request VETERAN labels Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Babin123456, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 22 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 49b4a45b-6c35-4810-bc51-049ac89a62b8

📥 Commits

Reviewing files that changed from the base of the PR and between 22009dd and 8d55c18.

📒 Files selected for processing (2)
  • src/App.tsx
  • src/components/CenterCanvas.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ELUSOC enhancement New feature or request VETERAN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] [ELUSoC_2026] Add Workspace Import From JSON File

1 participant