Skip to content

Commit ad84fe1

Browse files
authored
fix: empty host field (#28)
Fixes #22. Also update the build process: * Libraries are no longer bundled together with application codes, and output under `out/ext/lib` instead. * Add a Makefile.
2 parents 2d65368 + 150bba4 commit ad84fe1

File tree

11 files changed

+276
-104
lines changed

11 files changed

+276
-104
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "Node.js & JavaScript",
33
"image": "mcr.microsoft.com/devcontainers/javascript-node",
44
"features": {
5-
"ghcr.io/devcontainers/features/git-lfs": "none",
65
"ghcr.io/devcontainers/features/node": "lts"
76
},
87
"postCreateCommand": "sh .devcontainer/init.sh",

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ indent_size = 2
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+
11+
[Makefile]
12+
indent_style = tab

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: '🐞 Report a bug'
2-
description: Is something wrong?
2+
description: Something is wrong
33
type: Bug
4-
title: '[BUG] '
4+
title: '[Bug]'
55
body:
66
- type: textarea
77
attributes:
@@ -13,15 +13,15 @@ body:
1313

1414
- type: textarea
1515
attributes:
16-
label: What is the expected behavior after steps above?
17-
value: "* The text editor shows..."
16+
label: What is the expected behavior after the steps above?
17+
value: "* The text editor should show[...]"
1818
validations:
1919
required: true
2020

2121
- type: textarea
2222
attributes:
2323
label: What did happen instead?
24-
value: "* An error occurs..."
24+
value: "* An error occurs[...]"
2525
validations:
2626
required: true
2727

@@ -34,24 +34,25 @@ body:
3434
label: OS
3535
multiple: false
3636
options:
37+
- N/A
3738
- Windows
3839
- macOS
3940
- Linux
40-
- Other / Multiple / Not relevant
41+
- Other / Multiple
4142
validations:
4243
required: true
4344

4445
- type: input
4546
attributes:
4647
label: Thunderbird version
4748
validations:
48-
required: true
49+
required: false
4950

5051
- type: input
5152
attributes:
5253
label: Ghostbird version
5354
validations:
54-
required: true
55+
required: false
5556

5657
- type: textarea
5758
attributes:

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
name: '✨ Request a feature'
2-
description: Want a new behavior?
2+
description: I have a suggestion
33
type: Feature
4-
title: '[Feature] '
4+
title: '[Feature]'
55
body:
66
- type: textarea
77
attributes:
8-
label: What new features would you like us to add to Ghostbird?
8+
label: Is your feature request related to a problem you are experiencing? Please describe.
9+
placeholder: A clear and concise description of what the problem is. e.g., I have an issue when doing [...]
10+
validations:
11+
required: false
12+
- type: textarea
13+
attributes:
14+
label: Describe the solution you'd like.
15+
placeholder: A clear and concise description of what you want to happen, together with any potential drawbacks.
916
validations:
1017
required: true
18+
- type: textarea
19+
attributes:
20+
label: Describe alternative solutions if any.
21+
placeholder: A clear and concise description of any alternative solutions or features you've considered.
22+
validations:
23+
required: false
24+
- type: textarea
25+
attributes:
26+
label: Please provide information about documentation, adoption, migration strategy.
27+
placeholder: If possible, explain how users would adopt this feature and provide a draft of the documentation. Preferably include a screenshot or a design sketch.
28+
validations:
29+
required: false

Makefile

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This Makefile is here so that `make build` is a bit shorter than
2+
# `corepack enable && yarn install && yarn build`
3+
4+
.PHONY: all archive build check clean deepclean devenv dist doc fmt fix js start test web-ext xpi
5+
6+
GIT=git
7+
YARN=corepack yarn
8+
CP=cp
9+
10+
all: test xpi doc archive
11+
12+
archive: build/
13+
$(GIT) archive --output="build/src-$$($(GIT) describe --always --long --tags).zip" HEAD
14+
15+
build: xpi
16+
17+
check:
18+
$(YARN) run check
19+
20+
clean:
21+
$(GIT) clean -dXf src dist build
22+
23+
deepclean:
24+
$(GIT) clean -dXf
25+
26+
devenv: .yarn/sdks .vscode/settings.json .vscode/launch.json .vscode/tasks.json .web-ext-config.mjs
27+
28+
dist: js
29+
30+
doc: build/doc
31+
32+
fmt:
33+
$(YARN) run fmt
34+
35+
fix:
36+
$(YARN) run fix
37+
38+
js: .yarn
39+
$(YARN) run build-js
40+
41+
start: js
42+
$(YARN) run start
43+
44+
test: js
45+
$(YARN) run test
46+
47+
web-ext: .web-ext-config.mjs
48+
$(YARN) run web-ext docs
49+
50+
xpi: js
51+
$(YARN) run build-xpi
52+
53+
.yarn:
54+
$(YARN)
55+
56+
.yarn/sdks: .yarn
57+
$(YARN) run sdk vscode
58+
59+
build/:
60+
mkdir build
61+
62+
build/doc: js
63+
$(YARN) run doc
64+
65+
.vscode/settings.json:
66+
$(CP) .vscode/settings.example.json .vscode/settings.json
67+
68+
.vscode/launch.json:
69+
$(CP) .vscode/launch.example.json .vscode/launch.json
70+
71+
.vscode/tasks.json:
72+
$(CP) .vscode/tasks.example.json .vscode/tasks.json
73+
74+
.web-ext-config.mjs:
75+
$(CP) .web-ext-config.example.mjs .web-ext-config.mjs

README.md

Lines changed: 56 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Ghostbird: GhostText for Thunderbird :nest_with_eggs::mailbox::ghost:
22

33
[![Supports Thunderbird ESR](https://img.shields.io/badge/supports-Thunderbird_140_ESR-0a84ff?logo=thunderbird&logoSize=auto)][tb]<br>
4-
[![Status: Alpha](https://img.shields.io/badge/project_status-alpha-yellow)][rels]
4+
[![Status: Beta](https://img.shields.io/badge/project_status-beta-f1b802)][rels]
55
[![Latest release](https://img.shields.io/github/v/release/exteditor/ghostbird?include_prereleases&logo=refinedgithub&logoColor=white&logoSize=auto)][rels]<br>
66
[![Github Actions Status](https://github.com/exteditor/ghostbird/actions/workflows/build.yml/badge.svg)](https://github.com/exteditor/ghostbird/actions/workflows/build.yml)
77

8+
[![Download on AMO](https://raw.githubusercontent.com/thunderbird/webext-support/refs/heads/master/images/get-the-addon.svg)](#installation)
9+
810
A [GhostText][gt] implementation for the [Thunderbird][tb] email client.
911

1012
This repo contains an in-development Thunderbird add-on that works as a [GhostText client][protocol] in the mail compose window, so that users can write their emails in their favorite text editor like Vim (provided the text editor already has a GhostText add-on installed).
@@ -24,32 +26,46 @@ This repo contains an in-development Thunderbird add-on that works as a [GhostTe
2426
[<img src="https://github.com/user-attachments/assets/b0ca34ed-5508-458f-b7af-2642824bf7f7" width="48" height="48" alt="Helix" title="Helix">][helix]
2527
[`$ANY_EDITOR`](https://github.com/newsch/GhostText-Any/)
2628

27-
The last two implementations can wrap any editor that behaves like Notepad.
29+
The last two implementations can wrap any editor that blocks while editing.
2830

2931
## Installation
3032

3133
[<img src="./ext/blue.svg" width="48" height="48" border="1" align="right" alt="logo" title="Grey-headed bushshrike (Malaconotus blanchoti) is sometimes called 'ghostbird'">][bird]
3234

33-
This add-on is not yet available on [addons.thunderbird.net](https://addons.thunderbird.net/). You can install it manually or build it from source.
35+
* See [the help page in the Mozilla Support Center](https://support.mozilla.org/kb/installing-addon-thunderbird) for details.
36+
37+
You can install Ghostbird in several ways:
38+
39+
### Install within Thunderbird (Recommended)
40+
41+
1. In Thunderbird, open `Add-ons Manager`.
42+
2. Search for "Ghostbird".
43+
3. Click the <kbd>+ Add to Thunderbird</kbd> button.
3444

35-
### Manual Installation
45+
### Download and install manually
3646

37-
1. Download the latest release from [Releases][rels].
38-
2. In Thunderbird, go to `Add-ons Manager` and Press :gear: button at the top-right.
39-
3. Select `Install Add-on From File...` from the menu.
40-
4. Select downloaded `.xpi` file.
47+
[![Download on AMO](https://raw.githubusercontent.com/thunderbird/webext-support/refs/heads/master/images/get-the-addon.svg)][amo]
4148

42-
See [the help page in the Mozilla Support Center](https://support.mozilla.org/kb/installing-addon-thunderbird) for details.
49+
1. Download the latest release from [AMO][amo] or [Github Releases][rels].
50+
2. In Thunderbird, go to `Add-ons Manager`.
51+
3. Drag and drop the downloaded `.xpi` file into the `Add-ons Manager` window.
52+
53+
Alternatively, you can:
54+
55+
3. Press :gear: button at the top-right.
56+
4. Select `Install Add-on From File...` from the menu.
57+
5. Select downloaded `.xpi` file.
4358

4459
### Build from source
4560

46-
Basically `yarn && yarn build`. See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.
61+
* Basically, `make` will do, which internally calls `yarn install && yarn build`.
62+
* See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.
4763

4864
## Usage
4965

5066
1. Launch your favorite text editor.
51-
2. Start GhostText server in your text editor (e.g. with `:GhostTextStart` in Vim).
52-
3. Press the gray Ghostbird button <img src="./ext/gray.svg" width="24" height="24" border="1"> in the Thunderbird mail compose window. (The default shortcut is <kbd>Ctrl</kbd>+<kbd>E</kbd>)
67+
2. Start the GhostText server in your text editor (e.g., with `:GhostTextStart` in Vim).
68+
3. Press the gray Ghostbird button <img src="./ext/gray.svg" width="24" height="24" border="1"> in the Thunderbird mail compose window. (The default shortcut is <kbd>^Ctrl</kbd>+<kbd>⇧Shift</kbd>+<kbd>H</kbd>)
5369
* If the connection is successful, the button will turn blue <img src="./ext/blue.svg" width="24" height="24" border="1">.
5470
* If the connection fails, the button will turn red <img src="./ext/red.svg" width="24" height="24" border="1">. Make sure that the GhostText server is listening. See [Troubleshooting page of original GhostText](https://ghosttext.fregante.com/troubleshooting/#unable-to-connect).
5571
4. Write your email in the text editor.
@@ -89,19 +105,19 @@ gtClient -->|Updates| mailCompose
89105

90106
|Mark|Meaning|Description|
91107
|----|----|----|
92-
|:white_check_mark:|Done|Released in previous version|
93-
|:nest_with_eggs:|Experimental|Released recently; Please try and tell us if you notice something|
94-
|:construction:|WIP|In development, but not released|
95-
|:white_large_square:|Planned|Have to be implemented to release the version|
108+
|:white_check_mark:|Done|Released in previous versions|
109+
|:nest_with_eggs:|Experimental|Released recently; please try and tell us if you notice something|
110+
|:construction:|WIP|In development but not released|
111+
|:white_large_square:|Planned|Must be implemented to release the version|
96112
|:no_entry:|Limitation|The version will be released with this limitation|
97113

98114
### v0.0.1 (Alpha) - Released
99115

100-
* :nest_with_eggs: Prepare the project skeleton (README, build, test, lint, debug, CI)
101-
* :nest_with_eggs: Start button on the toolbar
102-
* :nest_with_eggs: Edit plain text emails
103-
* :nest_with_eggs: Keyboard shortcuts
104-
* :nest_with_eggs: Roadmap and [Project board][proj]
116+
* :white_check_mark: Prepare the project skeleton (README, build, test, lint, debug, CI)
117+
* :white_check_mark: Start button on the toolbar
118+
* :white_check_mark: Edit plain text emails
119+
* :white_check_mark: Keyboard shortcuts
120+
* :white_check_mark: Roadmap and [Project board][proj]
105121
* :no_entry: Non-bidirectional: Thunderbird becomes read-only while Ghostbird is active
106122
* :no_entry: No i18n: the UI is only in English*
107123
* :no_entry: Quirky when editing HTML emails
@@ -110,30 +126,33 @@ gtClient -->|Updates| mailCompose
110126
111127
### v0.1.0 (Alpha) - Released
112128

113-
* :nest_with_eggs: [Debug](https://github.com/exteditor/ghostbird/issues/2)
129+
* :white_check_mark: [Debug](https://github.com/exteditor/ghostbird/issues/2)
114130

115-
### v0.2.0 (Beta) - Current
131+
### v0.2.0 (Beta) - Released
116132

117133
* :nest_with_eggs: [Basic option (at minimum, the port of the GhostText server)](https://github.com/exteditor/ghostbird/issues/3)
118134
* :nest_with_eggs: [Prepare for i18n (Make texts translatable)](https://github.com/exteditor/ghostbird/issues/4)
119135

136+
### v0.2.1 (Beta) - Current
137+
138+
* :construction: [Fix empty host field being sent to the server](https://github.com/exteditor/ghostbird/issues/22)
139+
* :construction: [Show notifications](https://github.com/exteditor/ghostbird/issues/24)
140+
120141
### v0.x.x (Beta) - 2025 Q4
121142

122-
* :construction: [Notifications](https://github.com/exteditor/ghostbird/issues/4)
123-
* :construction: [](https://github.com/exteditor/ghostbird/issues/4)
124-
* :construction: [Website with some screenshot](https://github.com/exteditor/ghostbird/issues/5)
143+
* :construction: [Website with some screenshots](https://github.com/exteditor/ghostbird/issues/5)
125144
* :construction: [Smoother editing of HTML emails](https://github.com/exteditor/ghostbird/issues/6)
126145

127146
### v1.0.0 (Stable) - 2026 Q2
128147

129-
* :construction: [Publish on AMO (functionally identical to the last beta)](https://github.com/exteditor/ghostbird/issues/9)
148+
* :white_large_square: [Mark as stable on AMO (functionally identical to the last beta)](https://github.com/exteditor/ghostbird/issues/9)
130149

131150
### v1.x.x (Stable) - 2026 Q4
132151

133152
* :white_large_square: [Edit Address and Subject fields](https://github.com/exteditor/ghostbird/issues/8)
134-
* :white_large_square: Continue i18n (Add more languages)
135-
* :white_large_square: Support text editors that lack a GhostText add-on (e.g., Notepad)*
136-
* :white_large_square: Automate AMO release on GitHub Action
153+
* :white_large_square: [Continue i18n (Add more languages)](https://github.com/exteditor/ghostbird/issues/26)
154+
* :white_large_square: [Support text editors that lack a GhostText add-on (e.g., Notepad)*](https://github.com/exteditor/ghostbird/issues/25)
155+
* :white_large_square: [Automate AMO release on GitHub Action](https://github.com/exteditor/ghostbird/issues/27)
137156

138157
> \*Requires protocol extension and server-side support. I intend to develop one by forking [GhostText-Any](https://github.com/newsch/GhostText-Any/).
139158
@@ -143,7 +162,7 @@ gtClient -->|Updates| mailCompose
143162
* :white_large_square: Cursor and selection synchronization
144163
* :white_large_square: Bidirectional editing; changes in Thunderbird are reflected in the text editor
145164

146-
* :white_large_square: Better handling of conflicts, disconnection and reconnection (possibly extending the protocol)
165+
* :white_large_square: Better handling of conflicts, disconnection, and reconnection (possibly extending the protocol)
147166

148167
### Non-goals
149168

@@ -153,7 +172,7 @@ gtClient -->|Updates| mailCompose
153172

154173
## Contributing
155174

156-
If you liked the idea, please:
175+
If you like the idea, please:
157176

158177
* [Star the repo](#repository-container-header).
159178
* Feel free to open issues and submit pull requests. See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.
@@ -169,7 +188,7 @@ We need help with:
169188
* Wiki pages for [user guides](https://github.com/exteditor/ghostbird/wiki/HowTo) and [troubleshooting](https://github.com/exteditor/ghostbird/wiki/Troubleshooting)
170189
* Developing the server counterpart so that this can be used as an External Editor replacement ([GhostText-Any](https://github.com/newsch/GhostText-Any/) or [Helix-Ghost][helix] can be a good starting point)
171190
* Creating a testing checklist for testing and debugging ([This page](https://github.com/exteditor/exteditor/wiki/Things-to-test) can be a good starting point)
172-
* Automating test with the real Thunderbird (See [Testing](./doc/testing.md))
191+
* Automating tests with the real Thunderbird (See [Testing](./doc/testing.md))
173192
* Organization members (I want to increase [the bus factor](https://en.wikipedia.org/wiki/Bus_factor) of [the organization](https://github.com/exteditor/))
174193

175194
## FAQ
@@ -178,8 +197,8 @@ We need help with:
178197

179198
* I'd say yes, but save your work frequently since it may contain bugs and eat your email.
180199
* This add-on does not collect any personal data and can only connect to localhost. Attempts to send any data to external servers are blocked by Thunderbird's security model.
181-
* You can look inside the released `.xpi` files (which are just zip files) to verify that it matches the build from the source code.
182-
* As for trustworthiness, the safest option is to wait until it is published on AMO, as that indicates it has passed Mozilla's review process.
200+
* You can look inside the released `.xpi` files (which are just zip files) to verify that they match the build from the source code.
201+
* As for trustworthiness, the safest option is to wait until it reaches 1.0.0, as that indicates it has passed Mozilla's manual review.
183202

184203
### Why not just fork the original GhostText add-on, or contribute to it?
185204

@@ -216,7 +235,7 @@ If you've looked at the options above and still want to motivate the maintainer
216235

217236
* [Federico Brigante](https://fregante.com/), the author of [GhostText][gt].
218237
* [Alexandre Feblot](https://github.com/afeblot), the original author of [External Editor](https://github.com/exteditor/exteditor/), which I took over maintaining; it is now in a stale state. I intend to incorporate some of its features into Ghostbird.
219-
* The button image is based on [photo](https://commons.wikimedia.org/wiki/File:Grey-headed_Bushshrike_(Malaconotus_blanchoti)_in_tree,_crop.jpg) of a [Grey-headed Bushshrike][bird] by [Patty McGann](https://www.flickr.com/photos/10374910@N08/3093177192/) (CC-BY-2.0).
238+
* The button image is based on a [photo](https://commons.wikimedia.org/wiki/File:Grey-headed_Bushshrike_(Malaconotus_blanchoti)_in_tree,_crop.jpg) of a [Grey-headed Bushshrike][bird] by [Patty McGann](https://www.flickr.com/photos/10374910@N08/3093177192/) (CC-BY-2.0).
220239

221240
### Tools
222241

@@ -246,3 +265,4 @@ Ghostbird is [dual-licensed under (MPL-2.0 OR GPL-3.0-or-later)](./LICENSE). See
246265
[nvim-svg]: ./doc/res/nvim.svg
247266
[bird]: https://en.wikipedia.org/wiki/Grey-headed_bushshrike
248267
[protocol]: https://github.com/fregante/GhostText/blob/refs/heads/main/PROTOCOL.md
268+
[amo]: https://addons.thunderbird.net/addon/ghostbird/

0 commit comments

Comments
 (0)