126 lines
7.3 KiB
Markdown
126 lines
7.3 KiB
Markdown
# Deck
|
|
|
|
A TweetDeck-style deck inside wayBetter for X: columns of X side by side, each in the account you
|
|
pick. Open it with **Ctrl+Shift+D**, the command palette ("Open deck"), or Settings → Deck → Open
|
|
deck. (It was called "Power User Mode" before 1.0.0; "Power User" is now only the name of a mode.)
|
|
|
|
## What a column is
|
|
|
|
Every column is a **real X tab**: its own WebView2 webview in the account profile you chose, on
|
|
x.com, running X's own code. wayBetter only
|
|
|
|
- lays the columns out (the deck tab draws a header strip per column; the X page covers the rest),
|
|
- hides X's chrome inside the column (left rail with its Post button, right column, narrow-layout
|
|
bars, docks, the page title the column header repeats, Home's inline composer),
|
|
- lets X's timeline fill the column width and applies the column's density,
|
|
- filters posts in the column (keywords, `/regex/`, hide replies, hide reposts, media only) by
|
|
hiding them on the page,
|
|
- counts unread posts from what X rendered (new posts above the ones you have seen, not scrolled
|
|
into view yet) and shows the number on the column header and the deck tab.
|
|
|
|
Nothing else. A column makes **no request of its own** and **no action of its own**: every post,
|
|
like, repost, reply and follow is X's UI, clicked by you. The only automatic click is navigation:
|
|
a Following column selects X's own Following tab (like the existing "Default to Following"
|
|
tweak). No direct GraphQL calls, no content sent to the shell; only the unread **number** leaves a
|
|
column page (see "Security" below).
|
|
|
|
Column types: Home, Following, Notifications, Mentions, Search (live results, with the X search
|
|
operator chips), List (link or id), Profile (@handle), Bookmarks.
|
|
|
|
## Using it
|
|
|
|
- **Add column** (deck bar, or the palette's "Add column…"): pick the type, the account and, for
|
|
search/list/profile, the value. The column opens in that account's profile.
|
|
- **Column header**: type icon, title, account avatar, unread badge (click: jump to the next unread
|
|
post), filters (funnel), ⋯ menu: mark all read, jump to unread, move left/right, width
|
|
(320/360/400/480), duplicate, open as tab, remove.
|
|
- After you open a post inside a column, the header's back arrow returns the column to its page.
|
|
- **Post**: the deck bar's Post button (Ctrl+Alt+N) docks X's own composer (x.com/compose/post) at
|
|
the right, in the account you pick there. You press X's Post; after it, the dock loads a fresh
|
|
composer.
|
|
- **Pages, not scrolling**: a page holds as many whole columns as fit the window (at most
|
|
"columns per page", default 6). The last page is filled from the end. Columns on other pages are
|
|
hidden and parked (WebView2's low memory target); they keep running.
|
|
|
|
## Keys
|
|
|
|
In a column, X's own keys work as always: j/k, l, r, t, b, n, ., g+h/n/r/…, `/`, `?`.
|
|
|
|
| Keys | Action |
|
|
|---|---|
|
|
| `[` / `]` | previous / next column (not while typing) |
|
|
| Alt+1 … Alt+9 | focus column 1–9 |
|
|
| Alt+PageUp / Alt+PageDown | previous / next page |
|
|
| Alt+R | mark the column read |
|
|
| Alt+U | jump to the next unread post |
|
|
| Ctrl+Alt+N | open/close the compose dock |
|
|
| Ctrl+Shift+D | deck and back to the tab you came from |
|
|
|
|
None of these collide with X's shortcut sheet (checked against x.com/i/keyboard_shortcuts,
|
|
2026-09-28, `verification/deck/REPORT.md`).
|
|
|
|
## Settings (Power User)
|
|
|
|
Column width for new columns, density (compact/comfortable), default column flags (autoplay off
|
|
and promoted posts hidden by default; counts and view counts optional), columns per page (the
|
|
memory guard warns above 6), park off-page columns (on by default), presets (Monitor, Two
|
|
accounts) and the list of decks.
|
|
|
|
## Memory
|
|
|
|
Each column is a full X page. Measured on the owner's workstation (private working set of the
|
|
whole app process tree, 60 s idle, 3 samples; `verification/deck/REPORT.md`):
|
|
|
|
| Deck | Run 1 | Run 2 |
|
|
|---|---|---|
|
|
| 0 columns (baseline) | 409 MB | 1,559 MB |
|
|
| 4 columns, autoplay off | 956 MB (+547, 137/column) | 1,986 MB (+426, 107/column) |
|
|
| 6 columns, autoplay off | 1,407 MB (+998, 166/column) | 2,263 MB (+703, 117/column) |
|
|
| 6 columns, autoplay on | 1,377 MB | 2,128 MB |
|
|
| 4 columns, autoplay on | 1,078 MB | 2,030 MB |
|
|
|
|
So a column costs about **110–170 MB**; 6 columns about 0.7–1 GB on top of the app. Both runs had
|
|
the window minimized (the owner was working), so columns were loaded but not painted; a visible,
|
|
autoplaying deck can use more. Autoplay on/off made no measurable difference in these conditions.
|
|
The baselines differ because run 2 had more ordinary tabs open in the background. The memory guard
|
|
warns above 6 columns per page; parking off-page columns (default) drops their caches.
|
|
|
|
## Limits
|
|
|
|
- Two columns of the **same account** are two pages: they do not share state instantly. A like in
|
|
one column shows in the other after X refreshes that post there (the same as two X tabs).
|
|
- Filters hide posts X already loaded; they do not change what X sends. A column with strict
|
|
filters can look empty until X loads more.
|
|
- Unread counts come from what X rendered. X renders a timeline lazily, so posts X has not put on
|
|
the page are not counted; X's own "Show N posts" row is added to the count.
|
|
- Reply and repost detection reads X's English UI text ("Replying to", "reposted").
|
|
- The deck layout lives in the shell (`bt.shell.decks.v1` in its local storage), not in a file.
|
|
|
|
## Security
|
|
|
|
Owner-approved capability widening (2026-09-28, Power User Mode):
|
|
|
|
- `tab_report` may carry `unread`: a number about the tab itself, capped at 999, accepted natively
|
|
only from a `tab-*` webview that is on x.com right now (`src-tauri/src/column.rs`).
|
|
- `column_configure { id, config }` is **shell-only**. `ColumnConfig` (waybetter-host `tabs.rs`) is
|
|
data: the column's page (must be on x.com), kind, density, at most 32 filters of at most 200
|
|
characters without control characters, allow-listed flags only (display and playback flags plus
|
|
the Following tab switch), and two counters (mark read, jump to unread).
|
|
- Deck keys are new `tab_shortcut` names (`column-*`, `deck-compose`, `deck-toggle`); bare keys are
|
|
forwarded only from a column page and never while a text field has focus.
|
|
|
|
## Where the code is
|
|
|
|
- Framework (site-agnostic): `waybetter/packages/shell/src/deckModel.ts` (decks, paging, focus),
|
|
the shell frame's deck (`waybetter/packages/shell/src/frame/DeckView.tsx`, `deckStore.ts`,
|
|
`AddColumnDialog.tsx`, `deck.css`: the deck tab, columns, filters, the add-column dialog; the
|
|
column kinds come from the site), `waybetter/packages/runtime/src/column.ts` (column mode in the
|
|
page), `paneModel.ts` (columns skip the rail rules), `waybetter/crates/waybetter-host/src/tabs.rs`
|
|
(`ColumnConfig`, `TabRole`, shortcuts, unread cap).
|
|
- App: `src/shell/xColumns.ts` (X's column kinds, pages, titles, flags, presets: `X_DECK`),
|
|
`ComposeDock.tsx`, `site.tsx` (hands both to the frame), `src/inject/column.ts` (X adapter); the panel's Power section is the framework's (`waybetter/packages/shell/src/panel/PowerSettings.tsx`, X's numbers in `src/ui/Panel.tsx`),
|
|
`src-tauri/src/column.rs`, `desktop.rs` (`column_configure`, unread); the deck keys are in the waybetter-host tab bridge
|
|
(`crates/waybetter-host/tab-bridge.js`).
|
|
- Tests: `waybetter` `deckModel.test.ts`, `column.test.ts`, host Rust tests; app
|
|
`tests/deck.test.ts`, Rust `column::tests`; `scripts/column-e2e.mjs` (fixture, 320/360/400),
|
|
`scripts/deck-check.mjs` (shell harness).
|