fix(chat): dispatch table rows through row component (0.0.24)#197
Merged
Conversation
MarkdownTableComponent template used <chat-md-children [parent]="row"> which walked the row's children (cells) directly under <thead>/<tbody>, skipping the <chat-md-table-row> wrapper entirely. Result: bare cells appeared under thead/tbody and the row component (with its IS_HEADER_ROW DI plumbing) was never instantiated, so cells couldn't tell whether to render <th> or <td>. Caught by live browser smoke testing in ~/tmp/ngaf — Chrome inspection showed the parser produced 3 row nodes but the rendered DOM had zero <chat-md-table-row> elements. Fixed by importing MarkdownTableRowComponent and dispatching each row through it directly. Synchronized version bump to 0.0.24 across all 16 @Ngaf libs.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Live Chrome smoke caught: when a Pandoc citation def has a bare URL (no
<autolink> brackets), mdDefToCitation returns Citation { url: undefined }.
Prior template used [href]="r.citation.url ?? null" which Angular
serialized as href="" — a broken anchor that renders as a clickable link
that goes nowhere.
Fix: split the resolved branch into "with URL" (renders <a>) and
"without URL" (renders <span class="chat-citation-marker--no-url">).
The span shows the bracket marker but is non-interactive, matching the
unresolved fallback's contract.
Also switched from [href] property binding to [attr.href] for explicit
attribute removal when null.
Regression test pins both branches.
Live Chrome smoke caught: when citations come from Pandoc-formatted [^id]: defs in message content (no provider metadata in additional_kwargs.citations), inline markers resolved correctly via the markdown sidecar but the sources panel under the message never rendered — defeating the click-to-source affordance. Fix: ChatCitationsComponent now optionally injects CitationsResolverService and merges markdown-sidecar defs (via mdDefToCitation) into its citations list, with Message.citations taking precedence by id. Behavior matches the same precedence as inline-marker resolution. Two new regression tests pin both behaviors: markdown-only citations appear in the panel; Message.citations wins on id overlap.
Live Chrome smoke caught: checkbox rendered on a separate line above the task text because <chat-md-paragraph> > <p> is block-level, pushing the content below the input. Now uses flexbox on the .chat-md-list-item--task container to align checkbox + content baseline, and collapses the inner <p> margin so tight tasks read as a single line. Multi-paragraph task items (sub-lists, additional paragraphs) still flow correctly because flex-wrap is enabled and only direct children flex.
Live Chrome smoke caught: prior fix collapsed margin on ALL paragraphs inside task items, so multi-paragraph content ran together with no visible break (e.g. "write reportCoral reefs are diverse..." running into the next block when the model emitted prose immediately after a task item without a blank line). Refined: only the FIRST paragraph of a task item collapses its margin (so it aligns inline with the checkbox). Subsequent blocks keep normal vertical spacing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR opened to fix the table-row dispatch bug caught by live browser smoke testing in
~/tmp/ngafagainst published `@ngaf/chat@0.0.23`. The branch grew during continued live smoke as Chrome inspection caught 3 additional bugs that all fold into this 0.0.24 release.Fixes
Table row dispatch (root cause: `MarkdownTableComponent` used `<chat-md-children [parent]="row">` which walked row.children directly, skipping the `` wrapper). Cells appeared bare under ``/``, the `IS_HEADER_ROW` DI provider never ran, and all cells rendered as default ``. Fix imports `MarkdownTableRowComponent` and dispatches each row directly.
Citation marker without URL rendered `<a href="">` — a clickable link to nowhere. Fix splits the resolved branch into "with URL" (renders ``) and "without URL" (renders `<span class="chat-citation-marker--no-url">`). Switched from `[href]` property binding to `[attr.href]` for explicit attribute removal.
Sources panel didn't render Pandoc-only citations — when citations come from `[^id]:` defs in message content (no provider metadata), inline markers resolved correctly via the markdown sidecar but `` never appeared. Fix optionally injects `CitationsResolverService` and merges markdown-sidecar defs into the panel's citation list, with `Message.citations` taking precedence by id.
Task-list checkbox layout — checkbox rendered on a separate line above the text because ` >
` is block-level. Fix uses flexbox on `.chat-md-list-item--task` and collapses the inner `
` margin so tight tasks read as a single line. Multi-paragraph task items still flow correctly (flex-wrap enabled).
Synchronized version bump
All 16 `@ngaf/*` libraries → `0.0.24`.
Test plan