Repository navigation
fix(chat): repair the line-numbered chat template merged by #336 - #498
Merged
Merged
Conversation
The squash merge of #336 pasted the patch itself into `app/templates/chat/index.html`: every line from the sidebar down carried its own line number (`2<aside class="chat-sidebar">`, `3 <div ...`), the opening tag became `<%extends "base.html" %}`, and two U+200B zero-width spaces were introduced. The template still compiles, so nothing failed and the corruption has been on `main` since 2026-10-06 - the digits simply render into the page. Restore the last known-good template (`f0dbbde`) and re-apply the only semantic change #336 made to it: the per-conversation `<span class="conversation-status" hidden aria-hidden="true"></span>` the streaming indicator writes to. Adds `tests/test_template_hygiene.py`, which fails when any template contains a line that starts with a 1-4 digit number followed by markup - the exact shape this corruption took - plus a check that the chat page still extends the shared layout and keeps its status span.
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.
Problem
app/templates/chat/index.htmlonmainis not a template any more - it is a patch pasted into a file. The squash merge of #336 (79a2442, "fix: streaming indicator and typing feedback for chat") carried line numbers into the file:121 of 135 lines are prefixed with their source line number and two zero-width spaces were introduced. The template still compiles and every test still passed, so the corruption has been live on
mainsince 2026-10-06 - the digits simply render into the chat page.I hit this while resolving conflicts on the open chat PRs (#346, #318, #319, #342, #347, #348, #354, #355): every one of them conflicts with this file, and resolving "against
main" would mean resolving against the corrupted text.Fix
Restore the last known-good revision (
f0dbbde, the commit before #336) and re-apply the only semantic change #336 made to this template: the per-conversationthat
app/static/js/chat.jswrites the streaming indicator into. Everything else in that commit (app/chat/api.py,app/chat/routes.py,app/services/streaming.py,app/static/js/chat.js,tests/test_streaming.py) is unaffected and untouched.Verified by diffing the restored file against
mainwith the numbers stripped - the only remaining differences are whitespace, the corrupted<%extends, and the zero-width spaces.Regression guard
New
tests/test_template_hygiene.py:app/templates/contains a line starting with a 1-4 digit number followed by markup (the exact shape this corruption took). Onlychat/index.htmlis flagged by it onmain, so it does not create false positives.{% extends "base.html" %}and keeps theconversation-statusspan.