Files
Telegram-iOS/submodules/TelegramUI/Components
IsaacandClaude Opus 4.7 34c2c8c8a4 Postbox -> TelegramEngine wave 10: StorageFileListPanelComponent drop
Closes the last future-wave candidate from wave 8 by eliminating the
Icon.media(Media, ...) enum case in StorageFileListPanelComponent.swift
and dropping import Postbox. StorageUsageScreen (the module as a whole)
is now fully Postbox-free.

Icon enum split:
  case media(Media, TelegramMediaImageRepresentation)  ->
    case mediaFile(TelegramMediaFile, TelegramMediaImageRepresentation)
    case mediaImage(TelegramMediaImage, TelegramMediaImageRepresentation)

Equatable rewritten as switch-over-tuple with id-based equality per
concrete type (lFile.fileId == rFile.fileId / lImage.imageId ==
rImage.imageId), same semantics as the old media.id comparison.

Binding site: `if case let .media(media, representation)` +
`as? TelegramMediaFile` / `as? TelegramMediaImage` downcasts ->
compound case-binding `case let .mediaFile(_, representation), let
.mediaImage(_, representation):` to lift the shared representation
variable, plus an inner switch for the setSignal branch. The compiler-
enforced exhaustiveness of the split improves call-site safety.

Construction sites (2): `.media(file, representation)` -> `.mediaFile(
file, representation)`, `.media(image, representation)` -> `.mediaImage(
image, representation)`.

Placeholder fixup:
  messageId: EngineMessage.Id(peerId: PeerId(namespace: PeerId.Namespace
    ._internalFromInt32Value(0), id: PeerId.Id._internalFromInt64Value(0)
    ), namespace: 0, id: 0)
  ->
  messageId: EngineMessage.Id(peerId: component.context.account.peerId,
    namespace: 0, id: 0)

Inside a measureItem layout-measurement instance. Caught by second-pass
build failure `cannot find 'PeerId' in scope`. PeerId / PeerId.Namespace
/ PeerId.Id are raw Postbox types (not TelegramCore typealiases —
consistent with wave 9's MessageId -> EngineMessage.Id fixup). Using
context.account.peerId is semantically equivalent for the measurement
use case (messageId only feeds image-fetch userLocation and Equatable
comparison, neither exercised for this standalone instance).

Net: 1 file changed, +22 / -29 lines.

Plan: docs/superpowers/plans/2026-04-20-postbox-to-telegramengine-wave-10.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 01:46:18 +02:00
..
2026-02-02 15:54:43 +04:00
2026-02-23 13:51:13 +04:00
2025-12-26 20:29:30 +08:00
2026-04-07 11:31:22 +02:00
2026-04-14 15:33:19 +02:00
2026-04-16 21:45:26 +02:00
2026-03-27 11:24:08 +01:00
2026-02-02 15:54:43 +04:00
2025-11-26 23:05:30 +08:00
2025-09-12 10:54:22 +02:00
2026-04-14 03:33:34 +02:00
2025-11-26 23:05:30 +08:00
2026-04-14 03:33:34 +02:00
2026-04-19 21:48:47 +02:00
2026-01-13 19:21:49 +04:00
2026-01-25 22:17:49 +04:00
2026-02-27 16:49:29 +04:00
2026-03-10 00:38:36 +01:00
2025-10-17 17:01:25 +04:00
2026-04-18 08:41:08 +02:00
2026-03-11 18:51:44 +01:00
2026-02-02 15:54:43 +04:00
2026-03-24 22:51:44 +08:00
2026-03-28 00:52:16 +08:00
2026-04-07 11:31:22 +02:00
2026-04-07 11:31:22 +02:00
2026-01-25 22:17:49 +04:00
2026-02-03 20:17:44 +08:00
2025-09-09 20:39:17 +04:00
2026-04-07 11:31:22 +02:00
2025-10-16 05:30:06 +04:00
2026-04-15 23:12:53 +02:00
2026-03-13 11:04:33 +01:00
2026-03-27 16:48:23 +01:00
2025-12-26 20:29:30 +08:00
2026-01-25 22:17:49 +04:00
2026-04-03 15:50:39 +08:00
2025-12-01 22:13:33 +08:00
2026-04-15 23:12:53 +02:00
Fix
2026-03-07 15:33:36 +01:00
2026-03-22 05:17:29 +03:00
2026-04-14 03:33:34 +02:00
2026-02-27 14:34:18 +04:00
2026-01-25 22:17:49 +04:00
2025-08-21 09:08:35 +04:00
2026-03-10 19:33:45 +01:00
2026-01-25 00:31:18 +08:00
2026-04-14 15:33:19 +02:00
2026-04-15 23:12:53 +02:00
2025-12-06 01:28:06 +08:00
2026-04-07 11:31:22 +02:00
2026-04-19 14:17:48 +02:00
2026-03-10 00:38:36 +01:00
2025-11-07 22:54:56 +08:00
2026-04-03 15:50:39 +08:00
2026-04-16 21:45:26 +02:00
2026-03-30 02:55:35 +02:00
2026-04-16 01:18:22 +02:00
2025-12-28 22:39:34 +08:00
2026-02-02 15:54:43 +04:00
2026-02-25 04:38:32 +04:00
2026-02-20 13:28:58 +04:00
2026-01-25 00:31:18 +08:00
2025-08-08 12:41:03 +02:00
2026-04-07 11:31:22 +02:00
2025-11-15 01:14:50 +04:00
2026-01-16 21:23:32 +08:00
2026-02-13 12:23:53 +04:00
2026-04-07 06:36:13 +02:00
2025-10-28 15:44:44 +04:00
2026-03-22 05:17:29 +03:00
2025-12-28 22:39:34 +08:00
2026-03-22 13:44:04 +01:00
2025-07-18 16:10:54 +02:00
2025-12-16 20:05:44 +04:00
2026-03-22 05:17:29 +03:00
2025-12-26 20:29:30 +08:00
2026-03-22 05:17:29 +03:00
2026-04-14 15:33:19 +02:00
2026-04-14 04:53:01 +02:00
2026-02-13 17:08:48 +04:00
2026-03-03 20:26:45 +04:00
2025-12-02 14:28:47 +04:00