Skip to content

Mobile responsive fixes, filter schema row & fix broken A2A link#23

Open
Chesars wants to merge 2 commits intofastrepl:mainfrom
Chesars:fix/mobile-ux-and-data-sanitization
Open

Mobile responsive fixes, filter schema row & fix broken A2A link#23
Chesars wants to merge 2 commits intofastrepl:mainfrom
Chesars:fix/mobile-ux-and-data-sanitization

Conversation

@Chesars
Copy link
Copy Markdown
Contributor

@Chesars Chesars commented May 3, 2026

Summary

A pass over the mobile experience plus two correctness fixes for upstream data the page consumes.

Bugs fixed

  • sample_spec was rendering as a real model. The upstream model_prices_and_context_window.json ships a sample_spec pseudo-entry where each field's value is a description string for that field (e.g. mode: \"one of: chat, embedding, ...\", max_input_tokens: \"max input tokens, if the provider specifies it...\", litellm_provider: \"one of https://docs.litellm.ai/docs/providers\"). It was being treated as a real row, breaking the layout: the mode-badge ballooned to fit the schema string, the Context column literally printed \"max input tokens, if the provider...\", and the row pushed the table wider than the viewport so the Model column header appeared to overlap the data. Filter it out at load time.
  • A2A provider doc link 404'd. Upstream JSON has https://docs.litellm.ai/docs/providers/a2a (404) but the actual page lives at https://docs.litellm.ai/docs/a2a. Added a small per-provider URL override map in Providers.svelte.

Mobile responsive pass

  • Removed position: sticky from <thead> — its top: 63px was causing rows to scroll behind the column headers, which read as overlap (especially after expanding a sample-spec panel on a phone).
  • Detail panel reflow: section headings (Pricing, Model Info, Features) sized down a tier, pricing card labels/values reduced for hierarchy, info-rows now stack label-over-value so long values like 1,000,000 tokens can't collide with their label.
  • Code snippets (Python SDK / AI Gateway proxy): pre-wrap + word-break: break-word so long model names like bedrock/.../nova-canvas-v1:0 wrap instead of forcing a visually huge horizontally-scrolling block. Tablet breakpoint added for an intermediate size between desktop and phone.
  • Locked model-row height (52 px desktop / 48 px mobile) so Bedrock and the first entries don't render visibly taller than the rest.

Trust-logo hover unification

Image logos used grayscale → color, text logos used muted-gray → brand-color. Same transition timing but visibly different effects. Now both groups use the same grayscale(100%) + opacity 0.55grayscale(0%) + opacity 0.9 treatment with shared transition properties. Brand colors (Netflix red, Twilio red, Zurich blue, etc.) sit on the base element and the filter desaturates them by default, mirroring how the image-logos behave.

transform: translateZ(0) on .trust-logo-text to keep inline-SVG + text combos (Zurich, Weather Co, Twilio) from jittering on the filter transition.

Desktop

Screenshot 2026-05-03 at 20 12 53

Fixed:
Screenshot 2026-05-03 at 20 11 06

Mobile

IMG_6927

Fixed:
IMG_6924

Test plan

  • Desktop: load list, scroll, expand a few rows (incl. a Bedrock entry). Confirm thead no longer sticks/overlaps and rows are uniform height.
  • Mobile (≤ 768 px): expand a model, verify Pricing/Model Info/Features headings, pricing-card labels and values, info-row stacking, and Python-SDK / Proxy code-snippet sizes all read cleanly without horizontal scroll.
  • Mobile expanded panel: confirm code snippet wraps long model names instead of overflowing.
  • Trust-logo strip: hover each logo (Stripe, Adobe, Netflix, Zurich, Weather Co, Samsara, etc.) — all should fade between gray and color with the same feel; no positional jitter on Zurich/Weather/Twilio.
  • Providers tab: click the A2A provider card → lands on docs/litellm.ai/docs/a2a (200), not the 404.
  • Confirm sample_spec no longer appears in the model count or list.

Chesars added 2 commits May 3, 2026 20:03
- Filter the upstream `sample_spec` pseudo-entry: it documents the JSON
  schema (each field holds a description string, not data) and was
  rendering as a real model with garbage values that overflowed cells
  and the column header.
- Override the A2A provider docs URL: upstream JSON ships
  `docs/providers/a2a` which 404s; the working page is `docs/a2a`.
- Drop the sticky `<thead>` — its `top: 63px` overlapped the first
  row when the table scrolled, especially on mobile after expanding a
  sample-spec panel.
- Mobile breakpoint pass: shrink detail-panel headings, pricing card
  values, info-rows (now stack label/value), and code snippets; wrap
  long lines (`pre-wrap` + `word-break`) so model names like
  `bedrock/...nova-canvas-v1:0` no longer make the block visually huge.
- Tablet breakpoint for code snippets between desktop and phone.
- Lock model-row height (52px desktop / 48px mobile) so Bedrock and
  the first entries don't render taller than others.
- Unify trust-logo hover: image and text logos now share the same
  `grayscale → color + opacity` treatment with one transition rule, so
  Netflix/Twilio/etc. fade in and out of color the same way as Stripe
  /Adobe/etc. `transform: translateZ(0)` on text logos prevents the
  inline-SVG + text combos (Zurich, Weather Co) from jittering on the
  filter transition.
- Defensive validation in `formatCost` / `formatContext` and an
  `isKnownMode` guard so future malformed entries can't leak schema
  strings into numeric/badge cells.
- `vite.config.ts`: `server.host: true` so `npm run dev` exposes the
  app on the LAN for phone testing without flags.
Per review feedback:

- Revert `server.host: true` in vite.config.ts. Exposing the dev
  server to the LAN by default is not the right default for upstream;
  contributors who want LAN access can run `npm run dev -- --host`.
- Revert defensive type checks in `formatCost` / `formatContext` and
  the `isKnownMode` helper. With `sample_spec` filtered at load, no
  malformed entry reaches these formatters — the extra guards were
  speculative validation for scenarios that can't currently happen.
@Chesars Chesars changed the title Mobile UX polish, data sanitization, and broken-link override Mobile responsive fixes, filter schema row & fix A2A 404 May 3, 2026
@Chesars Chesars changed the title Mobile responsive fixes, filter schema row & fix A2A 404 Mobile responsive fixes, filter schema row & fix broken A2A link May 3, 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