Skip to content

BINFR-6408: Add pull/push view-bookmarks commands#372

Open
Manjinder Singh (manjindersingh98) wants to merge 7 commits into
mainfrom
add-view-bookmarks
Open

BINFR-6408: Add pull/push view-bookmarks commands#372
Manjinder Singh (manjindersingh98) wants to merge 7 commits into
mainfrom
add-view-bookmarks

Conversation

@manjindersingh98

@manjindersingh98 Manjinder Singh (manjindersingh98) commented Jun 9, 2026

Copy link
Copy Markdown

Ticket

https://celonis.atlassian.net/browse/BINFR-6408

Summary

  • Add pull view-bookmarks and push view-bookmarks commands to transfer view (board) bookmarks between teams.
  • Mirrors the existing analysis bookmarks implementation but targets the blueprint BookmarksTransferController import/export endpoints (/blueprint/api/bookmarks/export|import).
  • New module under src/commands/view/ (auto-discovered by ModuleHandler): manager, manager-factory, command-service, and module registration.
  • Documents the new commands in docs/user-guide/studio-commands.md.

Details

  • pull view-bookmarks --id <boardId> [--type USER|SHARED|ALL] -> GET /blueprint/api/bookmarks/export?boardId=<id>&type=<type> (defaults to USER), writes studio_view_bookmarks_<id>.json.
  • push view-bookmarks --id <boardId> -f <file> -> POST /blueprint/api/bookmarks/import?boardId=<id> (multipart file).

Test plan

  • npm run build compiles cleanly
  • pull view-bookmarks --help / push view-bookmarks --help show expected options
  • Manual end-to-end pull/push against a blueprint environment

Includes-AI-Code: true

Made with Cursor


Note

Low Risk
Follows the established analysis-bookmarks pattern with new blueprint endpoints; scope is CLI asset transfer and covered by unit tests, with no auth or core platform changes in this diff.

Overview
Adds content-cli support to pull and push view (board) bookmarks between teams, parallel to the existing analysis bookmarks flow but wired to blueprint /blueprint/api/bookmarks/export and import.

New pull view-bookmarks takes a board --id and optional --type (USER default, SHARED, or ALL), downloads JSON as studio_view_bookmarks_<boardId>.json. push view-bookmarks posts that file as multipart to the target board. Implementation lives under src/commands/view/ (module registration, command service, manager + factory on BaseManager), with user-guide docs and Jest coverage; test setup aliases node:fs to the existing fs mock.

Reviewed by Cursor Bugbot for commit 9c26621. Bugbot is set up for automated code reviews on this repo. Configure here.

Add `pull view-bookmarks` and `push view-bookmarks` commands to transfer
view (board) bookmarks between teams, mirroring the existing analysis
bookmarks implementation but targeting the blueprint
BookmarksTransferController import/export endpoints
(/blueprint/api/bookmarks).

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI 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.

Pull request overview

Adds new CLI support for transferring view (board) bookmarks via blueprint bookmark import/export endpoints, mirroring the existing analysis bookmarks flow.

Changes:

  • Introduces pull view-bookmarks and push view-bookmarks commands under a new src/commands/view/ module.
  • Implements ViewBookmarksManager + factory/service to call /blueprint/api/bookmarks/export|import and write/read studio_view_bookmarks_<boardId>.json.
  • Updates the user guide with usage examples for the new commands.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/commands/view/view-bookmarks.manager.ts Adds blueprint bookmarks export/import manager (pull/push URLs, file naming, multipart body).
src/commands/view/view-bookmarks.manager-factory.ts Creates/configures the manager, including defaults and file existence validation.
src/commands/view/view-bookmarks-command.service.ts Exposes pull/push methods used by the CLI command handlers.
src/commands/view/module.ts Registers pull view-bookmarks and push view-bookmarks commands and options.
docs/user-guide/studio-commands.md Documents the new view bookmarks commands with example invocations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commands/view/module.ts Outdated
Comment thread src/commands/view/module.ts Outdated
Comment thread src/commands/view/view-bookmarks.manager.ts Outdated
Comment thread src/commands/view/view-bookmarks.manager.ts
Comment thread src/commands/view/view-bookmarks.manager-factory.ts Outdated
Comment thread src/commands/view/view-bookmarks-command.service.ts Outdated
Comment thread docs/user-guide/studio-commands.md Outdated
Comment thread docs/user-guide/studio-commands.md
@roberto-welzel

Copy link
Copy Markdown

Can you also please handle the suggestions from Sonar? I think they make sense

@manjindersingh98 Manjinder Singh (manjindersingh98) changed the title Add pull/push view-bookmarks commands BINFR-6408: Add pull/push view-bookmarks commands Jun 10, 2026
Cover the new pull/push view-bookmarks module, command service, manager,
and manager-factory (100% line/branch coverage) to satisfy SonarCloud
coverage on new code.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/commands/view/view-bookmarks.manager-factory.ts Outdated
Comment thread src/commands/view/view-bookmarks.manager-factory.ts Outdated
Comment thread tests/jest.setup.ts
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@roberto-welzel

Copy link
Copy Markdown

general question: Manjinder Singh (@manjindersingh98) is this endpoint already configured to be accessible via the gateway? otherwise this command won't work


viewBookmarksManager.type = type;
if (filename !== null) {
viewBookmarksManager.fileName = this.resolveFilePath(filename);

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.

fileName

If we assign a path to this property then it should be called filePath imo

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.

5 participants