Skip to content

Commit ab057fa

Browse files
hotfix: add width: auto to the autosave indicator
1 parent d41f1d5 commit ab057fa

File tree

8 files changed

+45
-10
lines changed

8 files changed

+45
-10
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.3.3] - 2026-03-05
9+
10+
### Added
11+
12+
- Status bar indicator for autosave (○ idle, ● just saved).
13+
- Saved state indicator `[·]` in status bar (complements `[+]` for unsaved).
14+
- STATUS BAR section in REFERENCE documentation.
15+
16+
### Fixed
17+
18+
- Autosave no longer causes layout shifts in status bar.
19+
- Git status updates correctly after autosave.
20+
821
## [1.3.2] - 2026-03-05
922

1023
### Changed

prosaic/REFERENCE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ If your archive directory contains a git repository:
2828
- Prompts for remote if none exists
2929

3030

31+
STATUS BAR
32+
----------
33+
34+
○ / ● Autosave (idle / just saved)
35+
[+] / [·] Editor (unsaved / saved)
36+
* / + / ? Git (modified / staged / untracked)
37+
38+
3139
ARCHIVE STRUCTURE
3240
-----------------
3341

prosaic/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
ctrl+a select all
5050
ctrl+k toggle comment
5151
52-
git status
53-
* modified
54-
+ staged
55-
? untracked
52+
status
53+
○ / ● autosave (idle / saved)
54+
[+] / [·] editor (unsaved / saved)
55+
* / + / ? git (modified / staged / untracked)
5656
5757
press escape or q to close
5858
"""

prosaic/screens/editor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ async def _autosave(self) -> None:
166166

167167
statusbar = self.query_one("#statusbar", StatusBar)
168168
statusbar.flash_autosave()
169+
self.call_later(lambda: statusbar.update_git_for_file(file_path))
169170
except Exception:
170171
pass
171172

prosaic/themes/dark.tcss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ TextArea > .text-area--cursor-gutter {
413413
width: auto;
414414
}
415415

416+
#statusbar > #autosave {
417+
color: $secondary;
418+
width: 1;
419+
margin-right: 1;
420+
}
421+
416422
.spacer {
417423
width: 1fr;
418424
}

prosaic/themes/light.tcss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ TextArea > .text-area--cursor-gutter {
413413
width: auto;
414414
}
415415

416+
#statusbar > #autosave {
417+
color: $secondary;
418+
width: 1;
419+
margin-right: 1;
420+
}
421+
416422
.spacer {
417423
width: 1fr;
418424
}

prosaic/widgets/statusbar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ class StatusBar(Horizontal):
6363
git_status: reactive[str] = reactive("")
6464

6565
def compose(self):
66+
yield Static("○", id="autosave")
6667
yield Static("untitled", id="filename")
6768
yield Static("", id="modified")
6869
yield Static("", id="git")
69-
yield Static("", id="autosave")
7070
yield Static("", classes="spacer")
7171
yield Static("0 words", id="word-count")
7272
yield Static("·", classes="sep")
@@ -79,7 +79,7 @@ def _refresh_all(self) -> None:
7979
try:
8080
self.query_one("#filename", Static).update(self.filename)
8181
self.query_one("#modified", Static).update(
82-
" [+]" if self.modified else ""
82+
" [+]" if self.modified else " [·]"
8383
)
8484
self.query_one("#git", Static).update(
8585
f" {self.git_status}" if self.git_status else ""
@@ -97,7 +97,7 @@ def watch_filename(self, filename: str) -> None:
9797

9898
def watch_modified(self, modified: bool) -> None:
9999
try:
100-
self.query_one("#modified", Static).update(" [+]" if modified else "")
100+
self.query_one("#modified", Static).update(" [+]" if modified else " [·]")
101101
except Exception:
102102
pass
103103

@@ -126,7 +126,7 @@ def flash_autosave(self) -> None:
126126
"""Briefly show autosave indicator."""
127127
try:
128128
indicator = self.query_one("#autosave", Static)
129-
indicator.update(" ●")
130-
self.set_timer(1.5, lambda: indicator.update(""))
129+
indicator.update("●")
130+
self.set_timer(1.5, lambda: indicator.update(""))
131131
except Exception:
132132
pass

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "prosaic-app"
7-
version = "1.3.2"
7+
version = "1.3.3"
88
description = "A writer-first terminal writing app"
99
readme = "README.md"
1010
requires-python = ">=3.11"
@@ -18,6 +18,7 @@ classifiers = [
1818
"Environment :: Console",
1919
"Intended Audience :: End Users/Desktop",
2020
"Operating System :: MacOS",
21+
"Operating System :: Microsoft :: Windows",
2122
"Operating System :: POSIX :: Linux",
2223
"Programming Language :: Python :: 3.11",
2324
"Programming Language :: Python :: 3.12",

0 commit comments

Comments
 (0)