Skip to content

Force close a Channel if peer is not connected#150

Merged
ShahanaFarooqui merged 1 commit into
ElementsProject:Release-26.04from
ShahanaFarooqui:force-close
Mar 5, 2026
Merged

Force close a Channel if peer is not connected#150
ShahanaFarooqui merged 1 commit into
ElementsProject:Release-26.04from
ShahanaFarooqui:force-close

Conversation

@ShahanaFarooqui
Copy link
Copy Markdown
Collaborator

No description provided.

@ShahanaFarooqui ShahanaFarooqui linked an issue Mar 5, 2026 that may be closed by this pull request
@ShahanaFarooqui ShahanaFarooqui added this to the Release-26.04 milestone Mar 5, 2026
@ShahanaFarooqui ShahanaFarooqui merged commit 41e7ec0 into ElementsProject:Release-26.04 Mar 5, 2026
3 checks passed
8144225309 referenced this pull request in 8144225309/superscalar-wallet May 29, 2026
…pts view (#152 wallet) (#49)

Combined wallet half for two plugin RPCs that just landed:
  - factory-forget (superscalar-cln PR #76 / task #150 plugin half)
  - client-list-outgoing-joins (superscalar-cln PR #77 / task #152 plugin half)

#150 wallet half - Discard button on FactoryList
- Adds a Discard button next to Hide on each FactoryListItem, only shown
  when the factory qualifies for the plugin's factory-forget RPC:
    * lifecycle is FAILED or ABORTED (or ceremony=FAILED as a fallback
      for the brief window before the plugin auto-transitions the
      client side), AND
    * funding_txid has no non-zero hex chars (the plugin's zero-onchain-
      footprint gate), AND
    * n_channels === 0.
- Wires it to FactoriesService.forgetFactory + a refetch of the factory
  list on success. Per-item busy state via discardingIds Set so rapid
  clicks don't double-fire.
- Adds FactoryLifecycle.FAILED to the TS enum so PR #74's auto-
  terminalized factories render correctly (string mapping +
  bucketOf -> 'incomplete').

#152 wallet half - "My join attempts" view on Connect page
- New MyJoinAttemptsCard component below ConnectList. Calls the new
  client-list-outgoing-joins RPC, renders a status-badged table of
  every factory-join-request the client has fired (instance_id +
  lsp_node_id truncated, requested sats, sent block, status, optional
  reason).
- Status badge color: warning (sent/queued/accepted), success (signed),
  danger (rejected/cancelled/timeout), info (already_member).
- Empty state + manual Refresh button. Suppresses the noisy "method
  not found" before plugin upgrade ships with a clear hint pointing at
  PR #77.

Plumbing:
- http.service.ts: new FactoriesService.forgetFactory(instanceId) and
  FactoriesService.listOutgoingJoins() wrappers.

No behavior change for users on plugins that pre-date PRs #76 / #77;
the Discard button just stays hidden, and MyJoinAttemptsCard shows
the "Plugin does not expose ... yet" hint instead of a noisy crash.
8144225309 referenced this pull request in 8144225309/superscalar-wallet May 29, 2026
* feat(factories+connect): Discard button (#150 wallet) + My Join Attempts view (#152 wallet)

Combined wallet half for two plugin RPCs that just landed:
  - factory-forget (superscalar-cln PR #76 / task #150 plugin half)
  - client-list-outgoing-joins (superscalar-cln PR #77 / task #152 plugin half)

#150 wallet half - Discard button on FactoryList
- Adds a Discard button next to Hide on each FactoryListItem, only shown
  when the factory qualifies for the plugin's factory-forget RPC:
    * lifecycle is FAILED or ABORTED (or ceremony=FAILED as a fallback
      for the brief window before the plugin auto-transitions the
      client side), AND
    * funding_txid has no non-zero hex chars (the plugin's zero-onchain-
      footprint gate), AND
    * n_channels === 0.
- Wires it to FactoriesService.forgetFactory + a refetch of the factory
  list on success. Per-item busy state via discardingIds Set so rapid
  clicks don't double-fire.
- Adds FactoryLifecycle.FAILED to the TS enum so PR #74's auto-
  terminalized factories render correctly (string mapping +
  bucketOf -> 'incomplete').

#152 wallet half - "My join attempts" view on Connect page
- New MyJoinAttemptsCard component below ConnectList. Calls the new
  client-list-outgoing-joins RPC, renders a status-badged table of
  every factory-join-request the client has fired (instance_id +
  lsp_node_id truncated, requested sats, sent block, status, optional
  reason).
- Status badge color: warning (sent/queued/accepted), success (signed),
  danger (rejected/cancelled/timeout), info (already_member).
- Empty state + manual Refresh button. Suppresses the noisy "method
  not found" before plugin upgrade ships with a clear hint pointing at
  PR #77.

Plumbing:
- http.service.ts: new FactoriesService.forgetFactory(instanceId) and
  FactoriesService.listOutgoingJoins() wrappers.

No behavior change for users on plugins that pre-date PRs #76 / #77;
the Discard button just stays hidden, and MyJoinAttemptsCard shows
the "Plugin does not expose ... yet" hint instead of a noisy crash.

* fix(csp): allow style-src 'unsafe-inline' (#158)

react-perfect-scrollbar injects <style> tags at runtime when its
PerfectScrollbar wrapper mounts. The previous strict
`style-src 'self'` policy blocked these injections, which broke
the Dashboard and any other page using PerfectScrollbar
(Channels card, AccountEvents, FactoryList, ConnectList, etc.).

Adding 'unsafe-inline' for style-src only — script-src stays
strict, so the XSS surface remains negligible. The library is a
transitive dependency; the cleaner long-term fix is to migrate
off it, but that's a separate refactor.

Rationale comment added inline so future maintainers don't
re-tighten the policy without removing the library first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to add 10s timeout for closing an inactive channel

1 participant