{"id":51012326,"url":"https://github.com/justyn-clark/pretext-chat-poc","last_synced_at":"2026-06-21T04:31:34.726Z","repository":{"id":355720988,"uuid":"1203327179","full_name":"justyn-clark/pretext-chat-poc","owner":"justyn-clark","description":"Local proof of concept for evaluating the actual @chenglou/pretext package in a long chat interface built with React Router 7 + React + Vite.","archived":false,"fork":false,"pushed_at":"2026-05-04T23:13:47.000Z","size":1605,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T01:22:58.889Z","etag":null,"topics":["chat","pretext","react-router-v7","vite"],"latest_commit_sha":null,"homepage":"https://pretext-chat-poc.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justyn-clark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-07T00:08:46.000Z","updated_at":"2026-05-04T23:13:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/justyn-clark/pretext-chat-poc","commit_stats":null,"previous_names":["justyn-clark/pretext-chat-poc"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/justyn-clark/pretext-chat-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justyn-clark%2Fpretext-chat-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justyn-clark%2Fpretext-chat-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justyn-clark%2Fpretext-chat-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justyn-clark%2Fpretext-chat-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justyn-clark","download_url":"https://codeload.github.com/justyn-clark/pretext-chat-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justyn-clark%2Fpretext-chat-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34594326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","pretext","react-router-v7","vite"],"created_at":"2026-06-21T04:31:34.016Z","updated_at":"2026-06-21T04:31:34.714Z","avatar_url":"https://github.com/justyn-clark.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pretext-chat-poc\n\nLocal proof of concept for evaluating the actual `@chenglou/pretext` package in a long chat interface built with React Router 7 + React + Vite.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./pretext-chat.png\" alt=\"Screenshot of the Pretext chat POC showing a long chat transcript with measurement metrics and stress controls.\" width=\"900\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cem\u003eLong-chat virtualization playground with Pretext-assisted measurement and live layout instrumentation.\u003c/em\u003e\u003c/p\u003e\n\n## Run\n\nInstall dependencies and start the Vite dev server:\n\n```bash\nnpm install\nnpm run dev\n```\n\nBuild verification:\n\n```bash\nnpm run build\n```\n\n## What The POC Includes\n\n- Session list and route-driven session switching\n- Three seeded sessions with different transcript patterns\n- Hundreds of rows per session and over a thousand total messages\n- Mixed content: short replies, long prose, pasted code-ish text, multilingual text, emoji, timestamps, sender roles\n- Baseline versus assisted measurement mode toggle\n- Instrumentation for visible rows, measurement counts, estimate error, scroll position, and anchor corrections\n- Stress controls for width, density, line-length mix, and session size\n\n## Evaluation Note\n\n### Where the assisted measurement helps\n\n- Before rows mount, width-aware text measurement gives a better first estimate than a rough character-count heuristic.\n- During width changes, a cached `prepare/layout` path gives more stable total-height math and usually needs fewer anchor corrections.\n- The benefit is most visible on long prose, multilingual text, and messages with many wraps.\n\n### Where it does not help much\n\n- Once real DOM measurements are available, both modes converge because the viewport switches to actual heights.\n- Short single-line messages do not benefit much; native browser layout is already good enough there.\n- If the whole transcript can stay mounted without virtualization pressure, the browser-native lane is simpler and more faithful.\n\n### Caveats\n\n- This repo now uses the actual published `@chenglou/pretext` package for the assisted lane.\n- The runtime stats panel wraps `prepare()` and `layout()` with a thin local counter and prepared-handle cache so the UI can show call counts and cache hits. The measurement and line-breaking behavior still comes from Pretext itself.\n- Font choice matters. The app uses a named font stack instead of `system-ui` because the package docs call out `system-ui` accuracy risk on macOS.\n\n## Notes\n\nThis is an evaluation tool, not a production chat client.\n\nThe current repo state is the public-release POC: it uses the published\n`@chenglou/pretext` package, keeps local instrumentation around the measurement\ncalls, and exists to compare browser-native row measurement with the assisted\nmeasurement lane under long-chat stress.\n\nSee `docs/current-state.md` for the current evaluation boundary.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustyn-clark%2Fpretext-chat-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustyn-clark%2Fpretext-chat-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustyn-clark%2Fpretext-chat-poc/lists"}