Bug: 'Nur direkt' / 'Inkl. Unterprojekte' toggle always includes sub-projects on Verlauf #33
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: m @ 2026-05-09 18:32: "the filter pill for 'Nur direkt' or 'include Unterprojekte' - it always seems to include the sub-projects"
Symptom
On
/projects/<id>Verlauf tab, the subtree toggle pill labelled 'Nur direkt' / 'Inkl. Unterprojekte' has no effect on what's rendered — events from sub-projects (descendants) appear regardless of the pill state.Likely cause
The ProjectionService now has Slice 3's CCR-child loading and Slice 4's lane-per-child-case logic. These ALWAYS load child events to populate the parallel tracks / lanes, even when the user requested 'Nur direkt'. The legacy
direct_onlyflag (from t-paliad-152,b78941e) may be silently dropped at the new wire layer.Or: the frontend pill's state is never threaded through to the
/timelinerequest URL — the customRunner builds the request without the?direct_only=truequery param.Fix shape
?direct_only=true|false(or whatever the existing convention is) query param on the/timelinerequest.direct_only=true, load only this project's events (no CCR child loading, no Slice 4 lane-grouping into child cases).Verify the
direct_onlysemantics work consistently across:direct_only=trueshould still load child cases as lanes; the toggle has different semantics at parent levels vs Case level. Make this explicit in the brief.Acceptance
Filed by maria/paliad-head autonomously.
Fix on
mai/maxwell/bug-bundle-filterbar@c2f1c29(bundled with #32).Root cause. The frontend correctly threaded
?direct_only=trueinto the/timelinerequest and the handler parsed it intoProjectionOpts.DirectOnly, butProjectionService.Forhonoured the flag only insideloadProjectTrack(the deadline / appointment / project_events SQL path). Two later layers ignored it:forCaseLevelalways ranLoadCounterclaimChildrenVisibleand emitted CCR sub-project lanes regardless of DirectOnly.forAggregatedLevelalways loaded direct children (cases under a patent, patents under a litigation, litigations under a client) and rendered one lane per child — DirectOnly never reached this branch.Fix.
Forshort-circuits to a newforDirectSelfOnlywheneveropts.DirectOnlyis set. Result: a single "self" lane scoped to this project's own actuals (and its own future projection at Case level only). The level-policy kind/status filter still applies at higher levels, so a Patent-level direct view doesn't suddenly leakoff_scriptcustom milestones the aggregated default filters out.Acceptance behaviour.
Nur direkt→ CCR sub-project lane disappears, parent_context lane disappears (when viewing a CCR child).Inkl.→ unchanged (Slice 3 parallel-track render).Nur direkt→ collapses to this project's own milestones in a single 'self' lane.Inkl.→ unchanged (Slice 4 lane view).Tests. Two new live-DB subtests in
TestProjectionService_LevelAggregation_Live:Patent-level: direct_only collapses to single 'self' lane— asserts only one lane (id=self, project_id=patent.ID), and that Case-A's deadline + bubbled milestone do NOT surface.Case-level: direct_only drops CCR sub-project lane— seeds a CCR child + milestone, confirms the default subtree path includes thecounterclaim:<id>lane and direct_only excludes it.Commit:
c2f1c29b10