Skip to content

Commit 12672df

Browse files
Merge pull request #17 from matejsemancik/housekeep/reformat-code
Fix formatting issues
2 parents 152d25f + b90fbf4 commit 12672df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+120
-99
lines changed

.fleet/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"fuzzyResolve.enabled": false
2+
"fuzzyResolve.enabled": false
33
}

.github/workflows/on_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
timeout-minutes: 15 # Windows is such a special snowflake 🙂
1111
strategy:
1212
matrix:
13-
os: [ubuntu-latest, windows-latest, macos-latest]
13+
os: [ ubuntu-latest, windows-latest, macos-latest ]
1414
runs-on: ${{ matrix.os }}
1515
permissions:
1616
contents: write

CLAUDE.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
# Development Guidelines
22

33
## Build Commands
4+
45
- Build package: `./gradlew packageDistributionForCurrentOS`
56
- Run app: `./gradlew runDistributable`
67
- Run desktop app: `./gradlew :desktopApp:run`
78

89
## Code Style
10+
911
- **Naming**: Classes = PascalCase, Functions/Variables = camelCase
1012
- **Architecture**: MVVM pattern with UI, State (Model), and Data layers
1113
- **State Management**: Kotlin Flows (StateFlow for UI state)
1214
- **Visibility Modifiers**:
13-
- Use the most restrictive visibility modifier possible
14-
- Prefer `internal` over `public` for implementation classes
15-
- Use `private` for all properties and functions that don't need wider visibility
16-
- Use `public` only for APIs that need to be accessed outside the module
15+
- Use the most restrictive visibility modifier possible
16+
- Prefer `internal` over `public` for implementation classes
17+
- Use `private` for all properties and functions that don't need wider visibility
18+
- Use `public` only for APIs that need to be accessed outside the module
1719
- **DI**: Koin for dependency injection
18-
- Use constructor injection whenever possible instead of property injection
19-
- Constructor parameters make dependencies explicit and improve testability
20+
- Use constructor injection whenever possible instead of property injection
21+
- Constructor parameters make dependencies explicit and improve testability
2022
- **Imports**: Grouped by purpose, explicit imports preferred over wildcards
2123
- **Error Handling**: Repository pattern for data operations, proper error propagation through Flows
2224
- **Expressive Kotlin Features**:
23-
- Use `runCatching` instead of try-catch blocks
24-
- Use `.use` extension for closeables
25-
- Prefer `kotlin.io` extensions over Java IO streams
26-
- Use scope functions (`let`, `apply`, `run`, `with`, `also`) appropriately
27-
- Leverage extension functions for better readability
28-
- Use property delegates (`by lazy`, `by Delegates`) where appropriate
29-
- Use Elvis operator (`?:`) for fallback values
25+
- Use `runCatching` instead of try-catch blocks
26+
- Use `.use` extension for closeables
27+
- Prefer `kotlin.io` extensions over Java IO streams
28+
- Use scope functions (`let`, `apply`, `run`, `with`, `also`) appropriately
29+
- Leverage extension functions for better readability
30+
- Use property delegates (`by lazy`, `by Delegates`) where appropriate
31+
- Use Elvis operator (`?:`) for fallback values
3032

3133
## Architecture Guidelines
34+
3235
- Network models (from APIs) should not be propagated to the presentation layer
3336
- Always map network models to domain models in the repository layer
3437
- Service layer handles API communication, Repository layer handles domain translation
@@ -68,12 +71,14 @@
6871
```
6972

7073
## Project Structure
74+
7175
- `feature/` - App features organized by domain (tracker, search, settings)
7276
- `data/` - Repository interfaces, database models, network services
7377
- `design/` - UI components, theme definitions
7478
- `arch/` - Base architectural components
7579
- `injection/` - Dependency injection modules
7680

7781
## Testing
82+
7883
- Unit tests should follow the same structure as the feature they're testing
7984
- Model tests should verify state transitions and event handling

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,48 @@
66

77
**Track your time effortlessly.**
88

9-
tempo-timer is a simple desktop app designed for logging time on Jira issues directly into Tempo Timesheets. It’s perfect for users who prefer real-time tracking (like me!) and find existing web UI and/or browser extension very slow or clunky (also, like me!). Currently, tracking is limited to "today"—for other dates, use the Tempo web interface.
9+
tempo-timer is a simple desktop app designed for logging time on Jira issues directly into Tempo Timesheets. It’s
10+
perfect for users who prefer real-time tracking (like me!) and find existing web UI and/or browser extension very slow
11+
or clunky (also, like me!). Currently, tracking is limited to "today"—for other dates, use the Tempo web interface.
1012

1113
The app is tested on macOS. It supports Jira Cloud only.
1214

1315
## Features
16+
1417
-**Track time** directly in Tempo Timesheets
1518
-**Edit worklogs** before submitting (time & description)
1619
- 🔍 **Search Jira issues** quickly
1720
-**Save favorite issues** for fast access
1821
- 🎛 **Manage multiple timers** simultaneously
1922
- 🌙 **Dark mode support**
2023

21-
Interested in Kotlin Multiplatform? Learn more [here](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html).
24+
Interested in Kotlin Multiplatform? Learn
25+
more [here](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html).
2226

2327
## Download
28+
2429
[![GitHub Release](https://img.shields.io/github/v/release/matejsemancik/tempo-timer?include_prereleases&sort=semver&display_name=release&style=flat&link=https%3A%2F%2Fgithub.com%2Fmatejsemancik%2Ftempo-timer%2Freleases%2Flatest)](https://github.com/matejsemancik/tempo-timer/releases/latest)
2530

2631
Download latest release [here](https://github.com/matejsemancik/tempo-timer/releases/latest).
2732

2833
### macOS-specific
2934

30-
The app is not signed and notarized on macOS and probably will never be (I refuse to pay Apple Developer fee for this), so system will greet you with this lovely dialog after first opening the app:
35+
The app is not signed and notarized on macOS and probably will never be (I refuse to pay Apple Developer fee for this),
36+
so system will greet you with this lovely dialog after first opening the app:
3137

3238
![](docs/gatekeeper.png)
3339

3440
Considering you inspected source code and you trust it, you can
41+
3542
- manually run `xattr -d -r com.apple.quarantine <path_to_Tempo Timer.app>`, or
3643
- navigate to `System Settings -> Privacy & Security` and allow the app to run, or
3744
- build it from source code 👇 - apps built locally do not trigger Gatekeeper
3845

3946
## Getting started
4047

4148
1. Create a Jira API token → [Generate here](https://id.atlassian.com/manage-profile/security/api-tokens)
42-
2. Create a Tempo API token → Follow [these steps](https://apidocs.tempo.io/#section/Authentication) (Using the REST API as an individual user). Token must have permissions to access Worklogs.
49+
2. Create a Tempo API token → Follow [these steps](https://apidocs.tempo.io/#section/Authentication) (Using the REST API
50+
as an individual user). Token must have permissions to access Worklogs.
4351
3. Log in: Open the app -> Settings and enter your Jira cloud instance name, Jira account email, and both tokens.
4452

4553
That’s it!

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#Kotlin
22
kotlin.code.style=official
33
kotlin.daemon.jvmargs=-Xmx2048M
4-
54
#Gradle
65
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ markdownRenderer = { module = "com.mikepenz:multiplatform-markdown-renderer-m3",
5555
[plugins]
5656
composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" }
5757
composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
58-
composeHotReload = { id = "org.jetbrains.compose.hot-reload", version.ref = "compose-hotReload"}
58+
composeHotReload = { id = "org.jetbrains.compose.hot-reload", version.ref = "compose-hotReload" }
5959
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
6060
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
6161
ktorfit = { id = "de.jensklingenberg.ktorfit", version.ref = "ktorfit" }

shared/src/commonMain/composeResources/values/strings.xml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<string name="close">Close</string>
55
<string name="delete">Delete</string>
66
<string name="remove">Remove</string>
7-
7+
88
<!-- App -->
99
<string name="app_name">tempo-timer</string>
1010
<string name="toggle_dark_mode">Toggle dark mode</string>
@@ -13,32 +13,36 @@
1313
<string name="pick_issue">Pick an issue</string>
1414
<string name="timer">Timer</string>
1515
<string name="new_version_banner_md">✨ New version available! [Download on GitHub](%1$s)</string>
16-
16+
1717
<!-- Commit/Timer -->
1818
<string name="duration_label">⏳ Duration</string>
1919
<string name="duration_placeholder">e.g. \"1h 20m\"</string>
2020
<string name="description_label">📜 Description</string>
2121
<string name="delete_timer">Delete timer</string>
2222
<string name="log_time">Log Time</string>
23-
23+
2424
<!-- Settings -->
2525
<string name="credentials_title">🔐 Credentials</string>
2626
<string name="credentials_description">Sign In by providing necessary credentials.</string>
27-
<string name="credentials_instructions_md">Jira API token is used to sync your profile and search issues. Tempo API token is used to synchronize worklogs with Tempo. [Instructions here](https://github.com/matejsemancik/tempo-timer?tab=readme-ov-file#getting-started).</string>
27+
<string name="credentials_instructions_md">Jira API token is used to sync your profile and search issues. Tempo API
28+
token is used to synchronize worklogs with Tempo. [Instructions
29+
here](https://github.com/matejsemancik/tempo-timer?tab=readme-ov-file#getting-started).
30+
</string>
2831
<string name="jira_url">Jira URL</string>
2932
<string name="jira_email">Atlassian account e-mail</string>
3033
<string name="jira_email_placeholder">you@corporate.org</string>
3134
<string name="jira_api_token">Jira API token</string>
3235
<string name="tempo_api_token">Tempo API token</string>
3336
<string name="sign_in">Sign In</string>
3437
<string name="sign_out">Sign Out</string>
35-
38+
3639
<!-- Search -->
3740
<string name="search_placeholder">Issue key, or summary, or try your luck...</string>
38-
41+
3942
<!-- Tracker -->
4043
<string name="favorites_section">⭐ Favourites</string>
4144
<string name="timers_section">⏳ Timers</string>
4245
<string name="no_timers">No running timers</string>
43-
<string name="start_timer_instructions">Start a new timer by clicking on Favourite,\nor from menu bar down there 👇</string>
46+
<string name="start_timer_instructions">Start a new timer by clicking on Favourite,\nor from menu bar down there 👇
47+
</string>
4448
</resources>

shared/src/commonMain/kotlin/dev/matsem/bpm/data/database/model/Timer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ data class TimerComplete(
5050
parentColumn = "jira_issue_id",
5151
entityColumn = "id"
5252
)
53-
val issue: JiraIssue
53+
val issue: JiraIssue,
5454
)

shared/src/commonMain/kotlin/dev/matsem/bpm/data/persistence/ApplicationPersistence.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface ApplicationPersistence {
1818
}
1919

2020
internal class ApplicationPersistenceImpl(
21-
private val handler: JsonPersistenceHandler
21+
private val handler: JsonPersistenceHandler,
2222
) : ApplicationPersistence {
2323

2424
companion object {

shared/src/commonMain/kotlin/dev/matsem/bpm/data/persistence/JsonPersistenceHandler.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import kotlinx.coroutines.flow.Flow
77
import kotlinx.coroutines.flow.firstOrNull
88
import kotlinx.coroutines.flow.map
99
import kotlinx.serialization.SerializationException
10-
import kotlinx.serialization.encodeToString
1110
import kotlinx.serialization.json.Json
1211

1312
/**

0 commit comments

Comments
 (0)