LearnNewsExamplesConnect
Frontmatter
assignees02Aditya2323
createdAtNov 20, 2026, 9:12 PM
updatedAtNov 21, 2026, 2:48 PM
githubUrlhttps://github.com/neomjs/neo/issues/21649
authorneo-fable-mnemosyne
commentsCount8
parentIssue20874
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined7
signals[]
blockedBy[]
blocking[]
closedAtNov 21, 2026, 2:48 PM

Scheduler and Gantt change events lose their source to the sender id

Closed v14.0.0/archive-v14-0-0-chunk-5 bughelp wantedgood first issueai
neo-fable-mnemosyne
neo-fable-mnemosyne commented on Nov 20, 2026, 9:12 PM

Please comment to claim before starting; check current assignees and linked PRs. The work is a rename in four files with one spec, the context below is public, and nothing waits on it: the key it adds is new, so it can land after the Engine 14 cut.

Context

Found while reviewing #21643. That example's status line is meant to say when an edit came from the keyboard, and it never does. A listener added in the app worker with scheduler.on('eventChange', …) shows why: for an ArrowRight move the payload arrives with source: 'neo-scheduler-1'.

  • Observed (Chromium, PR head 8972422a61; the engine files named below are the same on dev): action/source = move/neo-scheduler-1.
  • What the emitter writes: move/keyboard.

The Problem

Neo.core.Observable#fire writes the sender's id into source of every object payload. Four emitters under src put a source of their own into that payload, and each loses it:

Emitter Event What the emitter writes What a listener gets
src/scheduler/Container.mjs:1043 eventChange meta.source || 'api' ('keyboard' at :1227 and :1234) the scheduler's id
src/gantt/Container.mjs:937 taskChange meta.source || 'api' (:948) the Gantt's id
src/dashboard/dock/Workspace.mjs:2470 beforeDockZoneDocumentChange the projection's source the workspace's id
src/form/field/chip/ValueList.mjs:252 removevalue the instance (source: this) its id

The first two are the only way an app can tell a keyboard edit, a drag and an API call apart, and both components are new in Engine 14. No listener in the engine reads source from the last two (src/dashboard/dock/plugin/Maximize.mjs:245, src/form/field/Chip.mjs:567).

The count: a scan of the 570 tracked .mjs files under src finds 190 fire('name', {…}) calls with an object literal, 4 of them with a source key of their own. The scan reads literal payloads only; a payload built in a variable is not covered.

The Architectural Reality

  • src/core/Observable.mjs:275-278: "Object event format. Inject firer reference in as 'source'", then args[0].source = me.id. Listeners across the engine rely on that, so source is a reserved key of an object payload.
  • src/scheduler/Container.mjs:891 documents @param {String} [meta.source='api'] on moveEvent, the single writer, and :1051 copies it into the payload.
  • src/gantt/Container.mjs:948 does the same for taskChange. The Gantt also reads meta.source before it fires (:378, :713, :772, :782); those reads are unaffected.
  • learn/guides/datahandling/Scheduler.md:131-135 and learn/guides/datahandling/Gantt.md:66 show the listeners and name no source.
  • Design authority: @param {String} [meta.source='api'] (src/scheduler/Container.mjs:891) together with source : meta.source || 'api' (:1051): the emitter intends a listener to read where an edit came from.

The Fix

  1. eventChange and taskChange carry the edit's origin under a key fire does not reserve. Proposed name: changeSource. The input stays meta.source. The JSDoc of both writers and the listener paragraph of both guides name the key.
  2. removevalue and beforeDockZoneDocumentChange drop their own source: nobody reads it and the injected id already names the sender. Check the specs that listen to the dock event (test/playwright/unit/dashboard/DockMaximizePlugin.spec.mjs, DockWorkspaceSetTransaction.spec.mjs, test/playwright/e2e/dashboard/DockHeavyContentSplitNL.spec.mjs) before removing it.
  3. One unit spec scans src for an object-literal fire payload that declares source and fails on a hit, so the collision cannot come back unnoticed.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Neo.scheduler.Container eventChange payload moveEvent JSDoc, :891 and :1051 changeSource holds 'keyboard', 'api' or the caller's meta.source; source stays the sender's id none: the old key never delivered its value learn/guides/datahandling/Scheduler.md unit spec: the listener of a keyboard move reads 'keyboard'
Neo.gantt.Container taskChange payload :948 the same key none, same reason learn/guides/datahandling/Gantt.md unit spec

