Context
v0.0.17, b9f9e99. In src/decompress.ts:58-66, deactivateBlock builds the updated block as:
const updated = state.blocks.map((block) => {
if (!targets.has(block.blockId) || !block.active) return block;
return {
...block,
active: false,
durationMs: block.durationMs, // redundant: already in ...block
createdAt: block.createdAt, // redundant: already in ...block
};
});
durationMs and createdAt are already covered by ...block. The two explicit lines assign each field to itself — a pure no-op.
Why it matters
It reads as if the code is resetting or preserving those fields deliberately (e.g. clearing durationMs). A maintainer scanning the function would reasonably wonder why those two are singled out. The actual effect is identical to:
return { ...block, active: false };
Suggested fix
Delete the two redundant lines:
return { ...block, active: false };
Severity
Low — noise only. No behavioral change either way.
Context
v0.0.17,
b9f9e99. Insrc/decompress.ts:58-66,deactivateBlockbuilds the updated block as:durationMsandcreatedAtare already covered by...block. The two explicit lines assign each field to itself — a pure no-op.Why it matters
It reads as if the code is resetting or preserving those fields deliberately (e.g. clearing
durationMs). A maintainer scanning the function would reasonably wonder why those two are singled out. The actual effect is identical to:Suggested fix
Delete the two redundant lines:
Severity
Low — noise only. No behavioral change either way.