LearnNewsExamplesServices
Frontmatter
id16725
titleDashboard SortZone prints eleven debug lines into every consuming app's console
stateClosed
labels
bugairefactoringcore
assigneesneo-opus-grace
createdAtAug 8, 2026, 7:43 PM
updatedAtAug 8, 2026, 8:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/16725
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 8, 2026, 8:50 PM

Dashboard SortZone prints eleven debug lines into every consuming app's console

Closed Backlog/active-chunk-14 bugairefactoringcore
neo-opus-grace
neo-opus-grace commented on Aug 8, 2026, 7:43 PM

Context

Surfaced while reviewing PR #16719, tracing whether adjustItemRectsToParent was actually consumed by the base SortZone. It is — but the grep also returned eleven unguarded console.log calls sitting in shipped framework source.

Recorded there as a [TOOLING_GAP]. Not caused by that PR and not on its inheritance path, which I verified rather than assumed: DockTabSortZone → tab/header/toolbar/SortZone → container/SortZone, whereas DashboardSortZone extends container/SortZone directly. Separate branch. This is independent pre-existing debt and was filed rather than folded into someone else's review.

The Problem

src/draggable/dashboard/SortZone.mjs carries eleven live console.log calls:

 96  console.log('applyAbsolutePositioning', {...})
503  console.log('itemRect', {...})
521  console.log('adjustItemRectsToParent', adjustItemRectsToParent)
556  console.log('startRemoteDrag', draggedItem.id, ...)
567  console.log('parent cleared:', ...)
573  console.log('ownerRect', me.ownerRect)
579  console.log('startRemoteDrag: ownerRect', me.ownerRect)
580  console.log('startRemoteDrag: local coords', ...)
581  console.log('startRemoteDrag: calculated coords', ...)
599  console.log('Creating local drag proxy', config)
603  console.log('Created local drag proxy', me.dragProxy)

These are residue, not instrumentation, and three independent signals say so rather than one:

  1. None is guarded. No debug flag, no log-level check, no conditional. Every one fires unconditionally.
  2. Two log the same value six lines apart. :573 and :579 both print me.ownerRect, with nothing mutating it between them. That is the shape of someone adding a print, scrolling, and adding it again — not of a designed trace.
  3. Memory Core places their origin. A query_raw_memories sweep returns December-2025 sessions debugging this exact file — drag-proxy width and placeholder flex/height defects — whose transcripts contain these very log strings (itemRect, adjustItemRectsToParent false, applyAbsolutePositioning) as the diagnostic output being read at the time. The debugging concluded; the prints stayed.

The user-visible cost: src/dashboard/Container.mjs:146 lazy-imports this class, so any application using dashboard drag gets eleven lines per drag interaction in its console. :521 alone fires on every drag that reaches applyAbsolutePositioning.

Why it will not fix itself: the file has been touched three times since the residue landed — 91ff528 (2026-06-13), 3f526bd (2026-07-14), 81e9045 (2026-07-17) — and every one of those PRs passed through and left all eleven in place. This is not on a path to incidental cleanup.

The Architectural Reality

  • The file is actively maintained, 684 lines, and carries no TODO / FIXME / HACK markers. The console residue is its only flagged debt, which makes this a bounded one-PR cleanup rather than a rehabilitation.
  • There is no logger convention in src/draggable/ — verified by grep; no file in that tree imports or uses Neo.util.Logger. So the fix is deletion, not conversion. Converting these to logger.log would introduce a dependency the directory does not otherwise have, to preserve output nobody asked for.
  • The rest of src/draggable/ is clean and must stay untouched. DragZone.mjs:182 and :347 use console.error for genuine failure reporting (missing main-thread addon; proxy-removal delta failure) — both legitimate and out of scope. container/SortZone.mjs:637 holds one already-commented-out console.log, harmless.
  • No mechanical guard exists. The repository has no ESLint configuration and no no-console rule anywhere; its lint CI jobs are bespoke buildScripts/util/check-*.mjs scripts. Nothing would have caught this, and nothing will catch the next one.

The Fix

Delete the eleven console.log statements from src/draggable/dashboard/SortZone.mjs. Where a statement is the sole body of a block that exists only to hold it, remove the block too. Touch nothing else in the file — this is a subtraction, not a refactor of the drag logic.

Line numbers above are from dev at filing time and must be re-derived with grep -n "console\.log" src/draggable/dashboard/SortZone.mjs before editing; they will drift.

Acceptance Criteria

  • grep -n "console\.log" src/draggable/dashboard/SortZone.mjs returns no live statements.
  • console.error at DragZone.mjs:182 and :347 is untouched — a sweep that removes legitimate error reporting has overshot, and this is the negative control.
  • No behavioural change: the diff contains only deletions of console.log statements and any block that existed solely to contain one. No logic, no config, no control flow.
  • A dashboard drag interaction produces no framework-emitted console output.
  • Existing dashboard/drag coverage stays green at the exact head.

Out of Scope

  • A no-console guard for the repo. It is the right long-term answer, and it is deliberately not bundled here: the repo has no ESLint, so a guard means authoring a new buildScripts/util/check-*.mjs (which triggers structural-pre-flight), and deciding the policy for the other ~50 console.log sites across src/ — which I have not audited and will not assert are residue. Bundling an unaudited 50-site policy decision into an eleven-line deletion would replace a verified cleanup with an unverified one. Worth its own ticket; noted here so the gap is recorded rather than lost.
  • The other console.log occurrences elsewhere in src/ — unaudited, likely a mix of legitimate and residual.
  • console.error / console.warn anywhere, including in this file's directory.
  • Any change to drag, sort, or tear-out behaviour. This ticket removes output only.

Avoided Traps

  • Converting to a logger instead of deleting. The tempting "don't lose the diagnostics" move. It is wrong twice: src/draggable/ has no logger dependency to reuse, and the content is not worth preserving — printing ownerRect twice in six lines is not a trace anyone will read. Deletion is the honest disposition.
  • Widening to a repo-wide console.log sweep. The eleven here are verified residue. The other ~50 are not, and src/util/Logger.mjs's own four are its implementation. A blanket removal would break the logger with a commit message claiming cleanup.
  • Assuming a lint rule already covers this and this is just a coverage gap. #16684 ("Lint workflows must watch every surface their rules scan") is adjacent and could be mistaken for the parent of this. It is not: it concerns CI workflow path coverage for rules that exist. I checked — no no-console rule exists to have coverage of.

Decision Record impact

none — deletion of debug residue amends no ADR authority.

Related

  • PR #16719 — where this surfaced, recorded as [TOOLING_GAP]; explicitly not that PR's responsibility
  • #16684 — adjacent lint-coverage ticket, distinct concern (see Avoided Traps)
  • Consumer: src/dashboard/Container.mjs:146

Live latest-open sweep: checked latest 20 open issues at 2026-08-08T17:37Z; no equivalent found. A2A in-flight claim sweep: 30 most recent messages across all read-states; no overlapping [lane-claim] on src/draggable.

Origin Session ID: 51a81224-c5d4-4b3f-b0ed-764af44d572f

Retrieval Hint: query_raw_memories("dashboard SortZone console.log debug residue December 2025 drag proxy width placeholder flex")

tobiu referenced in commit 14a46a1 - "fix(draggable): remove debug console residue from the dashboard sort zone (#16725) (#16727) on Aug 8, 2026, 8:50 PM
tobiu closed this issue on Aug 8, 2026, 8:50 PM