Skip to content

Paper detail modal, feed figure sizing, and per-turn metrics - #36

Merged
SXKDZ merged 15 commits into
mainfrom
feat/paper-detail-modal
Aug 18, 2026
Merged

Paper detail modal, feed figure sizing, and per-turn metrics#36
SXKDZ merged 15 commits into
mainfrom
feat/paper-detail-modal

Conversation

@SXKDZ

@SXKDZ SXKDZ commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Paper details became a modal, and the surfaces around it were measured and fixed: the byline disclosure, the venue chips, feed figures and tables, and the library toolbar. Ends with the v0.5.0 version bump.

Paper details and library

  • paper details open as an accessible modal instead of a side drawer, with tabbed panels
  • preprint identifiers consolidated onto one editable field
  • author disclosures are measured at the width they actually render at: the separator is measured as the non-breaking space the byline emits (a trailing plain space is trimmed and bought phantom width per visible author) and every candidate carries the live toggle class, so type, weight, and inline margin come from the control that replaces it
  • the venue monogram keeps all four letters at a new --type-nano step, with tracking left at normal (it trails the last glyph and pulls the acronym off centre) and the line box pinned to the font's ascent plus descent

Measured in a browser: 475 collapsed bylines across 25 viewport widths and a full column drag, zero overflow; all 10 monograms centre within 0.25px horizontally and 0.48px vertically with at least 4px of width to spare.

AI feed

  • figures size to their content. Mermaid's width="100%" contributes nothing to a shrink-to-fit box, so every diagram was rendering at the 300px default of a replaced element; the viewBox is now the SVG's intrinsic size, so a narrow diagram hugs and a wide one scales to the measure
  • the scale is floored at 0.7 so 16px diagram labels stay above the 11px text floor (11.2px on screen, from 4.1px); anything wider scrolls inside the canvas, capped at 70vh, and the scroll moved off the block so the open-in-new-window action stays pinned
  • tables lay out automatically instead of at max-content, so a wide one wraps into taller rows rather than pushing every row onto a single scrolling line (a 1153px table becomes 714px wide and 238px tall, no horizontal scroll); a narrower table stays centred
  • each turn ends with its local date and time, then speed, tokens, and elapsed time. Per-turn usage was not stored anywhere, so feed_messages gains three columns (existing rows default to 0 and show the time alone), the CLI's result-event usage is stamped on the message the turn ends with, and it is carried through the thread snapshot

Toolbar and menus

  • the toolbar search field is elastic between 220px and 390px instead of fixed, and grows ahead of the status tabs; the tabs take the row's leftover width but never give any back. The fixed field had been hiding up to 257px of tabs behind a hidden scrollbar, leaving only "All" once the selection actions appeared
  • floating menus animate in from the edge they open on, through one shared popover-enter keyframe

Verification

  • npm test (build + 208 + 39 tests), tsc --noEmit, and lint all clean; the rebase ran the schema suite at every commit
  • geometry claims above come from Playwright measurements against a throwaway clone of a real library, not from inspection

Known gaps

  • per-turn metrics only populate for turns that run from now on; nothing back-fills old threads, and the write path is covered by tests and review rather than a live agent run in this environment
  • "detail page not refreshed after editing" is unreproduced: every field updated immediately in the isolated environment, so it needs a concrete surface and field to chase

SXKDZ added 15 commits August 10, 2026 17:07
- add one popover-enter keyframe driven by a signed --popover-enter-y offset
- animate the page-size and app-select menus with it instead of appearing instantly
- flip the entrance offset for the menus that open upward, including the select
- mark an app-select menu with data-placement so its entrance follows its placement
- open the upper pagination size menu downward into the table area
- rotate the page-size chevron with the shared control motion
- measure the separator as the non-breaking space the byline renders, since a
  trailing plain space is trimmed and bought phantom width per visible author
- carry the live author-toggle class on every measured candidate so type, weight,
  and inline margin come from the control that replaces it
- drop the measure-only font-size override that made candidates read narrower
- keep the fit conservative with a floored container and a ceiled requirement
- name the four-letter venue monogram in one helper instead of slicing inline
- add a --type-nano step and drop the chip to it so COLM, CURR, and CODE fit whole
- leave tracking at normal: it trails the last glyph and pulls the acronym off centre
- pin the line box to the font's own ascent plus descent so the caps sit on the
  chip's middle instead of a pixel above it
- publish a diagram's viewBox as its SVG's intrinsic size, since Mermaid's
  width="100%" contributed nothing to a shrink-to-fit box and every diagram
  collapsed to the 300px default of a replaced element
- floor the scale at 0.7 so 16px diagram labels stay above the 11px text floor,
  and scroll the canvas instead of shrinking a wide diagram into unreadable type
- keep the scroll off the block so the own-window action stays in its corner
- cap the canvas at 70vh so a readable diagram is a pane, not a page-long block
- lay tables out automatically so a wide one wraps into taller rows rather than
  pushing every row onto a single scrolling line
- centre a table narrower than the message in it
- store the tokens and wall-clock of a turn on the message it ends with, so a
  reply can show its own cost rather than only the feed-wide totals
- add the columns to new libraries and to existing ones, defaulting to zero
- carry the per-turn usage through the thread snapshot
- footer each turn with its local date and time, then speed, tokens, and elapsed
  time, showing a metric only when the turn actually reported it
- make the toolbar search elastic between 220px and 390px instead of fixed, so
  the selection actions no longer squeeze the tabs down to "All"
- grow the field ahead of the tabs so it reaches its preferred width first
- let the tabs take the row's leftover width but never give any back, so the row
  neither clips them nor spreads apart on justify-content: space-between
- release the elastic cap where search owns its own row
- render one AdaptiveAuthors for plain and linked names, so the reader byline runs
  the same code as the library table instead of a parallel variant
- keep the disclosure control as the last child of the name run in both states, so
  "Show fewer authors" and "N more authors" share one style
- fold the expandable-author-buttons class family into expandable-author-list and
  mark clickable names with is-linked
- drop the reader-only toggle override and the per-surface toggle type rules the
  hidden measurement could not see: the live control rendered at 700 weight
  against a measured 400 and ran past the byline's clip edge
- give the empty byline one default label
@SXKDZ
SXKDZ force-pushed the feat/paper-detail-modal branch from 90249db to 3f16bb0 Compare August 18, 2026 20:25
@SXKDZ

SXKDZ commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Follow-up pushed: the reader byline now runs the same adaptive component as the library table.

Both reported symptoms had one cause: reader-only and per-surface .author-toggle overrides that the hidden measurement could not see. The live control rendered at 700 weight / 13px where the measurement assumed 400 (107.98px vs 100.75px), so a tight fit crossed the clip edge; and those overrides matched only the direct-child control, so Show fewer authors (nested one level deeper) picked up a different style.

  • one AdaptiveAuthors component for plain and linked names, one expandable-author-list class family, is-linked for clickable names
  • the disclosure control is the last child of the name run in both states, so both labels share one rule
  • the reader-only toggle override and the per-surface toggle type rules are gone; type comes from the one canonical rule the measurement mirrors

Measured after the change: live and measured control widths agree to 0.01px; zero overflow across 9 reader widths, a full notes-sidebar drag (9 samples), 42 table bylines over 6 viewport widths, the detail modal, and the overview cards.

@SXKDZ
SXKDZ merged commit 379219c into main Aug 18, 2026
3 checks passed
@SXKDZ
SXKDZ deleted the feat/paper-detail-modal branch August 18, 2026 20:27
@SXKDZ SXKDZ mentioned this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant