Skip to content

add about section#91

Merged
keraliss merged 1 commit into
mainfrom
add_about
Apr 29, 2026
Merged

add about section#91
keraliss merged 1 commit into
mainfrom
add_about

Conversation

@keraliss
Copy link
Copy Markdown
Collaborator

@keraliss keraliss commented Apr 28, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added About page displaying app and binary version information.
    • Improved connection verification logic for better status handling.
  • Refactor

    • Streamlined taker initialization by removing offerbook polling step.
  • Documentation

    • Added comprehensive documentation on API gaps and current workarounds.
  • Style

    • Added new CSS utilities for enhanced layout flexibility.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@keraliss has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 11 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 74fb9931-6c2a-4a3d-9e4c-62448ccf31cf

📥 Commits

Reviewing files that changed from the base of the PR and between 732fd4a and 06f452e.

📒 Files selected for processing (8)
  • api1.js
  • preload.js
  • src/components/Nav.js
  • src/components/about/About.js
  • src/components/connection/ConnectionStatus.js
  • src/components/taker/TakerInitialization.js
  • src/js/app.js
  • src/styles/output.css
📝 Walkthrough

Walkthrough

This PR introduces an About page displaying app version information retrieved via a new Electron IPC endpoint, and removes offerbook sync polling from the taker initialization flow. It also updates navigation, connection handling, and CSS utilities.

Changes

Cohort / File(s) Summary
Version Info API
api1.js, preload.js
Adds new app:getVersionInfo IPC endpoint to report app and binary versions; exposes api.app.getVersionInfo() to renderer via preload with error handling and fallback to 'unknown' for binary version.
About Page UI
src/components/Nav.js, src/components/about/About.js, src/styles/output.css
Introduces About navigation item, creates new AboutComponent that displays version info fetched via IPC, and adds .max-w-3xl and .leading-relaxed CSS utilities while removing .grid-cols-8.
Initialization & Connection Flow
src/components/taker/TakerInitialization.js, src/components/connection/ConnectionStatus.js, src/js/app.js
Removes offerbook sync polling and status checks from taker initialization; updates connection status handler to verify already-connected state; rewires app startup to use startTakerInitWithConfig() instead of removed conditional initialization flow.
Documentation
docs/missing-apis.md
Adds comprehensive catalog of 13 missing API gaps in taker GUI with existing workarounds and proposed API shapes; prioritizes items 1–4 for enabling removal of log parsing and file polling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A page to show what version runs,
No more polling files in the sun!
The About appears, so neat and clean,
IPC whispers what versions mean,
Simpler flows—a rabbit's dream! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'add about section' directly and concisely describes the main feature addition: a new About component with version information display across multiple files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add_about

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@keraliss keraliss linked an issue Apr 28, 2026 that may be closed by this pull request
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/missing-apis.md`:
- Line 1: Remove the stray backtick at the start of the markdown heading so the
line reads as a proper H1: "Missing APIs — Taker App Request List"; open
docs/missing-apis.md, locate the heading that currently begins with "`# Missing
APIs — Taker App Request List" and delete the leading backtick so the heading
renders correctly.

In `@src/components/about/About.js`:
- Around line 43-49: The current code calling window.api.app.getVersionInfo only
sets container.querySelector('#app-version').textContent using
result.appVersion; update the handler usage to also read result.binaryVersion
and set a DOM element (e.g.,
container.querySelector('#binary-version').textContent) so the coinswap-napi
binary version is displayed alongside the app version; keep the existing
fallback for errors/unavailable and ensure you only update the binary element
when result.success is true (or set it to 'unavailable' on error) so both
'#app-version' and '#binary-version' reflect the version info.

In `@src/components/connection/ConnectionStatus.js`:
- Around line 231-242: The existing branch handling result.alreadyConnected can
recurse indefinitely because it calls startConnection() directly when
bitcoindConnection.testConnection() fails; modify this to use a bounded retry
mechanism instead: add or pass a retry counter (e.g., maxRetries and
currentAttempt) into startConnection and decrement on each retry, or invoke the
component's existing retry handler rather than calling startConnection()
directly; update the code paths around result.alreadyConnected,
bitcoindConnection.testConnection(), bitcoindConnection.disconnect(), and
startConnection() so failures trigger a controlled retry (or a single scheduled
retry) and eventually showError when retries are exhausted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8278d147-11f8-46ae-bdf8-1760512047bf

📥 Commits

Reviewing files that changed from the base of the PR and between 04ae1e1 and 732fd4a.

📒 Files selected for processing (9)
  • api1.js
  • docs/missing-apis.md
  • preload.js
  • src/components/Nav.js
  • src/components/about/About.js
  • src/components/connection/ConnectionStatus.js
  • src/components/taker/TakerInitialization.js
  • src/js/app.js
  • src/styles/output.css
💤 Files with no reviewable changes (1)
  • src/components/taker/TakerInitialization.js

Comment thread docs/missing-apis.md Outdated
@@ -0,0 +1,176 @@
`# Missing APIs — Taker App Request List
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Malformed markdown heading — stray backtick.

Line 1 starts with a backtick before the # heading marker, which will break markdown rendering:

-`# Missing APIs — Taker App Request List
+# Missing APIs — Taker App Request List
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
`# Missing APIs — Taker App Request List
# Missing APIs — Taker App Request List
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/missing-apis.md` at line 1, Remove the stray backtick at the start of
the markdown heading so the line reads as a proper H1: "Missing APIs — Taker App
Request List"; open docs/missing-apis.md, locate the heading that currently
begins with "`# Missing APIs — Taker App Request List" and delete the leading
backtick so the heading renders correctly.

Comment on lines +43 to +49
try {
const result = await window.api.app.getVersionInfo();
const version = result.success ? `v${result.appVersion}` : 'unavailable';
container.querySelector('#app-version').textContent = version;
} catch (_) {
container.querySelector('#app-version').textContent = 'unavailable';
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider displaying the binary version as well.

The app:getVersionInfo handler returns both appVersion and binaryVersion, but only appVersion is displayed. For debugging and support purposes, showing the coinswap-napi binary version could be valuable.

💡 Optional enhancement
   try {
     const result = await window.api.app.getVersionInfo();
-    const version = result.success ? `v${result.appVersion}` : 'unavailable';
+    const version = result.success 
+      ? `v${result.appVersion} (napi: ${result.binaryVersion})`
+      : 'unavailable';
     container.querySelector('#app-version').textContent = version;
   } catch (_) {
     container.querySelector('#app-version').textContent = 'unavailable';
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
try {
const result = await window.api.app.getVersionInfo();
const version = result.success ? `v${result.appVersion}` : 'unavailable';
container.querySelector('#app-version').textContent = version;
} catch (_) {
container.querySelector('#app-version').textContent = 'unavailable';
}
try {
const result = await window.api.app.getVersionInfo();
const version = result.success
? `v${result.appVersion} (napi: ${result.binaryVersion})`
: 'unavailable';
container.querySelector('#app-version').textContent = version;
} catch (_) {
container.querySelector('#app-version').textContent = 'unavailable';
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/about/About.js` around lines 43 - 49, The current code calling
window.api.app.getVersionInfo only sets
container.querySelector('#app-version').textContent using result.appVersion;
update the handler usage to also read result.binaryVersion and set a DOM element
(e.g., container.querySelector('#binary-version').textContent) so the
coinswap-napi binary version is displayed alongside the app version; keep the
existing fallback for errors/unavailable and ensure you only update the binary
element when result.success is true (or set it to 'unavailable' on error) so
both '#app-version' and '#binary-version' reflect the version info.

Comment on lines +231 to 242
if (result.alreadyConnected) {
// Connection existed before our patch was in place — verify and proceed
const check = await bitcoindConnection.testConnection();
if (check.success) {
showSuccess(check.info);
} else {
bitcoindConnection.disconnect();
startConnection(); // retry from scratch
}
} else if (!result.success) {
showError(result.finalError || result.error);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Potential infinite recursion when existing connection verification fails.

If testConnection() repeatedly fails after alreadyConnected, the code calls startConnection() recursively without any retry limit. This could cause a stack overflow or infinite loop if the connection is persistently unhealthy.

Consider adding a retry counter or reusing the existing retry mechanism instead of direct recursion:

🛡️ Proposed fix
-            if (result.alreadyConnected) {
-                // Connection existed before our patch was in place — verify and proceed
-                const check = await bitcoindConnection.testConnection();
-                if (check.success) {
-                    showSuccess(check.info);
-                } else {
-                    bitcoindConnection.disconnect();
-                    startConnection(); // retry from scratch
-                }
+            if (result.alreadyConnected) {
+                // Connection existed before our patch was in place — verify and proceed
+                const check = await bitcoindConnection.testConnection();
+                if (check.success) {
+                    showSuccess(check.info);
+                } else {
+                    // Reset connection state and let the patched _performConnection handle retries
+                    bitcoindConnection.disconnect();
+                    bitcoindConnection.isConnected = false;
+                    const retryResult = await bitcoindConnection.connect();
+                    if (!retryResult.success) {
+                        showError(retryResult.finalError || retryResult.error);
+                    }
+                }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (result.alreadyConnected) {
// Connection existed before our patch was in place — verify and proceed
const check = await bitcoindConnection.testConnection();
if (check.success) {
showSuccess(check.info);
} else {
bitcoindConnection.disconnect();
startConnection(); // retry from scratch
}
} else if (!result.success) {
showError(result.finalError || result.error);
}
if (result.alreadyConnected) {
// Connection existed before our patch was in place — verify and proceed
const check = await bitcoindConnection.testConnection();
if (check.success) {
showSuccess(check.info);
} else {
// Reset connection state and let the patched _performConnection handle retries
bitcoindConnection.disconnect();
bitcoindConnection.isConnected = false;
const retryResult = await bitcoindConnection.connect();
if (!retryResult.success) {
showError(retryResult.finalError || retryResult.error);
}
}
} else if (!result.success) {
showError(result.finalError || result.error);
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/connection/ConnectionStatus.js` around lines 231 - 242, The
existing branch handling result.alreadyConnected can recurse indefinitely
because it calls startConnection() directly when
bitcoindConnection.testConnection() fails; modify this to use a bounded retry
mechanism instead: add or pass a retry counter (e.g., maxRetries and
currentAttempt) into startConnection and decrement on each retry, or invoke the
component's existing retry handler rather than calling startConnection()
directly; update the code paths around result.alreadyConnected,
bitcoindConnection.testConnection(), bitcoindConnection.disconnect(), and
startConnection() so failures trigger a controlled retry (or a single scheduled
retry) and eventually showError when retries are exhausted.

@keraliss keraliss merged commit 28df48b into main Apr 29, 2026
1 check passed
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.

Add About menu in the app

1 participant