Skip to content

feat(DCP-2356): Add AITB Collection Preview command#290

Merged
keyboSlice merged 5 commits intomainfrom
DCP-2356/feat/aitb-collection-preview
Feb 2, 2026
Merged

feat(DCP-2356): Add AITB Collection Preview command#290
keyboSlice merged 5 commits intomainfrom
DCP-2356/feat/aitb-collection-preview

Conversation

@keyboSlice
Copy link
Contributor

@keyboSlice keyboSlice commented Feb 1, 2026

Summary

  • Add collection preview command that opens a collection in the browser for preview before publishing
  • Add support for PROLIFIC_APPLICATION_URL environment variable to override the default application URL

Changes

New Command: collection preview

prolific collection preview <collection-id>

This command:

  • Validates the user has access to the specified collection
  • Opens the collection preview in the default web browser
  • Outputs the URL for easy copy/paste to a different browser

Environment Variable Support

Added PROLIFIC_APPLICATION_URL environment variable (defaults to https://app.prolific.com) to allow overriding the application URL, useful for testing against staging environments.


Ticket: DCP-2356


Note

Low Risk
Adds a new CLI command and a configurable base URL; behavior is additive and only affects URL generation/browser-opening, with minimal impact on existing flows.

Overview
Adds a new prolific collection preview <collection-id> command that validates access via GetCollection, prints a preview URL, and attempts to open it in the user’s default browser (non-fatal if browser launch fails, and shows the feature-access message when the feature isn’t enabled).

Introduces PROLIFIC_APPLICATION_URL (defaulting to https://app.prolific.com with trailing slash trimmed) and centralizes preview URL construction in ui/collection (GetCollectionPreviewPath/GetCollectionPreviewURL), with accompanying unit tests.

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

@keyboSlice keyboSlice requested a review from a team as a code owner February 1, 2026 20:43
Copilot AI review requested due to automatic review settings February 1, 2026 20:43
@prolific-snyk
Copy link

prolific-snyk commented Feb 1, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new prolific collection preview <collection-id> command to open a collection preview page in the user’s browser, and introduces PROLIFIC_APPLICATION_URL to override the default app base URL.

Changes:

  • Added collection preview Cobra command that validates access via GetCollection and opens a preview URL in the browser.
  • Added preview URL/path helpers for collections.
  • Added configurable application base URL via PROLIFIC_APPLICATION_URL (defaulting to https://app.prolific.com).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/collection/collection.go Registers the new preview subcommand under collection.
cmd/collection/preview.go Implements the collection preview command (access check + browser open + output).
cmd/collection/preview_test.go Adds tests for the new preview command behavior and output.
config/config.go Adds PROLIFIC_APPLICATION_URL support and trims trailing slashes.
ui/collection/view.go Adds GetCollectionPreviewPath / GetCollectionPreviewURL helpers using config.
ui/collection/view_test.go Adds tests for the new preview path/URL helper functions.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@script-this script-this left a comment

Choose a reason for hiding this comment

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

:shipit:

@keyboSlice keyboSlice merged commit 47aebe7 into main Feb 2, 2026
5 checks passed
@keyboSlice keyboSlice deleted the DCP-2356/feat/aitb-collection-preview branch February 2, 2026 10:28
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.

3 participants