oc-flight-deck 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/tui/index.tsx +6 -4
- package/src/tui/rows.ts +22 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.10.3] - 2026-10-02
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The `ses` row no longer bleeds past the rail. It again draws a short-pruned preview of the session id - width-aware, with an ellipsis, so it reads as a preview of a longer value - instead of the full 30-character id wrapping out of bounds. The click still copies the **full** id; only the display is pruned.
|
|
13
|
+
- A successful copy is now silent. The success toast is gone, since the copied value is already on the clipboard when the gesture works. A copy that could **not** be confirmed still shows its failure toast - a silent no-op must never masquerade as a success.
|
|
14
|
+
|
|
8
15
|
## [0.10.2] - 2026-10-02
|
|
9
16
|
|
|
10
17
|
### Fixed
|
|
@@ -23,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
30
|
|
|
24
31
|
- Opt-in `ses` sidebar row: shows the full session id (the rail wraps it), and a mouse click copies that same full id and reports the outcome - a confirmation naming the id when the copy was sent, a distinct failure message when the terminal cannot take it. Off by default, and degrades gracefully when the terminal cannot copy.
|
|
25
32
|
|
|
33
|
+
[0.10.3]: https://github.com/nathwn12/oc-flight-deck/compare/v0.10.2...v0.10.3
|
|
26
34
|
[0.10.2]: https://github.com/nathwn12/oc-flight-deck/compare/v0.10.1...v0.10.2
|
|
27
35
|
[0.10.1]: https://github.com/nathwn12/oc-flight-deck/compare/v0.10.0...v0.10.1
|
|
28
36
|
[0.10.0]: https://github.com/nathwn12/oc-flight-deck/compare/v0.9.0...v0.10.0
|
package/package.json
CHANGED
package/src/tui/index.tsx
CHANGED
|
@@ -101,10 +101,11 @@ export default Plugin.define({
|
|
|
101
101
|
// the full session id. The handler wraps the line in a box so it fires
|
|
102
102
|
// wherever the row is clicked (mouse events bubble up, never down), and
|
|
103
103
|
// it closes over the id from THIS render - see `snapshot` for why the id
|
|
104
|
-
// is never cached.
|
|
105
|
-
// a
|
|
106
|
-
//
|
|
107
|
-
//
|
|
104
|
+
// is never cached. A verified copy is silent: the owner objects to the
|
|
105
|
+
// noise of a toast confirming a gesture that plainly worked, so the only
|
|
106
|
+
// host-reactive surface (`./ticker.ts`) is reserved for a genuine failure,
|
|
107
|
+
// where the honesty rail requires that a no-op can never pass as a
|
|
108
|
+
// success. The call is wrapped so a failure in it can never throw out of
|
|
108
109
|
// the mouse handler.
|
|
109
110
|
if (copyId === undefined) return text;
|
|
110
111
|
return (
|
|
@@ -117,6 +118,7 @@ export default Plugin.define({
|
|
|
117
118
|
try {
|
|
118
119
|
const result = await copyToClipboard(context.renderer, copyId);
|
|
119
120
|
const fb = copyFeedback(result, copyId);
|
|
121
|
+
if (fb.ok) return;
|
|
120
122
|
context.ui.toast.show({
|
|
121
123
|
title: "Flight Deck",
|
|
122
124
|
message: fb.message,
|
package/src/tui/rows.ts
CHANGED
|
@@ -23,6 +23,17 @@ import {
|
|
|
23
23
|
/** Braille frames, advanced by the ticker, shown only while the session runs. */
|
|
24
24
|
const SPINNER = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] as const;
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Value-column budget for the `ses` row's preview, in cells.
|
|
28
|
+
*
|
|
29
|
+
* Same width the `perms` row clips its resource to, because that is the column
|
|
30
|
+
* this roughly thirty-odd-column rail was designed to fit: the label column
|
|
31
|
+
* plus a value of this length stays inside the panel. A full 30-character
|
|
32
|
+
* session id is always shortened at this budget and gets the ellipsis appended
|
|
33
|
+
* - the row reads as a preview of a longer value, never as the value.
|
|
34
|
+
*/
|
|
35
|
+
const SES_PREVIEW_WIDTH = 18;
|
|
36
|
+
|
|
26
37
|
/**
|
|
27
38
|
* Flatten control characters in anything about to be drawn.
|
|
28
39
|
*
|
|
@@ -385,9 +396,17 @@ export function statLine(
|
|
|
385
396
|
}
|
|
386
397
|
case "ses": {
|
|
387
398
|
const id = asText(source.sessionId);
|
|
388
|
-
//
|
|
389
|
-
//
|
|
390
|
-
|
|
399
|
+
// A short preview, never the full id: the rail is roughly thirty-odd
|
|
400
|
+
// columns wide and the label already costs its column, so the 30-character
|
|
401
|
+
// id runs past the panel. `clip` shortens width-aware and appends the
|
|
402
|
+
// ellipsis that tells the reader this is a preview, not the value. The
|
|
403
|
+
// full id still lives on `source.sessionId`, which is what the row's click
|
|
404
|
+
// gesture copies - the display and the copy are separate values.
|
|
405
|
+
//
|
|
406
|
+
// Budget `SES_PREVIEW_WIDTH` (18), matching the `perms` row's clip width:
|
|
407
|
+
// that is the column this rail was designed to fit, so a preview of that
|
|
408
|
+
// length sits inside it beside the label.
|
|
409
|
+
return id === undefined ? undefined : row("ses", clip(id, SES_PREVIEW_WIDTH));
|
|
391
410
|
}
|
|
392
411
|
case "go": {
|
|
393
412
|
// The plain string is the exact join of the coloured segments, so the
|