Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

style: drop the explanatory comments added with the recent fixes

Andrej Acevski8603d8af5509
diff --git a/apps/api/src/task/controllers/bulk-update-tasks.ts b/apps/api/src/task/controllers/bulk-update-tasks.ts
index aa1b6b229..f25c41f88 100644
--- a/apps/api/src/task/controllers/bulk-update-tasks.ts
+++ b/apps/api/src/task/controllers/bulk-update-tasks.ts
@@ -165,9 +165,6 @@ async function bulkUpdateTasks({
}
case "updateAssignee": {
- // Normalised like the other assignment paths: a blank value unassigns,
- // and a padded id resolves to the user it names rather than being
- // rejected as unassignable.
const assigneeId = value?.trim() || null;
if (assigneeId) {
diff --git a/apps/api/src/task/controllers/import-tasks.ts b/apps/api/src/task/controllers/import-tasks.ts
index 7a7ee1a3f..37129d843 100644
--- a/apps/api/src/task/controllers/import-tasks.ts
+++ b/apps/api/src/task/controllers/import-tasks.ts
@@ -44,8 +44,6 @@ async function importTasks(
),
];
- // Resolved in one query, then applied per task: this endpoint reports mixed
- // successful/failed outcomes, so one bad assignee must not sink the batch.
const assignableIds = await filterAssignableUsers(
assigneeIds,
project.workspaceId,
diff --git a/apps/api/src/time-entry/duration.ts b/apps/api/src/time-entry/duration.ts
index 02c554efc..eb9004065 100644
--- a/apps/api/src/time-entry/duration.ts
+++ b/apps/api/src/time-entry/duration.ts
@@ -1,7 +1,5 @@
import { HTTPException } from "hono/http-exception";
-// time_entry.duration is a Postgres integer; a span beyond this overflows the
-// column and surfaces as a 500 instead of a rejected request.
const MAX_DURATION_SECONDS = 2_147_483_647;
export function resolveDuration(startTime: Date, endTime?: Date) {
diff --git a/apps/api/src/time-entry/index.ts b/apps/api/src/time-entry/index.ts
index 9f8c869bd..65a96e7d3 100644
--- a/apps/api/src/time-entry/index.ts
+++ b/apps/api/src/time-entry/index.ts
@@ -12,9 +12,6 @@ import updateTimeEntry from "./controllers/update-time-entry";
const ISO_TIMESTAMP =
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z|[+-]\d{2}:\d{2})$/;
-// Date.parse accepts 2026-02-30 and silently rolls it to March 2, and accepts
-// non-ISO forms whose meaning depends on the runtime, so the calendar date is
-// checked against a UTC probe rather than trusting the parse.
function isIsoTimestamp(value: string) {
if (!ISO_TIMESTAMP.test(value) || Number.isNaN(Date.parse(value))) {
return false;
diff --git a/apps/api/src/utils/assert-assignable-user.ts b/apps/api/src/utils/assert-assignable-user.ts
index 8531d5368..a563ee4df 100644
--- a/apps/api/src/utils/assert-assignable-user.ts
+++ b/apps/api/src/utils/assert-assignable-user.ts
@@ -4,14 +4,6 @@ import db, { schema } from "../database";
const NOT_ASSIGNABLE = "Assignee is not a member of this workspace";
-/**
- * Resolves which of the given users may be assigned work in a workspace.
- *
- * Membership is checked first because it is the common case; instance admins
- * reach every workspace without holding a membership row, mirroring
- * validateWorkspaceAccess. A user that does not exist is simply absent from the
- * result, so callers cannot tell "no such user" from "not a member".
- */
export async function filterAssignableUsers(
userIds: string[],
workspaceId: string,
diff --git a/apps/api/src/ws/index.ts b/apps/api/src/ws/index.ts
index 41884389b..a71466979 100644
--- a/apps/api/src/ws/index.ts
+++ b/apps/api/src/ws/index.ts
@@ -50,9 +50,6 @@ export function removeUserConnection(userId: string, conn: UserConnection) {
}
export function broadcastToUser(userId: string, message: UserBroadcastMessage) {
- // Local sockets are served directly and never wait on Redis: a publish can
- // succeed while this instance's subscriber is disconnected, which would
- // otherwise lose the notification for users on the publishing instance.
deliverToLocalUserConnections(userId, message);
if (!adapter) {
diff --git a/apps/api/src/ws/redis-broadcast-adapter.ts b/apps/api/src/ws/redis-broadcast-adapter.ts
index 14dd12cc1..9ee438202 100644
--- a/apps/api/src/ws/redis-broadcast-adapter.ts
+++ b/apps/api/src/ws/redis-broadcast-adapter.ts
@@ -99,8 +99,6 @@ export class RedisBroadcastAdapter implements BroadcastAdapter {
console.error("Invalid user broadcast message:", parsed.issues);
return;
}
- // The channel is the authority on the recipient; a payload that
- // disagrees would deliver one user's message to another.
if (channel !== this.channelForUser(parsed.output.userId)) {
console.error("User broadcast channel and payload disagree");
return;