Skip to content

Area/device-scoped activity log on the device tree #28

Description

@iTerminate

Motivation

Yesterday's v-scope-cycle work (#21, #27) briefly grew a widened log scope that expanded a whole
list's entities out to every sibling entity on every device backing them — effectively an
area-wide log. That's a legitimate view, but it doesn't belong hanging off an entity list or a
plotted graph: it belongs where an area is an actual node, i.e. the device tree
(src/hatty/ui/device_tree_screen.py), whose area grouping mode already walks
area → device → entity. The over-widened scope has been removed from both the main screen's and
the fullscreen graph's v cycles (see the branch fixing #27's fallout) — this issue is the
follow-up to build it properly, scoped to the tree.

Scope

  • Open the existing ActivityLogPanel from a device node: that device's entities +
    its device_id.
  • Open it from an area node: every entity of every device in the area + those device_ids.

Reusable pieces

  • HACLI._device_ids_for_entities, _cap_log_scope, _open_log_panel,
    hatty.logbook.normalize_log_entries — all already used by the main screen's and fullscreen
    graph's activity logs.
  • The main-screen _expand_to_device_entity_ids helper (entity-set → device siblings) was removed
    as part of the v-cycle fix but is recoverable from that commit's history — it's exactly the
    area-expansion helper this needs, generalized from "a list of entities" to "a tree node".

Constraint

a, i, and v are all already bound on the device tree screen
(src/hatty/ui/device_tree_screen.py:411-431, none of them log-related today), so this needs a
free key rather than reusing those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions