Skip to content

tsk-55xqwq [OPEN] Land #2167: rebase the duplicate-channel-header fi - #2169

Merged
jaylfc merged 2 commits into
devfrom
exec/tsk-55xqwq
Jul 27, 2026
Merged

tsk-55xqwq [OPEN] Land #2167: rebase the duplicate-channel-header fi#2169
jaylfc merged 2 commits into
devfrom
exec/tsk-55xqwq

Conversation

@jaylfc

@jaylfc jaylfc commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Autonomous build of board card tsk-55xqwq.

REVIEW WARNING (automated): this card's text asks for tests, but the diff changes no test file. Either the acceptance criteria are unmet or the card needs correcting. Do not merge without resolving this.

Files:
desktop/src/apps/MessagesApp.tsx | 123 +--------------------------------------
1 file changed, 1 insertion(+), 122 deletions(-)

Summary by CodeRabbit

  • Refactor
    • Updated message interface components and imports to improve maintainability.
    • Preserved existing message list and channel header behavior with no expected changes to the user experience.

hognek and others added 2 commits July 27, 2026 18:56
The channel header block in MessagesApp.tsx (type icon, agent emoji,
channel name, settings, guide link, pin/search, member count,
description) was a near-exact copy of the header already rendered
by MessageList.tsx at line 214. Since messageAreaUI renders both
its own header and <MessageList>, the result was two stacked headers.

Remove the duplicate header from MessagesApp.tsx and clean up the
five imports that became unused (MessagesSquare, Search, PinBadge,
PinnedMessagesPopover, resolveAgentEmoji). The PinnedMessage type
import is preserved.

Closes #2124
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

MessagesApp updates its icon and type imports, removes the resolveAgentEmoji import, and adjusts the JSX boundary between the selected-channel header and MessageList.

Changes

MessagesApp updates

Layer / File(s) Summary
Update imports and channel rendering
desktop/src/apps/MessagesApp.tsx
The icon imports are adjusted, PinnedMessage becomes type-only, resolveAgentEmoji is removed, and the selected-channel JSX transitions into MessageList differently.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • jaylfc/taOS#1877: Both update MessagesApp channel-header and MessageList rendering wiring.
  • jaylfc/taOS#1881: Both modify the resolveAgentEmoji import in MessagesApp.

Suggested reviewers: hognek

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references the duplicate channel-header fix, which matches the main change in MessagesApp.tsx.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch exec/tsk-55xqwq

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix stacked channel headers by removing duplicate header in MessagesApp

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Remove the extra channel header in MessagesApp to prevent double-stacked rendering.
• Rely on MessageList’s existing header as the single source of truth.
• Bump desktop package-lock version to beta.44.
Diagram

