@goodandready/dsh-context-lens 0.1.19 → 0.1.21

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 CHANGED
@@ -5,7 +5,22 @@ All notable changes to `@goodandready/dsh-context-lens` will be documented in th
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.1.19] - 2026-09-18
8
+ ## [0.1.21] - 2026-09-19
9
+
10
+ ### Fixed
11
+ - **Settings reachable again**: the card registered into `settings.plugin.item`, a
12
+ slot the current DSH core (0.1.6-alpha.2) no longer renders, so the settings were
13
+ unreachable. The surface now registers into the Plugins page row seat
14
+ `plugins.row.config`, keyed `@goodandready/dsh-context-lens#dsh-context-lens`
15
+ (`rowConfigKey(package, rowId)`): the plugin's row gains a configure control whose
16
+ page is the settings form (`view: 'page'`, without our header and card chrome —
17
+ the host page draws the title, icon, crumb and padding) plus a one-line state for
18
+ `view: 'summary'`. The legacy seat stays registered as a fallback for older cores.
19
+ - Guard `test/row-seat.test.mjs`: row key against `package.json` and
20
+ `cordis.patch.yml`, seat order (row seat first, legacy seat kept), bare page
21
+ render and no duplicate `settings.section`.
22
+
23
+ ## [0.1.20] - 2026-09-18
9
24
 
10
25
  ### Fixed
11
26
  - **UI Slot Registration Error Diagnostics (#76)**: Replaced silent/empty `catch` blocks in `lib/client.js` for `sidebar.right.pane.tab`, `conversation.session.header.utilities`, and `betterSidebar` slot registrations with descriptive `console.warn` diagnostic logs. Added explicit fallback intention comments for locale snapshot handling.
package/lib/client.js CHANGED
@@ -4,6 +4,11 @@ window.__ModuleLoader__.load({
4
4
  var module = { exports: {} };
5
5
  const React = require('react');
6
6
  const NS = '@goodandready/dsh-context-lens';
7
+ // Plugins page row seat (DSH 0.1.6-alpha.2): key = '<package name>#<row id>',
8
+ // row id as cordis.patch.yml declares it.
9
+ const PKG = '@goodandready/dsh-context-lens';
10
+ const ROW_ID = 'dsh-context-lens';
11
+ const ROW_CONFIG_KEY = PKG + '#' + ROW_ID;
7
12
 
8
13
  const en = {
9
14
  'update.available': 'Update available: v{latestVersion} (current: v{currentVersion})',
@@ -592,9 +597,9 @@ window.__ModuleLoader__.load({
592
597
  );
593
598
  }
594
599
 
595
- function PluginCardInner({ ctx: _ctx, t }) {
600
+ function PluginCardInner({ ctx: _ctx, t, page }) {
596
601
  ensureCss();
597
- const [expanded, setExpanded] = React.useState(false);
602
+ const [expanded, setExpanded] = React.useState(!!page);
598
603
  const [draft, setDraft] = React.useState({
599
604
  compressionMode: 'balanced',
600
605
  astSkeletonMaxDepth: 3,
@@ -811,10 +816,11 @@ window.__ModuleLoader__.load({
811
816
  }
812
817
  }
813
818
 
814
- return React.createElement('li', { className: 'cl-section-card' },
819
+ return React.createElement(page ? 'div' : 'li', { className: page ? 'cl-page' : 'cl-section-card' },
815
820
  React.createElement('button', {
816
821
  type: 'button',
817
822
  className: 'cl-section-header',
823
+ style: page ? { display: 'none' } : undefined,
818
824
  onClick: () => setExpanded(!expanded),
819
825
  'aria-expanded': expanded
820
826
  },
@@ -957,8 +963,15 @@ window.__ModuleLoader__.load({
957
963
  }
958
964
 
959
965
  function PluginCard(props) {
966
+ // Row seat (plugins.row.config): one-liner for the summary, the form without
967
+ // our header/card chrome for the page (the host page draws those itself).
968
+ if (props && props.view === 'summary') {
969
+ return React.createElement('span', { className: 'cl-sub' },
970
+ 'Context lens: token savings, compaction and budget insights.');
971
+ }
972
+ const page = !!(props && props.view === 'page');
960
973
  return React.createElement(ErrorBoundary, null,
961
- React.createElement(PluginCardInner, props)
974
+ React.createElement(PluginCardInner, Object.assign({}, props, { page }))
962
975
  );
963
976
  }
964
977
 
@@ -986,6 +999,21 @@ window.__ModuleLoader__.load({
986
999
  }
987
1000
  if (!ctx.slots) return;
988
1001
  let registered = false;
1002
+ // Primary seat for the current core (0.1.6-alpha.2): the plugin's own row on
1003
+ // the Plugins page, keyed '<package>#<row id>'. The legacy settings.plugin.item
1004
+ // seat below stays as a fallback for older cores.
1005
+ if (typeof ctx.slots.inject === 'function') {
1006
+ try {
1007
+ ctx.slots.inject('plugins.row.config', () => ctx.slots.register({
1008
+ name: 'plugins.row.config',
1009
+ key: ROW_CONFIG_KEY,
1010
+ locale: NS,
1011
+ inject: () => ({ ctx })
1012
+ }, PluginCard));
1013
+ } catch (e) {
1014
+ console.error('[dsh-context-lens] plugins.row.config inject failed', e && e.stack || e);
1015
+ }
1016
+ }
989
1017
  const doRegister = () => {
990
1018
  if (registered) return;
991
1019
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-context-lens",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "DSH plugin for AST context compression, test log filtering, and token budget guard",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",