Skip to content

Private task link and screenshots - #115

Merged
veronika-tseleva-cleantalk merged 5 commits into
devfrom
private-task-link-screenshot
Jun 19, 2026
Merged

Private task link and screenshots#115
veronika-tseleva-cleantalk merged 5 commits into
devfrom
private-task-link-screenshot

Conversation

@veronika-tseleva-cleantalk

Copy link
Copy Markdown
Contributor

CopilotAI review requested due to automatic review settings June 18, 2026 09:14

CopilotAI 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

This PR adds handling for doBoard “PRIVATE” tasks in the SpotFix widget UI and task-loading pipeline, and improves screenshot generation to avoid transparent backgrounds and to exclude the widget itself from captures.

Changes:

  • Hide/disable task title, comments/actions, and other UI elements when the active task is PRIVATE; exclude PRIVATE tasks from the “All spots” list.
  • Add task_type propagation through task detail aggregation so the UI can branch on PRIVATE.
  • Improve screenshot capture by forcing a non-transparent background color and filtering out the widget element.

Reviewed changes

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

Show a summary per file
FileDescription
js/src/widget.jsFilters PRIVATE tasks from lists and hides/locks down UI for PRIVATE task view.
js/src/main.jsAdds task_type to the object returned by getTaskFullDetails().
js/src/handlers.jsEnsures task details aggregation can proceed even when access is denied.
js/src/fileuploader.jsSets screenshot background color and ignores the widget during capture.
js/src/api.jsAdds access-denied handling for task fetches and extends task_get API parameters.
dist/doboard-widget-bundle.jsRebuilt bundle reflecting the source changes.

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

Comment threadjs/src/api.js
Comment threadjs/src/handlers.js
Comment threadjs/src/widget.js
Comment threadjs/src/widget.js
Comment on lines +1748 to +1752
if(taskDetails.task_type === 'PRIVATE'){
issuesCommentsContainer.innerHTML = `<span style="text-align: center">
This Spot is not available for public viewing. To share it publicly, enable public access in doBoard.com →
Project → Board → Task Settings. Once enabled, the Spot will be accessible to anyone on the Internet.</span>`
}
Comment threadjs/src/api.js Outdated
Comment on lines +256 to +260
const result = await spotfixApiCall(data, 'task_get', accountId);
const tasks = result.tasks.map((task) => ({
taskId: task.task_id,
taskTitle: task.name,
userId: task.user_id,
task_type: task.task_type,
commentsCount: task.comments_count,
taskLastUpdate: task.updated,
taskCreated: task.created,
taskCreatorTaskUser: task.creator_user_id,
taskMeta: task.meta,
taskStatus: task.status,
viewers: task.comments_viewers,
taskToken: task.token
}));
await spotfixIndexedDB.clearPut(SPOTFIX_TABLE_TASKS, tasks);
storageSaveTasksCount(tasks);
return tasks;

if(result.operation_message === 'Access is denied'){
await spotfixIndexedDB.put(SPOTFIX_TABLE_TASKS, {taskId: taskId, task_type: 'PRIVATE', taskMeta:"{}"});
return [];
# Conflicts:
#	dist/doboard-widget-bundle.min.js
#	dist/doboard-widget-bundle.min.js.map
CopilotAI review requested due to automatic review settings June 19, 2026 16:51
@veronika-tseleva-cleantalk
veronika-tseleva-cleantalk merged commit a1f852c into devJun 19, 2026
1 check passed

CopilotAI 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 5 out of 8 changed files in this pull request and generated 4 comments.

Comment threadjs/src/handlers.js
Comment on lines +50 to +63
const tasksData = await spotfixIndexedDB.getAll(SPOTFIX_TABLE_TASKS);
if (!tasksData.find((item) => +item.taskId === +currentActiveTaskId)) {
await getTasksDoboard(params.projectToken, sessionId, params.accountId, params.projectId, null, +currentActiveTaskId)
.then(async (ans) => {
if (ans) {
await getTasksAttachmenDoboard(sessionId, params.accountId, params.projectToken, currentActiveTaskId);
await getTasksCommentsDoboard(sessionId, params.accountId, params.projectToken, currentActiveTaskId);
}
tasks = await spotfixIndexedDB.getAll(SPOTFIX_TABLE_TASKS);
});
} else {
await getTasksAttachmenDoboard(sessionId, params.accountId, params.projectToken, currentActiveTaskId);
await getTasksCommentsDoboard(sessionId, params.accountId, params.projectToken, currentActiveTaskId);
}
Comment threadjs/src/api.js
Comment on lines +82 to +84
if (responseBody.data.operation_message === "Access is denied"){
return {operation_message: "Access is denied"}
}
Comment threadjs/src/api.js
Comment on lines +276 to +282
if(taskId){
await spotfixIndexedDB.put(SPOTFIX_TABLE_TASKS, tasks);
} else {
await spotfixIndexedDB.clearPut(SPOTFIX_TABLE_TASKS, tasks);
}
storageSaveTasksCount(tasks);
return tasks;
Comment threadjs/src/widget.js
Comment on lines 1828 to +1832
hideContainersSpinner();
this.fileUploader.init();
if(taskDetails.task_type !== 'PRIVATE') this.fileUploader.init();

if (taskDetails.task_type === 'PRIVATE') {
const openSpotMenuButton = document.getElementById('openSpotMenuButton');
Sign up for freeto 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.

4 participants

@veronika-tseleva-cleantalk@Glomberg@AntonV1211