Skip to content

Keep search, pins and Reopen Topic beside the chat title - #76

Merged
macosswift merged 28 commits into
TelegramMessenger:masterfrom
PystoyPlayer:codex/inline-chat-header-search
Oct 29, 2026
Merged

macosswift merged 28 commits into
TelegramMessenger:masterfrom
PystoyPlayer:codex/inline-chat-header-search

Conversation

@PystoyPlayer

@PystoyPlayer PystoyPlayer commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Key change

Place chat search beside the compact title when space permits while keeping its results across the full chat pane. Narrow panes and Saved Messages tags retain a separate row. Empty search starts with disabled navigation and no Clear button. Pinned messages and Reopen Topic can share the same compact slot.

Reason

Addresses the cramped input, detached results and transition issues from #40. Preserve the translation bar and its existing Hide wording. Explanatory/request/share-info/pending-request/bot-photo banners remain separate. Returning a primary slot from inline to stacked layout restores the state’s natural height. Ordinary suggestions keep their original viewport cap, Stories keeps its custom dynamic height, and dismissal cannot be repositioned by a layout pass. Typing status reflows to fit the remaining title width.

Screenshot/video result (before/after)

The retained actual-client comparisons show the same public Telegram Tips query before/after and the same closed Reopen Topic validation topic. These historical native crops exclude the sidebar/account identity. They establish layout and prior authenticated behavior, not a recording of this follow-up. Intermediate GIFs and obsolete fade/count claims were removed: the 0.2-second field-background fade already exists in upstream and is not a net change of this PR.

Before

Before: separate search row

After

After: inline search with full-width results

Confirmation

macOS 27.0.1 (26A434), Xcode 27.1; historical full-client captures use Telegram 13.1.0 (283357), Debug arm64.

Current source is merged with upstream e188309. 220 native search-component checks pass. The documented immutable a190a12 baseline compiles again and reproduces 57 expected regressions. Header validation passes six XCTest cases, 95 placement/inset/menu checks, 288 native search-control checks, seven typing-layout checks and 41 production Reopen Topic checks. These use actual controls/extracted production methods with controlled backend/domain data. Live Stories resolution, server translation, other macOS versions and continuous frame profiling remain unverified. Current commands and scope replace old validation notes under tools/tests/chat-search-integration.

A complete Debug arm64 integration workspace build including these nine review follow-ups succeeded at c3df514291ea100f04a3b05cefbcecacf5036368, using real native dependencies and no diagnostic UI injection. This is an integration build with other pending fixes and local SDK/profile overrides, not a clean independent build of each PR head. A fresh authenticated-client smoke check on this build verified Saved Messages search (empty disabled arrows, no empty clear button, Photo query returning 1 of 1, clear and close) and Settings → Escape restoring Saved Messages with the Chats sidebar. This does not re-run the other retained native diagnostic captures or verify server-restricted reactions, sensitive/secret media rendering, physical AirPods handoff or another macOS version.

  • I confirm that I have tested the affected behavior and verified that it works properly, or verified the content and links for a documentation-only change.
@macosswift

Copy link
Copy Markdown
Collaborator

This branch has conflicts that must be resolved

@PystoyPlayer PystoyPlayer changed the title Keep chat search in the title row without narrowing its results Oct 25, 2026
@macosswift

Copy link
Copy Markdown
Collaborator

Issues:

CONFIRMED: InputContextHelper.swift:825-826: the suggestion list height is now capped by the space above its anchor, so the Stories reply field, whose list container is only 1pt tall until a list is shown, gets height 0 and mention, emoji and command suggestions never appear.

@macosswift

Copy link
Copy Markdown
Collaborator

Issues:

PLAUSIBLE: InputContextHelper.swift:825: the default list height lost its superview.height - 50 - relativeView.height cap for every caller without getHeight and fullWidthInset (chat composer, share, preview sender), so mention, command and emoji lists can grow taller than the room above the input, although the description says ordinary suggestions keep their policy.

PLAUSIBLE: ChatController.swift:1344: the translation bar is removed rather than moved (translate is never set any more, so ChatTranslateHeader, the third slot and thirdHeight are dead), which is a user-visible product change the description presents as relocating controls.

PLAUSIBLE: ChatController.swift:6496: the new Translate > Hide item reuses strings that say 'Translation bar hidden', describing a bar that no longer exists.

PLAUSIBLE: ChatHeaderController.swift:271: canDisplayInline also admits .requestChat, .shareInfo, .pendingRequests, .setBotPhoto and .pinned, which the description says stay separate; ChatRequestChat has no line limit so its long text wraps inside the 40 pt inline row, and the typing-status reflow added to ChatHeaderBubblesView is not mentioned.

PLAUSIBLE: ChatHeaderController.swift:427: layoutSlot stretches the primary view to the inline height and keeps that stale height after canDisplayInline turns false, so the bar overlaps the next one.

PLAUSIBLE: InputContextHelper.swift:900: updateLayout(animated:) is not guarded by markAsNeedShown, so a layout pass during the 0.4 s dismissal moves the fading popup back and cuts the animation.

PLAUSIBLE: chat-search-integration/VALIDATION.md:24: the committed command contains an absolute home-directory path with the author's local user name, and the file is a 'PR #76 review validation' record that also describes a private test forum and an authenticated test account.

PLAUSIBLE: chat-search-integration/saved-search-fade: the '0.12 s to 0.2 s fade' fix described does not exist in the net diff against master (it was added and reverted inside this branch), and the evidence, check counts (157/163/175/217) and several cited commits are stale or not in the repository; the PR adds 22 binary files (about 6.4 MB).

PLAUSIBLE: chat-search-integration/run.py:83: the documented baseline run (--revision a190a124 --expect-regression) cannot build because StorySuggestions.swift calls helper.updateLayout(animated:) unconditionally.

@PystoyPlayer PystoyPlayer changed the title Keep chat search and utility actions in the title row Oct 28, 2026
@macosswift
macosswift merged commit e03785d into TelegramMessenger:master Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants