Skip to content

Commit 9d7f891

Browse files
committed
Release v0.4.17: Build system cleanup and database enhancements
- Remove Makefile in favor of just-based build system - Add app rename database migration support - Enhance UI command interface and database connection handling - Update README and demo assets - Improve cross-platform consistency between daemon and UI modules
1 parent 6627df5 commit 9d7f891

12 files changed

Lines changed: 110 additions & 238 deletions

File tree

.gitignore

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/target
2-
CHANGES.md
3-
IMPLEMENTATION_PLAN.md
4-
/plans
52
/docker/.env
6-
/.claude
73
PLAN.md
84
install-extension.sh
95
commands.md
106
daemon.pid
117
src/plans/
8+
src/data/logs/
129

1310
# log files
1411
server.log
@@ -19,14 +16,10 @@ gui.log
1916
daemon.log
2017

2118

22-
client/target
23-
client/node_modules
24-
server/target
25-
19+
target/
20+
node_modules/
2621
plans/
2722
data/
28-
server/data/
29-
data/
3023
db/
3124
client/dist
3225

@@ -38,6 +31,9 @@ init.sql/
3831
*.DS_Store
3932
compose-match4jobs.yml
4033

34+
/.claude
35+
.claude
36+
4137
# These are backup files generated by rustfmt
4238
**/*.rs.bk
4339

@@ -54,3 +50,6 @@ compose-match4jobs.yml
5450
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
5551
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
5652
*.lock
53+
54+
55+

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## v0.4.17 (2025-11-28)
4+
5+
- **Build System Simplification**: Removed Makefile in favor of just-based build system
6+
- Eliminated Makefile redundancy (functionality preserved in justfile)
7+
- Cleaner project structure with single source of truth for build commands
8+
- All build targets remain accessible via `just` command
9+
10+
- **Database Schema Enhancement**: Added app rename support to database migrations
11+
- New migration: `20251128000000_add_app_renames.sql`
12+
- Enables tracking of application name changes for better session continuity
13+
- Applied to both daemon and UI database instances
14+
15+
- **UI Improvements**: Enhanced command interface and visual consistency
16+
- Updated `src/ui/commands.rs` with refined command handling
17+
- Improved database connection handling in both daemon and UI modules
18+
- Better consistency between daemon and UI database operations
19+
20+
- **Documentation Updates**: Refreshed README with latest setup and usage information
21+
- Updated build instructions and command references
22+
- Improved clarity on cross-platform support
23+
24+
- **Asset Updates**: Replaced demo images with new animated GIF demonstration
25+
- Renamed screenshots from `hustler-tracker-demo.*` to `hustle-tracker-demo.*` for naming consistency
26+
- New GIF provides better visual overview of application features
27+
328
## v0.4.16 (2025-11-27)
429

530
- **Timeline Visualization**: Full-width colored activity timeline for day/week/month views

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "neura_hustle_tracker"
3-
version = "0.4.16"
3+
version = "0.4.17"
44
edition = "2024"
55

66
[[bin]]

Makefile

Lines changed: 0 additions & 221 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
This app runs in your terminal and shows you exactly where your time goes during work sessions. Built with Ratatui.
1414

15-
![Demo](src/screenshots/hustler-tracker-demo-new.gif)
16-
![Demo](src/screenshots/hustler-tracker-demo.png)
15+
![Demo](src/screenshots/hustle-tracker-demo-new.gif)
16+
![Demo](src/screenshots/hustle-tracker-demo.png)
1717

1818
## Download Pre-Built Binaries (Easiest!)
1919

src/daemon/database/connection.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ impl Database {
9696
}
9797

9898
pub async fn apply_renames_and_categories(&self, session: &mut Session) -> Result<()> {
99+
if let Some(renamed_app_name) = self.get_app_rename(&session.app_name).await? {
100+
session.app_name = renamed_app_name;
101+
}
102+
99103
if let Some(title) = &session.browser_page_title {
100104
session.browser_page_title_renamed = self.get_browser_page_title_rename(title).await?;
101105
session.browser_page_title_category = self.get_browser_page_title_category(title).await?;
@@ -189,4 +193,14 @@ impl Database {
189193
.await?;
190194
Ok(id.0)
191195
}
196+
197+
pub async fn get_app_rename(&self, original_app_name: &str) -> Result<Option<String>> {
198+
let rename: Option<(String,)> = sqlx::query_as(
199+
"SELECT renamed_app_name FROM app_renames WHERE original_app_name = $1"
200+
)
201+
.bind(original_app_name)
202+
.fetch_optional(&self.pool)
203+
.await?;
204+
Ok(rename.map(|(r,)| r))
205+
}
192206
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- Create app_renames table to store persistent app name rename mappings
2+
-- This allows the daemon to apply renames to new sessions automatically
3+
CREATE TABLE IF NOT EXISTS app_renames (
4+
id SERIAL PRIMARY KEY,
5+
original_app_name TEXT NOT NULL UNIQUE,
6+
renamed_app_name TEXT NOT NULL,
7+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
8+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
9+
);
10+
11+
-- Create index on original_app_name for fast lookups
12+
CREATE INDEX IF NOT EXISTS idx_app_renames_original ON app_renames(original_app_name);

src/database/connection.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,31 @@ impl Database {
335335
Ok(category.map(|(c,)| c))
336336
}
337337

338+
pub async fn set_app_rename(&self, original_app_name: &str, renamed_app_name: &str) -> Result<()> {
339+
sqlx::query(
340+
r#"
341+
INSERT INTO app_renames (original_app_name, renamed_app_name)
342+
VALUES ($1, $2)
343+
ON CONFLICT (original_app_name)
344+
DO UPDATE SET renamed_app_name = $2, updated_at = CURRENT_TIMESTAMP
345+
"#
346+
)
347+
.bind(original_app_name)
348+
.bind(renamed_app_name)
349+
.execute(&self.pool)
350+
.await?;
351+
Ok(())
352+
}
353+
354+
pub async fn get_app_rename(&self, original_app_name: &str) -> Result<Option<String>> {
355+
let rename: Option<(String,)> = sqlx::query_as(
356+
"SELECT renamed_app_name FROM app_renames WHERE original_app_name = $1"
357+
)
358+
.bind(original_app_name)
359+
.fetch_optional(&self.pool)
360+
.await?;
361+
Ok(rename.map(|(r,)| r))
362+
}
338363

339364
pub async fn fix_old_categories(&self) -> Result<()> {
340365
// Fix any sessions with old category names that should be Development

0 commit comments

Comments
 (0)