Skip to content

feat(sim-links): create or copy a Sim link from search results and file shares - #9648

Merged
waleedlatif1 merged 2 commits into
stagingfrom
feat/sim-link-from-result
Nov 4, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
feat/sim-link-from-result

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Every returned link's actions menu (Search results, sources under Assistant answers, the Sources panel, search history) gets a Sim link entry when the organization has Sim links on: Copy sim/ when a link already opens that exact address, so we never invite a duplicate, otherwise Create Sim link, which opens the existing form with the address filled in and a name suggested from the title
  • The file share dialog gets the same choice as a footer chip next to Copy link, for a shared file's public address
  • GET /api/organizations/[id]/sim-links takes an exact url filter through the existing list operation, so the lookup keeps the same authorization and unlisted visibility as browsing
  • Shortcuts are scoped to the organization sim/<name> resolves for the session (resolveSimLinkOrganization, the resolver the redirect and extension suggestions use), resolved server-side in the organization and workspace layouts and provided by SimLinkOrganizationProvider; null hides them, so guests and orgs with Sim links off see nothing, and a failed lookup offers nothing rather than risk a duplicate
  • suggestSimLinkName turns a title into a valid lower-case name; simLinkUrl builds the copyable address (the Links page now uses it too)

Type of Change

  • New feature

Testing

  • scripts/test-sim-links-e2e.ts: new check that a destination lookup returns only links opening exactly that address, hides another member's unlisted link, and returns nothing for an unknown address
  • lib/sim-links/validation.test.ts: title to name (case, punctuation, hyphen collapse), cut to the length limit without a trailing hyphen, empty when nothing usable; reverting the lower-casing or the trailing-hyphen trim turns a case red
  • Targeted suites green (77 tests: sim-links, links page, share modal, message sources, search results)
  • Lookup only runs when a menu opens or the share dialog shows an active share, so long result lists make no extra requests
  • /cleanup and /simplify passes applied

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 4, 2026 1:06am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds Create Sim link and Copy Sim link actions to source menus and shared-file dialogs.

  • Source and file-share actions now create or copy Sim links.
  • Sim-link listings can now filter links by exact destination.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Organization or workspace layout] --> B[Resolve session organization]
  B --> C[SimLinkOrganizationProvider]
  C --> D[Source menu or file-share chip]
  D --> E[Look up exact destination]
  E --> F{Lookup result}
  F -->|Existing link| G[Copy /sim/name]
  F -->|No link| H[Open prefilled create form]
  F -->|Error| I[Hide shortcut]
Loading

Reviews (2) · Last reviewed commit: "fix(sim-links): scope result shortcuts t..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 16 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-links/validation.ts Resolved
Comment thread apps/sim/lib/sim-links/repository.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 16 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 04e6a89 into staging Nov 4, 2026
82 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/sim-link-from-result branch November 4, 2026 01:31

This branch was previously deployed

1 inactive deployment
Preview — 8af01976 Deployed Nov 4, 2026 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.

1 participant