pi-browser-taskbar-rails 0.1.0 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3c308da05c9c6e2e26a77a466a549454f8444b128b884596f882e3f69c3c03b
4
- data.tar.gz: 12a53b0f9467166cc976942baf5ad654378f3f9a26b097f7f8962b7f94fdbb36
3
+ metadata.gz: 6d94395b639373e05d1db317eb6d2fdaefb0dd304b35097e67c99531cd3ce352
4
+ data.tar.gz: 7d8ccd48d500a75a5ff784638cbf102f3051f3f4e26a1f3371347946ff07d251
5
5
  SHA512:
6
- metadata.gz: f723429595fd26ca8142908255baced015e764f114caa986468d1344332eb5063b9cd1084553bf988a32d0a2f53be7a66a411b7eec412619188c6e4bbe1d617b
7
- data.tar.gz: bf76fe4cef80f09161b45ef674a77e30c1a87d77bea2218a9c5163866642ade465264bf2324f5a82af3ec9d69ecf0440e4a3eb5851a7372c64f2c7ed2fa2d694
6
+ metadata.gz: 55336ed57493a893fe6949e5fe389a27683859d0ef1d9150575000e0e4f7e9ab52a5cc4cac96a6bddf3beffd545a20f6e1370f3ed77de627503dd6a6b252920d
7
+ data.tar.gz: abbeaa5c89536c8cf682c9aa80532d7915a23221e424c780c5dadb2d4ea73a48e5b14eaf22368c378b89219b3073a92bf29ab4e9531cf6bf12b7726d052dd13c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Rails adapter changelog
2
2
 
3
- ## 0.1.0 - Unreleased
3
+ ## 0.2.0 - Unreleased
4
+
5
+ - Refresh the active Rails page once after observing a successful task completion.
6
+ - Remove generated `defined?` guards and centralize taskbar activation in the ERB layout helper.
7
+ - Use automated clean-artifact, browser, and compatibility acceptance instead of manual real-Pi release attestation.
8
+
9
+ ## 0.1.0 - 2026-08-03
4
10
 
5
11
  - Add the development-only isolated engine, native CSRF/access boundary, ERB installer, and package-served Browser Client.
6
12
  - Add the external checkout-scoped broker with exclusive election, verified Unix-socket identity, fake-Pi task completion, and atomic admission.
data/README.md CHANGED
@@ -12,7 +12,7 @@ Add the matching product version to the development group:
12
12
 
13
13
  ```ruby
14
14
  group :development do
15
- gem "pi-browser-taskbar-rails", "~> 0.1.0", require: "pi/browser/taskbar/rails"
15
+ gem "pi-browser-taskbar-rails", "~> 0.2.0", require: "pi/browser/taskbar/rails"
16
16
  end
17
17
  ```
18
18
 
@@ -105,6 +105,6 @@ ERB/Turbo example.
105
105
 
106
106
  ## Matching-version contract
107
107
 
108
- This adapter version is `0.1.0`. Use the same product version shown by the Phoenix adapter and the
108
+ This adapter version is `0.2.0`. Use the same product version shown by the Phoenix adapter and the
109
109
  root `VERSION`; the packaged [Conformance Contract](contract/docs/index.md) is the offline normative
110
110
  reference for both adapters.
