Skip to content

Velt/improvements - #23

Merged
rakesh-snippyly merged 2 commits into
mainfrom
velt/improvements
Dec 17, 2025
Merged

rakesh-snippyly merged 2 commits into
mainfrom
velt/improvements

Conversation

@rakesh-snippyly

@rakesh-snippyly rakesh-snippyly commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Type of Change

  • New demo application
  • Bug fix
  • Feature enhancement
  • Documentation update
  • Infrastructure/tooling change
  • Other (please describe):

Monorepo Structure Checklist

If adding a new demo, ensure you've followed the 5-level structure:

  • Placed in correct path: apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/
  • Updated package.json with scoped name: @apps/<framework>-<document>-<library-or-solution>-<demo>
  • Created comprehensive README.md in the demo directory
  • Verified build passes: pnpm --filter <package-name> build
  • Verified dev server runs: pnpm --filter <package-name> dev

Deployment Checklist

If this demo should be deployed:

  • Added/updated Vercel project configuration
  • Updated GitHub Actions workflows (if applicable)
  • Verified deployment paths in CI/CD configs

Testing

  • Tested locally with pnpm -w install && pnpm -w build
  • Verified all affected apps still build
  • Tested dev servers for affected apps

Documentation

  • Updated relevant documentation (if needed)
  • Added demo to master-sample-app (if applicable)
  • Updated deployment docs (if applicable)

Related Issues

Screenshots/Videos

Additional Context


For Reviewers

Demo Location

Path: apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/

Package name: @apps/<...>

How to Test

# Install dependencies
pnpm -w install

# Run the specific demo
pnpm --filter @apps/<package-name> dev

# Build the specific demo
pnpm --filter @apps/<package-name> build

Structure Verification

The demo follows the 5-level hierarchy:

  1. Framework:
  2. Document:
  3. Type:
  4. Implementation:
  5. Library/Solution:
  6. Demo:

Documentation: See README_MONOREPO.md and docs/structure.md for more details on the monorepo structure.


Note

Upgrades the inline-comments demo to a simplified Velt setup with context-aware threads, new UI customizations, layout tweaks, and updated Velt packages.

  • Comments/Collaboration:
    • Add context and composerPosition="bottom" to VeltInlineCommentsSection and VeltCommentTool for job-scoped threads (job-<id>).
    • Remove per-line-item and hidden comment tool/bubble instances in modals; focus comments at job level and sidebar.
    • Initialize document via VeltInitializeDocument without user dependency; set metadata.documentName directly.
    • Reorganize VeltCollaboration to include VeltCustomization; keep VeltComments/VeltCommentsSidebar with shadowDom={false}.
  • UI/Layout:
    • Make header sticky; adjust app to full-height (h-screen, calculated content height).
    • Wrap app with AppProviders in app/layout.tsx; simplify app/page.tsx to a single VeltProvider wrapping VeltCollaboration and DocumentCanvas.
    • Update CommentsSidebar container/ids and padding; tweak table/modal structures accordingly.
  • Sidebar/Notifications & Customization:
    • Replace custom notifications row with <VeltNotificationsTool shadowDom={false} />.
    • Add UI wireframe customizations (VeltCustomization and components) with new styles in ui-customization/styles.css.
  • Document context:
    • Change localStorage key to velt-inline-comments-demo-doc-id; keep URL documentId handling.
  • API:
    • Switch token route to use hardcoded NEXT_PUBLIC_VELT_API_KEY and VELT_AUTH_TOKEN constants.
  • Dependencies:
    • Bump @veltdev/react to ^4.6.5 and @veltdev/types to ^4.6.5; update lockfile accordingly.

Written by Cursor Bugbot for commit 1f3dc31. This will update automatically on new commits. Configure here.

…nts-demo

- Updated @veltdev/react and @veltdev/types to version 4.6.5 in package.json.
- Refactored layout to include AppProviders for user authentication.
- Integrated VeltProvider for collaboration features in the main page.
- Adjusted document ID handling in DocumentContext for better shareability.
- Removed unused Velt comment tools and streamlined comments section in JobDetailModal and ActionModal.
- Enhanced sidebar and header components for improved layout and functionality.
- Added new UI customization components for notifications and sidebar buttons.
- Updated API key handling in token route for consistency.

These changes improve the overall structure and functionality of the demo application.
@vercel

vercel Bot commented Dec 17, 2025 •

Copy link
Copy Markdown

const NEXT_PUBLIC_VELT_API_KEY = process.env.NEXT_PUBLIC_VELT_API_KEY || process.env.VELT_API_KEY || '';
const VELT_AUTH_TOKEN = process.env.VELT_AUTH_TOKEN;
const NEXT_PUBLIC_VELT_API_KEY = "6xTcUFtlYAlCdh11zrKB";
const VELT_AUTH_TOKEN = "bd4d5226050470b6c658054fcdf1092a";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Hardcoded API credentials exposed in source code

The API key and auth token were changed from reading environment variables to hardcoded string values. The VELT_AUTH_TOKEN (bd4d5226050470b6c658054fcdf1092a) is particularly sensitive as it's used to generate authentication tokens via the Velt API. Committing secrets to source control exposes them to anyone with repository access and makes credential rotation difficult.

Additional Locations (1)

Fix in Cursor Fix in Web

// 3. Generate new document ID
docId = `doc-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
localStorage.setItem('velt-demo-document-id', docId);
localStorage.setItem('velt-inline-comments-demo-doc-id', docId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: localStorage key mismatch causes document ID loss

When a document ID comes from a URL parameter, it's stored using the old key 'velt-demo-document-id' (line 48), but when reading from localStorage, the code checks the new key 'velt-inline-comments-demo-doc-id' (line 51). This mismatch means document IDs saved from URL parameters are never retrieved on subsequent visits without the URL parameter, causing a new document ID to be generated instead of using the previously stored one.

Fix in Cursor Fix in Web

@rakesh-snippyly
rakesh-snippyly merged commit 1a54482 into main Dec 17, 2025
17 of 18 checks passed

This branch was successfully deployed

15 active deployments
Preview – sample-apps-ag-grid-comment-aggregation — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-ag-grid-multiple-tools — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-ag-grid-single-tool — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-tanstack-comment-aggregation — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-tanstack-multiple-tools — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-tiptap-comments-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-reactflow-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-tanstack-single-tool — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-tiptap-crdt-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-codemirror-crdt-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-lexical-comments-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-slatejs-comments-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – dashboard-inline-comments-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – sample-apps-dashboard-demo — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
Preview – master-sample-app — 1f3dc317 Deployed Dec 17, 2025 by vercel[bot]
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