oliver-zehentleitner / maity

web: chat: one project-marks helper and one cross-participant name rule (list row and pane title can differ; marks lose the screen-reader prefix)

Sign in to report

tsk-nx71caq4y5ak Proposed

Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. View: chat / chats list. Kind: duplication with behaviour differences.

What is wrong

  • cross-chat.js projectMarks (:61-70) copies chat.js projectsOf (:364-371) without the visually hidden chat.in_projects prefix, so a screen reader hears less on the cross chat. cross-chat.js:160-167 already builds the {slug, name, view} list projectsOf takes.
  • A participant name falls back differently in the two places: chats.js named (:60-63, title at :77) falls back to @handle; cross-chat.js indexMembers / titleOf (:39, :47-58) fall back to the /agents display name, else the bare handle. The same chat can carry two titles. Neither uses the participant name the cross chat view carries.

Proposal

  • Export projectsOf from chatParts and use it in both; one cross-participant name helper for both files.

Effort / risk: S. Low.