@@ -4,7 +4,7 @@ This index maps every normative section of [parent specification #17](https://gi
4
4
 
5
5
  [Issue #25](https://github.com/davelens/pi-browser-taskbar/issues/25) covers Shared task API, Pi RPC lifecycle, Browser Client interaction, and both adapter rows through shared cancellation HTTP scenarios, the accepted-abort transcript, native tests, and packaged cross-adapter conformance. [Issue #26](https://github.com/davelens/pi-browser-taskbar/issues/26) extends those rows with confirmed in-process session reset, retained-state rejection, recovery-only process replacement, and shared reset scenarios/transcripts. [Issue #27](https://github.com/davelens/pi-browser-taskbar/issues/27) adds shared progress/failure transcripts, human-readable activity, bounded UTF-8 output with visible truncation, cancelled extension dialogs, safe protocol failure recovery, and packaged Rails/Phoenix semantic comparison. [Issue #28](https://github.com/davelens/pi-browser-taskbar/issues/28) adds bounded task and abort deadlines, TERM-to-KILL owned-process cleanup, honest identity replacement, safe startup/exit handling, and equivalent native fake-Pi recovery/exhaustion scenarios. [Issue #29](https://github.com/davelens/pi-browser-taskbar/issues/29) completes Rails checkout-scoped continuity with reload/fork-safe persistent clients, verified concurrent broker election, idle-only grace, and multi-process replacement/crash/cleanup coverage. [Issue #30](https://github.com/davelens/pi-browser-taskbar/issues/30) adds rapid/stable polling, bounded network recovery, read-after-ambiguous-mutation reconciliation, single-host Turbo/LiveView lifecycle handling, conservative stale-mark removal, and current-browser cross-context/navigation acceptance. [Issue #31](https://github.com/davelens/pi-browser-taskbar/issues/31) fixes the five-setting server-owned configuration contract, native development fail-closed activation, canonical direct spawn with inherited environment, precise startup validation, and safe unavailable-executable behavior across both adapters. [Issue #32](https://github.com/davelens/pi-browser-taskbar/issues/32) completes exact normalized host/peer enforcement, native session CSRF with stable responses, safe logging, absent permissive CORS, persistent remote HTTP warnings, and trusted-network/proxy documentation across both adapters. [Issue #33](https://github.com/davelens/pi-browser-taskbar/issues/33) makes Phoenix host integration discoverable or explicitly selectable, generated through one checksummed seam, dependency-free outside development, atomically updatable, collision-safe, annotation-aware, and reversibly uninstallable with packaged clean-host evidence. [Issue #34](https://github.com/davelens/pi-browser-taskbar/issues/34) gives Rails the corresponding atomic checksummed generator, conventional or explicit ERB layout and mount selection, native development-only helper/configuration seams, mutation refusal, idempotent update, all-or-nothing inverse, and built-gem clean-host evidence. [Issue #35](https://github.com/davelens/pi-browser-taskbar/issues/35) completes the taskbar-owned Corner composer with lifecycle semantics, native accessible controls, one live region, keyboard/focus paths, Shadow DOM isolation, narrow/200% reflow, reduced motion, and equivalent packaged-bundle DOM/current-browser evidence. [Issue #36](https://github.com/davelens/pi-browser-taskbar/issues/36) proves the built Phoenix package and public installer in Recollect before removing its application-local runtime, API, assets, configuration, fake peer, and tests, with no provisional compatibility seam.
6
6
 
7
- [Issue #38](https://github.com/davelens/pi-browser-taskbar/issues/38) makes the complete Rails boundary matrix executable from built artifacts in clean generated applications, with a fast pull-request subset, supported Puma topology rows, synchronized MRI/Linux claims, and per-row JSON evidence. [Issue #39](https://github.com/davelens/pi-browser-taskbar/issues/39) completes the corresponding Phoenix matrix from 1.7 through 1.8 at fixed Elixir floors and newest Elixir/OTP, using clean conventional apps, isolated built-Hex installation, controller-HEEx/LiveView evidence, and synchronized standard BEAM/Linux claims. [Issue #40](https://github.com/davelens/pi-browser-taskbar/issues/40) completes artifact-isolated Chromium, Firefox, and WebKit example acceptance, taskbar-owned automated accessibility and lifecycle checks, and deterministic browser evidence. [Issue #41](https://github.com/davelens/pi-browser-taskbar/issues/41) enforces protected-main source identity, lockstep versions, deterministic artifact bytes, strict package contents, clean artifact-installed acceptance, honest human-evidence prerequisites, checksums, and an immutable provenance handoff before publication. [Issue #42](https://github.com/davelens/pi-browser-taskbar/issues/42) adds protected OIDC/credential publication, ordered registry reconciliation, public-byte and clean-install verification, durable resumable checkpoints, partial roll-forward, and tag/announcement gates exercised entirely with deterministic fakes in ordinary CI.
7
+ [Issue #38](https://github.com/davelens/pi-browser-taskbar/issues/38) makes the complete Rails boundary matrix executable from built artifacts in clean generated applications, with a fast pull-request subset, supported Puma topology rows, synchronized MRI/Linux claims, and per-row JSON evidence. [Issue #39](https://github.com/davelens/pi-browser-taskbar/issues/39) completes the corresponding Phoenix matrix from 1.7 through 1.8 at fixed Elixir floors and newest Elixir/OTP, using clean conventional apps, isolated built-Hex installation, controller-HEEx/LiveView evidence, and synchronized standard BEAM/Linux claims. [Issue #40](https://github.com/davelens/pi-browser-taskbar/issues/40) completes artifact-isolated Chromium, Firefox, and WebKit example acceptance, taskbar-owned automated accessibility and lifecycle checks, and deterministic browser evidence. [Issue #41](https://github.com/davelens/pi-browser-taskbar/issues/41) enforces protected-main source identity, lockstep versions, deterministic artifact bytes, strict package contents, automated clean artifact-installed acceptance, checksums, and an immutable provenance handoff before publication. [Issue #42](https://github.com/davelens/pi-browser-taskbar/issues/42) adds protected OIDC/credential publication, ordered registry reconciliation, public-byte and clean-install verification, durable resumable checkpoints, partial roll-forward, and tag/announcement gates exercised entirely with deterministic fakes in ordinary CI.
8
8
 
9
9
  | Normative section | Owner | Eventual acceptance seam | Status |
10
10
  | --- | --- | --- | --- |
@@ -170,7 +170,7 @@ module PiBrowserTaskbar
170
170
  # pi-browser-taskbar:metadata #{JSON.generate(metadata)}
171
171
  # pi-browser-taskbar:checksum #{"0" * 64}
172
172
  # pi-browser-taskbar:start configuration
173
- if Rails.env.development? && defined?(Pi::Browser::Taskbar::Rails)
173
+ if Rails.env.development?
174
174
  Pi::Browser::Taskbar::Rails.configure do |config|
175
175
  config.mount_path = #{metadata.fetch("mount").inspect}
176
176
  config.project_root = Rails.root.to_s
@@ -207,7 +207,7 @@ module PiBrowserTaskbar
207
207
  end
208
208
 
209
209
  def route_block(mount)
210
- body = " mount Pi::Browser::Taskbar::Rails::Engine => #{mount.inspect} if Rails.env.development? && defined?(Pi::Browser::Taskbar::Rails::Engine) && Pi::Browser::Taskbar::Rails.active?\n"
210
+ body = " mount Pi::Browser::Taskbar::Rails::Engine => #{mount.inspect} if Rails.env.development? && Pi::Browser::Taskbar::Rails.active?\n"
211
211
  marked_block("routes", :ruby, body)
212
212
  end
213
213
 
@@ -255,7 +255,7 @@ module PiBrowserTaskbar
255
255
  end
256
256
 
257
257
  def layout_block
258
- body = "<%= pi_browser_taskbar_tags if Rails.env.development? && defined?(Pi::Browser::Taskbar::Rails) && Pi::Browser::Taskbar::Rails.active? %>\n"
258
+ body = "<%= pi_browser_taskbar_tags if Rails.env.development? %>\n"
259
259
  marked_block("layout", :erb, body)
260
260
  end
261
261
 
@@ -2,7 +2,7 @@
2
2
  (() => {
3
3
  "use strict";
4
4
 
5
- function createBrowserClient({ framework, contextProvider, productVersion, contractVersion }) {
5
+ function createBrowserClient({ framework, contextProvider, productVersion, contractVersion, refreshOnCompletion }) {
6
6
  if (!framework || !contextProvider || typeof contextProvider.sourceHint !== "function") {
7
7
  throw new TypeError("A framework and ContextProvider are required");
8
8
  }
@@ -226,10 +226,13 @@
226
226
  }
227
227
 
228
228
  function acceptSnapshot(nextSnapshot) {
229
+ const completed = snapshot?.task?.id === nextSnapshot?.task?.id &&
230
+ snapshot?.task?.status === "running" && nextSnapshot?.task?.status === "completed";
229
231
  snapshot = nextSnapshot;
230
232
  pollFailures = 0;
231
233
  render();
232
234
  schedulePoll(rapid(snapshot) ? 500 : 30000);
235
+ if (completed && refreshOnCompletion) pageLocation?.reload?.();
233
236
  }
234
237
 
235
238
  async function reconcileMutationFailure(error) {
@@ -1273,14 +1276,15 @@ function hint(status, references = []) {
1273
1276
  contractVersion: 1,
1274
1277
  contextProvider,
1275
1278
  framework: "rails",
1276
- productVersion: "0.1.0",
1279
+ productVersion: "0.2.0",
1280
+ refreshOnCompletion: true,
1277
1281
  });
1278
1282
 
1279
1283
  globalThis.PiBrowserTaskbar = Object.freeze({
1280
1284
  contractVersion: 1,
1281
1285
  framework: "rails",
1282
1286
  mount: client.mount,
1283
- productVersion: "0.1.0",
1287
+ productVersion: "0.2.0",
1284
1288
  });
1285
1289
 
1286
1290
  const bootstrap = globalThis.document?.querySelector?.("[data-pi-browser-taskbar-bootstrap]");
@@ -25,12 +25,12 @@ module Pi
25
25
  after: :load_config_initializers do |app|
26
26
  next unless ::Rails.env.development?
27
27
 
28
+ ActionView::Base.include(Pi::Browser::Taskbar::Rails::LayoutHelper) unless ActionView::Base < Pi::Browser::Taskbar::Rails::LayoutHelper
28
29
  Pi::Browser::Taskbar::Rails.finalize_configuration!(default_project_root: app.root.to_s)
29
30
  next unless Pi::Browser::Taskbar::Rails.active?
30
31
 
31
32
  app.config.action_view.annotate_rendered_view_with_filenames = true
32
33
  ActionView::Base.annotate_rendered_view_with_filenames = true
33
- ActionView::Base.include(Pi::Browser::Taskbar::Rails::LayoutHelper) unless ActionView::Base < Pi::Browser::Taskbar::Rails::LayoutHelper
34
34
  end
35
35
 
36
36
  config.after_initialize do |_app|
@@ -4,7 +4,7 @@ module Pi
4
4
  module Browser
5
5
  module Taskbar
6
6
  module Rails
7
- VERSION = "0.1.0"
7
+ VERSION = "0.2.0"
8
8
  end
9
9
  end
10
10
  end
@@ -13,6 +13,8 @@ module Pi
13
13
  module Rails
14
14
  module LayoutHelper
15
15
  def pi_browser_taskbar_tags
16
+ return "" unless Pi::Browser::Taskbar::Rails.active?
17
+
16
18
  Pi::Browser::Taskbar::Rails.layout_bootstrap(self)
17
19
  end
18
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pi-browser-taskbar-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Lens
@@ -60,8 +60,8 @@ licenses:
60
60
  - MIT
61
61
  metadata:
62
62
  homepage_uri: https://github.com/davelens/pi-browser-taskbar
63
- source_code_uri: https://github.com/davelens/pi-browser-taskbar/tree/v0.1.0
64
- changelog_uri: https://github.com/davelens/pi-browser-taskbar/blob/v0.1.0/packages/rails/CHANGELOG.md
63
+ source_code_uri: https://github.com/davelens/pi-browser-taskbar/tree/v0.2.0
64
+ changelog_uri: https://github.com/davelens/pi-browser-taskbar/blob/v0.2.0/packages/rails/CHANGELOG.md
65
65
  post_install_message:
66
66
  rdoc_options: []
67
67
  require_paths: