fix: UI bug fixes and comprehensive architecture documentation

- Fixed Agent Instructions overflow by adding vertical scrolling
- Fixed duplicate chat content by skipping turn_complete events
- Added comprehensive architecture documentation (4 files)
- Added UI bug fixes documentation
- Added Notion API upgrade analysis
- Created documentation registry for Notion pages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
Antony Sallas 2025-10-27 13:34:02 +08:00
parent 3059423cd7
commit 5ef6ccf90e
8 changed files with 2603 additions and 1 deletions

View file

@ -792,6 +792,26 @@ export default function ChatPlaygroundPage() {
): { text: string | null; isToolCall: boolean } => {
const chunkObj = chunk as Record<string, unknown>;
// Skip turn_complete events to avoid duplicate content
// These events contain the full accumulated content which we already have from streaming deltas
if (
chunkObj?.event &&
typeof chunkObj.event === "object" &&
chunkObj.event !== null
) {
const event = chunkObj.event as Record<string, unknown>;
if (
event?.payload &&
typeof event.payload === "object" &&
event.payload !== null
) {
const payload = event.payload as Record<string, unknown>;
if (payload.event_type === "turn_complete") {
return { text: null, isToolCall: false };
}
}
}
// helper to check if content contains function call JSON
const containsToolCall = (content: string): boolean => {
return (
@ -1464,7 +1484,7 @@ export default function ChatPlaygroundPage() {
<label className="text-sm font-medium block mb-2">
Agent Instructions
</label>
<div className="w-full h-24 px-3 py-2 text-sm border border-input rounded-md bg-muted text-muted-foreground">
<div className="w-full h-24 px-3 py-2 text-sm border border-input rounded-md bg-muted text-muted-foreground overflow-y-auto">
{(selectedAgentId &&
agents.find(a => a.agent_id === selectedAgentId)
?.agent_config?.instructions) ||