Repository navigation
Fix the chat redesign follow-ups: seal order, scroll on send, dropped streams, drawer focus, answer announcement - #42
Merged
Conversation
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
PR #41 shipped the chat redesign with a known list of follow-ups:
SessionLocaldoesn't (expire_on_commit=False).apiStreamnever released its reader.aria-modal.done.It also left four minor review findings:
hide_parameterson the DB engine;Implementation
One commit per fix, each with its CHANGELOG bullet.
Backend
_save_answersorts sources by relevance (highest first), then by chunk id and label.Message.sourcesorders the same way in SQL, withCOLLATE "C"so ties sort byte-wise, as in Python.hide_parameters=Trueon the engine: bound values stay out of SQL errors and logs.ThreadRenameRequesttrims in amode="before"validator, then appliesmin_length=1, max_length=200. Non-strings are left for pydantic to refuse.Frontend
apiStreamwraps the reader loop intry/catch/finally. An abort is rethrown as is; any other failure becomes the existing "Can't reach PolicyPal…"ApiError.reader.cancel()always runs.Transcriptrole="status"region says "Answer ready, N sources", counting documents as the seals do. It is empty while an answer streams, so identical texts still announce, and loaded history is silent.trapTabmoves fromSourcesPaneltofeatures/chat/focus.js, where both chat users of it now share it.aria-hiddenthrough adisplay: contentswrapper.inertwas tried and dropped: Playwright showed it blurred the opening button in the same commit, so focus couldn't return there on close.Validation
alembic checkclean, bandit clean, and pip-audit found no vulnerabilities.vite buildpasses.kept_on_commitfixture in the test file to run sessions as production does, leavingconftest.pyunchanged;Security / DB / API impact
doneandGET …/messagesnow list sources in the same order.PATCH /api/chat/threads/<id>accepts a title that fits after trimming, and still returns 422 for a blank, overlong or non-string title. There are no new endpoints.🤖 Generated with Claude Code
https://claude.ai/code/session_01F4R82wzcgXPBsgyeNRkPqW