graph TD
  A["Desktop app"] --> E["package-lock.json"]
  A --> B["MessagesApp.tsx"] --> C["MessageList"] --> D["Channel header"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Make MessageList header optional via prop
  • ➕ Lets MessagesApp decide where/when the header appears (e.g., mobile vs desktop)
  • ➕ Keeps header ownership explicit at the page level
  • ➖ Adds API surface and branching logic to MessageList
  • ➖ Still requires deciding a single owner; more moving parts than necessary
2. Extract a shared ChannelHeader component
  • ➕ Eliminates duplication while keeping layout flexibility
  • ➕ Improves reuse across other chat surfaces
  • ➖ More refactor work than needed for a straightforward duplicated-render bug
  • ➖ Does not inherently prevent rendering it twice unless ownership is enforced

Recommendation: Prefer the PR’s approach: remove the duplicate header from MessagesApp and keep MessageList as the single header owner, which directly fixes the stacked-header bug with minimal surface-area change. If future layouts require different header placement, consider the optional-prop or shared-component approach then.

Files changed (2) +3 / -124

Bug fix (1) +1 / -122
MessagesApp.tsxRemove duplicated channel header block to prevent double rendering +1/-122

Remove duplicated channel header block to prevent double rendering

• Deletes the inlined channel header JSX that duplicated the header already rendered by MessageList, resolving stacked header UI. Cleans up now-unused imports (icons, pin/search UI, and agent emoji resolver) while retaining the PinnedMessage type import where still needed.

desktop/src/apps/MessagesApp.tsx

Other (1) +2 / -2
package-lock.jsonBump lockfile version to 1.0.0-beta.44 +2/-2

Bump lockfile version to 1.0.0-beta.44

• Updates the lockfile’s top-level package version fields from beta.43 to beta.44. No dependency set changes are shown in the provided diff hunk.

desktop/package-lock.json

@jaylfc

jaylfc commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

nemotron-ultra-orB review

VERDICT: Significant UI removal without clear replacement; likely dead code and unused state remain.

  • desktop/src/apps/MessagesApp.tsx:11-12 - Removed MessagesSquare and Search icon imports but they may still be referenced elsewhere in the file (need to verify)
  • desktop/src/apps/MessagesApp.tsx:41-43 - Removed PinBadge and PinnedMessagesPopover component imports but kept PinnedMessage type import; pinnedMessages state and pinnedPopoverOpen state likely now unused
  • desktop/src/apps/MessagesApp.tsx:70 - Removed resolveAgentEmoji import; verify it's not used elsewhere in the file
  • desktop/src/apps/MessagesApp.tsx:1698-1824 - Entire channel header UI removed (channel type icon, DM agent emoji, channel name, settings/help buttons, pin badge with popover, all-threads button, search button, description, member count); no replacement shown in diff — confirm ChannelSidebar/ChannelSwitcher now own this UI
  • desktop/src/apps/MessagesApp.tsx - handleOpenSettings, showAllThreads, showSearch state setters referenced in removed buttons; verify these states/functions are still used by SearchPanel/AllThreadsList or remove if dead

Automated first-pass review by the nemotron-ultra-orB lane. The lead still reviews before merge.

@jaylfc

jaylfc commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

nemotron-ultra-kilo review

VERDICT: Major functionality removed without clear relocation — channel header, pinned messages, search, and thread navigation features appear deleted.

  • desktop/src/apps/MessagesApp.tsx:39-40 — PinBadge and PinnedMessagesPopover imports removed but PinnedMessage type still imported; verify type isn't used in removed JSX only

  • desktop/src/apps/MessagesApp.tsx:70 — resolveAgentEmoji import removed; was used in removed DM header logic — confirm no other usages remain

  • desktop/src/apps/MessagesApp.tsx:1698-1820 — ~123 lines of channel header UI deleted including: pinned messages popover, all-threads toggle, search toggle, channel settings link, member count, DM agent emoji — these features are now absent unless reimplemented in MobileSplitView or elsewhere; search for MobileSplitView to confirm relocation

  • desktop/src/apps/MessagesApp.tsx:11-12 — MessagesSquare and Search icon imports removed; were only used in deleted buttons — cleanup is correct if features gone

  • No test file changes shown — verify existing tests for pinned messages, search, thread list still pass or are updated
    VERDICT: Major functionality removed without clear relocation — channel header, pinned messages, search, and thread navigation features appear deleted.

  • desktop/src/apps/MessagesApp.tsx:39-40 — PinBadge and PinnedMessagesPopover imports removed but PinnedMessage type still imported; verify type isn't used in removed JSX only

  • desktop/src/apps/MessagesApp.tsx:70 — resolveAgentEmoji import removed; was used in removed DM header logic — confirm no other usages remain

  • desktop/src/apps/MessagesApp.tsx:1698-1820 — ~123 lines of channel header UI deleted including: pinned messages popover, all-threads toggle, search toggle, channel settings link, member count, DM agent emoji — these features are now absent unless reimplemented in MobileSplitView or elsewhere; search for MobileSplitView to confirm relocation

  • desktop/src/apps/MessagesApp.tsx:11-12 — MessagesSquare and Search icon imports removed; were only used in deleted buttons — cleanup is correct if features gone

  • No test file changes shown — verify existing tests for pinned messages, search, thread list still pass or are updated

Automated first-pass review by the nemotron-ultra-kilo lane. The lead still reviews before merge.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
desktop/src/apps/MessagesApp.tsx (1)

1698-1703: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the requested regression coverage before merging.

Render a selected channel and assert that exactly one channel header is present, while pin, thread, search, and settings actions remain available. The PR objective explicitly says this test acceptance criterion must be resolved before merge.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@desktop/src/apps/MessagesApp.tsx` around lines 1698 - 1703, Add regression
coverage for the MessagesApp rendering path around MessageList: render a
selected channel and assert exactly one channel header is present, while
verifying pin, thread, search, and settings actions remain available.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@desktop/src/apps/MessagesApp.tsx`:
- Around line 1698-1703: Add regression coverage for the MessagesApp rendering
path around MessageList: render a selected channel and assert exactly one
channel header is present, while verifying pin, thread, search, and settings
actions remain available.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bc900eee-6221-4962-b3cb-f909fd0b7809

📥 Commits

Reviewing files that changed from the base of the PR and between d3ccf22 and d06465e.

⛔ Files ignored due to path filters (1)
  • desktop/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (1)
  • desktop/src/apps/MessagesApp.tsx

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (1)

Context used
✅ Compliance rules (platform): 35 rules

Grey Divider


Remediation recommended

1. MessagesApp missing regression test 📜 Skill insight ▣ Testability
Description
This PR changes MessagesApp behavior by removing the channel header UI but does not add a
regression test to prevent the duplicate-header bug from returning. Without a test, future refactors
can reintroduce the issue undetected.
Code

desktop/src/apps/MessagesApp.tsx[L1705-1706]

-          {/* channel header — MobileSplitView owns back nav on mobile */}
-<div className="px-4 py-2.5 border-b border-shell-border flex items-center gap-3 shrink-0">
Relevance

⭐⭐⭐ High

Team often accepts adding/fixing tests; PR warning explicitly calls for tests.

PR-#507
PR-#1542
PR-#364

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2185285 requires a regression test for bug fixes. The changed MessagesApp
rendering now goes directly to MessageList (indicating a behavioral/UI fix), but this PR includes
no accompanying test changes to lock in that behavior.

desktop/src/apps/MessagesApp.tsx[1699-1706]
Skill: taos-development-skill

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A UI bug fix was made in `MessagesApp` (removing the duplicate channel header), but no regression test was added.

## Issue Context
Compliance requires every bug fix PR to include at least one test that would fail without the fix and pass with it.

## Fix Focus Areas
- desktop/src/apps/MessagesApp.tsx[1699-1706]
- desktop/src/apps/chat/__tests__/MessageList.test.tsx[121-160]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Silent pin jump failure 🐞 Bug ≡ Correctness
Description
After removing the pinned-messages popover from MessagesApp, jumping to a pinned message that isn’t
currently in the DOM now no-ops with no user feedback. Users clicking an older pin may see nothing
happen even though MessagesApp still has a visible error banner mechanism (sendError) that
previously handled this case.
Code

desktop/src/apps/MessagesApp.tsx[L1754-1764]

-                      onJumpTo={(id) => {
-                        setPinnedPopoverOpen(false);
-                        const el = document.querySelector(`[data-message-id="${id}"]`) as HTMLElement | null;
-                        if (el) {
-                          el.scrollIntoView({ behavior: "smooth", block: "center" });
-                          el.classList.add("data-highlight");
-                          setTimeout(() => el.classList.remove("data-highlight"), 2000);
-                        } else {
-                          // Only ~50 messages load; a pin older than that is not in the DOM.
-                          setSendError("Message is older than the loaded history");
-                        }
Relevance

⭐⭐⭐ High

Repo precedent favors surfacing failures instead of silent no-ops via error state/alerts.

PR-#260
PR-#307
PR-#377

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The old error-feedback branch (setting sendError when the pinned message element wasn’t found) was
removed in this PR. In the current code, MessageList’s onJumpTo handler only acts when
document.querySelector(...) returns an element and otherwise does nothing; meanwhile MessagesApp
still renders sendError as a visible alert, but there is no longer a code path for pin-jump misses
to set it.

desktop/src/apps/chat/MessageList.tsx[259-281]
desktop/src/apps/MessagesApp.tsx[1849-1854]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The pinned-message jump handler that used to surface an error (when the target message element is not found in the DOM) was removed from `MessagesApp.tsx`. The remaining implementation inside `MessageList` only scrolls when the element exists and provides no fallback feedback.

### Issue Context
- `MessageList` currently does `document.querySelector(...)` and scrolls/highlights only if the element exists.
- `MessagesApp` still renders a `sendError` banner, but the remaining pin-jump path no longer triggers it.

### Fix Focus Areas
- Add an explicit “not found” branch for pin jumps and surface an error to the user (e.g., via an optional callback prop that `MessagesApp` implements by calling `setSendError(...)`).
- Keep the current success behavior (scroll + highlight) unchanged.

#### Code locations
- desktop/src/apps/chat/MessageList.tsx[63-146]
- desktop/src/apps/chat/MessageList.tsx[259-281]
- desktop/src/apps/MessagesApp.tsx[1701-1774]
- desktop/src/apps/MessagesApp.tsx[1849-1854]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines -1705 to -1706
{/* channel header — MobileSplitView owns back nav on mobile */}
<div className="px-4 py-2.5 border-b border-shell-border flex items-center gap-3 shrink-0">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Messagesapp missing regression test 📜 Skill insight ▣ Testability

This PR changes MessagesApp behavior by removing the channel header UI but does not add a
regression test to prevent the duplicate-header bug from returning. Without a test, future refactors
can reintroduce the issue undetected.
Agent Prompt
## Issue description
A UI bug fix was made in `MessagesApp` (removing the duplicate channel header), but no regression test was added.

## Issue Context
Compliance requires every bug fix PR to include at least one test that would fail without the fix and pass with it.

## Fix Focus Areas
- desktop/src/apps/MessagesApp.tsx[1699-1706]
- desktop/src/apps/chat/__tests__/MessageList.test.tsx[121-160]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines -1754 to -1764
onJumpTo={(id) => {
setPinnedPopoverOpen(false);
const el = document.querySelector(`[data-message-id="${id}"]`) as HTMLElement | null;
if (el) {
el.scrollIntoView({ behavior: "smooth", block: "center" });
el.classList.add("data-highlight");
setTimeout(() => el.classList.remove("data-highlight"), 2000);
} else {
// Only ~50 messages load; a pin older than that is not in the DOM.
setSendError("Message is older than the loaded history");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Silent pin jump failure 🐞 Bug ≡ Correctness

After removing the pinned-messages popover from MessagesApp, jumping to a pinned message that isn’t
currently in the DOM now no-ops with no user feedback. Users clicking an older pin may see nothing
happen even though MessagesApp still has a visible error banner mechanism (sendError) that
previously handled this case.
Agent Prompt
### Issue description
The pinned-message jump handler that used to surface an error (when the target message element is not found in the DOM) was removed from `MessagesApp.tsx`. The remaining implementation inside `MessageList` only scrolls when the element exists and provides no fallback feedback.

### Issue Context
- `MessageList` currently does `document.querySelector(...)` and scrolls/highlights only if the element exists.
- `MessagesApp` still renders a `sendError` banner, but the remaining pin-jump path no longer triggers it.

### Fix Focus Areas
- Add an explicit “not found” branch for pin jumps and surface an error to the user (e.g., via an optional callback prop that `MessagesApp` implements by calling `setSendError(...)`).
- Keep the current success behavior (scroll + highlight) unchanged.

#### Code locations
- desktop/src/apps/chat/MessageList.tsx[63-146]
- desktop/src/apps/chat/MessageList.tsx[259-281]
- desktop/src/apps/MessagesApp.tsx[1701-1774]
- desktop/src/apps/MessagesApp.tsx[1849-1854]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • desktop/src/apps/MessagesApp.tsx

Reviewed by step-3.7-flash · Input: 83.7K · Output: 17.3K · Cached: 1.5M

@jaylfc
jaylfc merged commit f551e63 into dev Jul 27, 2026
19 checks passed
@jaylfc
jaylfc deleted the exec/tsk-55xqwq branch July 27, 2026 19:22
hognek added a commit to hognek/tinyagentos that referenced this pull request Jul 29, 2026
…er fi (jaylfc#2169)

* fix(messages): remove duplicate channel header causing stacked rendering

The channel header block in MessagesApp.tsx (type icon, agent emoji,
channel name, settings, guide link, pin/search, member count,
description) was a near-exact copy of the header already rendered
by MessageList.tsx at line 214. Since messageAreaUI renders both
its own header and <MessageList>, the result was two stacked headers.

Remove the duplicate header from MessagesApp.tsx and clean up the
five imports that became unused (MessagesSquare, Search, PinBadge,
PinnedMessagesPopover, resolveAgentEmoji). The PinnedMessage type
import is preserved.

Closes jaylfc#2124

* tsk-55xqwq  [OPEN]  Land jaylfc#2167: rebase the duplicate-channel-header fi

---------

Co-authored-by: Hogne <227774406+hognek@users.noreply.github.com>
hognek added a commit to hognek/tinyagentos that referenced this pull request Jul 30, 2026
…er fi (jaylfc#2169)

* fix(messages): remove duplicate channel header causing stacked rendering

The channel header block in MessagesApp.tsx (type icon, agent emoji,
channel name, settings, guide link, pin/search, member count,
description) was a near-exact copy of the header already rendered
by MessageList.tsx at line 214. Since messageAreaUI renders both
its own header and <MessageList>, the result was two stacked headers.

Remove the duplicate header from MessagesApp.tsx and clean up the
five imports that became unused (MessagesSquare, Search, PinBadge,
PinnedMessagesPopover, resolveAgentEmoji). The PinnedMessage type
import is preserved.

Closes jaylfc#2124

* tsk-55xqwq  [OPEN]  Land jaylfc#2167: rebase the duplicate-channel-header fi

---------

Co-authored-by: Hogne <227774406+hognek@users.noreply.github.com>
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.

2 participants