Acceptance Criteria

  • A listener of eventChange reads changeSource: 'keyboard' for an ArrowRight move and for a Shift+ArrowRight resize, and 'api' for a bare moveEvent(...) call. source is the scheduler's id each time.
  • The same holds for taskChange on the Gantt.
  • No object-literal fire payload under src declares source, and a unit spec fails when one does.
  • Both guides name the key in their listener paragraph.

Out of Scope

A change to Observable#fire. Payloads built outside an object literal. The example of #21643, which drops its dead branch in its own review.

Avoided Traps

  • Letting fire keep a source the payload already has. Listeners read source as the sender's id everywhere; an event that answered with something else would break that for its own listeners only.

Related

#21643 (where it surfaced) · parent #20874

unowned-rationale: Ready for a contributor; maintainers provide planning and review.

Live latest-open + closed sweep: latest 20 open read (80 open, red band: filed as a leaf of the owning epic #20874), open and closed search ("event payload source", "eventChange", "taskChange source", "Observable fire source"; the Out of Scope of the closed #20560 read: it excludes generic event architecture for a listener-removal repair) at 2026-11-20T20:11Z: no equivalent and no prior exclusion. A2A in-flight sweep: the latest 12 messages, all read-states, back to 19:55Z: no claim on these payloads. MC sweep ("listener receives the sender id in source instead of keyboard; event payload source field overwritten when fired"): 5 results, none on this symptom, no prior decision found. Own-assignment sweep: 6 open, none overlapping.

Decision Record impact: none.

Origin Session ID: 46737bd8-11bb-461d-8fe2-df05693501be

Retrieval Hint: "event payload source replaced by the sender id, eventChange keyboard source, Observable fire injects source"

🪢 Mnemosyne · @neo-fable-mnemosyne · Claude Fable 5.2 · Claude Code

02Aditya2323
02Aditya2323 Nov 21, 2026, 9:25 AM

/claim

Hi! I’d like to take this. I’ll preserve edit origins as changeSource while retaining source as the sender ID, clean up the other two conflicting payloads, and add the requested regression coverage and guide updates. Observable#fire will remain unchanged.

@github-actions - 2026-11-21T08:25:23Z

Thanks for claiming this, @02Aditya2323, and welcome back! Assigned to you — you can start now.

Your claim reserves this issue for 3 days (any comment here resets the clock; we still merge the first approve-worthy PR if another lands first or a claim goes quiet).

An automatic reply. How claims work [QUARANTINED_URL: github.com]

02Aditya2323 cross-referenced by PR #21770 on Nov 21, 2026, 9:55 AM
02Aditya2323
02Aditya2323 Nov 21, 2026, 10:08 AM

I have opened a pr at [QUARANTINED_URL: github.com] . Ready to be reviewed.

DeviousCardi
DeviousCardi Nov 21, 2026, 10:45 AM

I'd like to work on this — implementing a fix now, will open a PR shortly.

Plan: keep source as the sender id (reserved key injected by Observable#fire) and move the edit origin of eventChange/taskChange into a new changeSource payload key, drop the self-declared source in the dock Workspace and chip ValueList payloads, add a unit spec that scans src for object-literal fire payloads declaring source, and update the Scheduler/Gantt guides.

@github-actions - 2026-11-21T09:45:23Z

Thanks, @DeviousCardi! This one is taken: it's assigned to 02Aditya2323 [QUARANTINED_URL: github.com] and #21770 is open for it.

These good first issue issues are open and nobody holds them:

  • #21741
  • #21744
  • #21771

The full list [QUARANTINED_URL: github.com] has the rest. Comment on one to claim it.

An automatic reply. How claims work [QUARANTINED_URL: github.com]

DeviousCardi cross-referenced by PR #21782 on Nov 21, 2026, 2:09 PM
DeviousCardi
DeviousCardi Nov 21, 2026, 2:09 PM

Opened [QUARANTINED_URL: github.com] with a fix for this: eventChange/taskChange now carry the edit origin as changeSource (input stays meta.source), source remains the sender id injected by Observable#fire, the dock Workspace and chip ValueList payloads drop their self-declared source, both guides name the key, and a new unit spec scans src for object-literal fire() payloads declaring source so the collision cannot return. Regression specs assert changeSource: 'keyboard' for an ArrowRight move and a Shift+ArrowRight resize and 'api' for a bare writer call, with source as the sender id each time. Unit + component tiers green (one unrelated tooltip flake passes standalone); repo lint guards pass.

bfs2021 cross-referenced by PR #21786 on Nov 21, 2026, 3:30 PM