Skip to content

Update taxmaro-tracking extension - #30479

Draft
phibr0 wants to merge 2 commits into
raycast:mainfrom
phibr0:ext/taxmaro-tracking
Draft

Update taxmaro-tracking extension#30479
phibr0 wants to merge 2 commits into
raycast:mainfrom
phibr0:ext/taxmaro-tracking

Conversation

@phibr0

@phibr0 phibr0 commented Aug 24, 2026

Copy link
Copy Markdown

Description

Shortcuts for work time tracking on the Taxmaro platform.

Screencast

Checklist

phibr0 added 2 commits August 21, 2026 22:46
- chore: use npm
- chore: initial commit
- fix: remove colleague id requirerment
- chore: update readme
@raycastbot raycastbot added new extension Label for PRs with new extensions AI Extension platform: macOS labels Aug 24, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a new Taxmaro time-tracking extension with no-view and menu-bar commands backed by a shared API client and persistent status cache.

  • Adds Taxmaro status fetching and start/stop API actions.
  • Adds optimistic menu-bar and no-view tracking controls with shared cached state.
  • Adds package metadata, dependencies, configuration, documentation, and icon assets.

Confidence Score: 3/5

The PR is not safe to merge until previous-day cache handling and cross-command toggle races are fixed.

Persistent status can be rendered as today's time after a date rollover, and independent command instances can race through shared optimistic state and send conflicting tracking actions; the remaining findings concern repository-required preference typing, locale handling, and changelog coverage.

Files Needing Attention: extensions/taxmaro-tracking/src/status-cache.ts, extensions/taxmaro-tracking/src/tracking-status.ts, extensions/taxmaro-tracking/src/toggle-tracking.ts, extensions/taxmaro-tracking/src/menu-bar.tsx, extensions/taxmaro-tracking/src/taxmaro.ts, extensions/taxmaro-tracking/package.json

Important Files Changed

Filename Overview
extensions/taxmaro-tracking/src/status-cache.ts Adds persistent cross-command status caching but does not expire or reset previous-day values.
extensions/taxmaro-tracking/src/tracking-status.ts Adds duration calculations and optimistic transitions, including unbounded elapsed-time extrapolation across date boundaries.
extensions/taxmaro-tracking/src/toggle-tracking.ts Adds an optimistic no-view toggle whose shared read-invert-write flow can race the menu-bar command.
extensions/taxmaro-tracking/src/menu-bar.tsx Adds a cached menu-bar status and toggle surface, but cached prior-day data can be displayed and its mutation guard is local to one component instance.
extensions/taxmaro-tracking/src/taxmaro.ts Adds the Taxmaro API boundary and state reconciliation, while manually duplicating the generated preference type.
extensions/taxmaro-tracking/package.json Declares the extension, commands, dependencies, platform, and API-token preference; the package is missing its required changelog.
Prompt To Fix All With AI
### Issue 1
extensions/taxmaro-tracking/src/status-cache.ts:12
**Stale cache crosses day boundaries**

When the menu bar starts after midnight with a previous-day cache entry, `readCachedStatus` returns yesterday’s closed duration and running timestamp as initial data, causing the UI to report yesterday’s time—and potentially overnight elapsed time—as today’s total until a refresh succeeds.

### Issue 2
extensions/taxmaro-tracking/src/toggle-tracking.ts:15-19
**Shared toggle state can race**

If the no-view and menu-bar commands overlap, each independently inverts shared optimistic state and performs a non-atomic status-check-then-POST sequence, causing conflicting start/stop requests whose final server state can contradict the user’s action and displayed feedback.

### Issue 3
extensions/taxmaro-tracking/src/taxmaro.ts:9-13
**Preference type duplicates manifest**

The manually maintained `TaxmaroPreferences` interface duplicates Raycast’s generated preference type, allowing the manifest and source definitions to drift and bypassing the generated compile-time contract.

```suggestion
const preferences = getPreferenceValues<Preferences>();
```

### Issue 4
extensions/taxmaro-tracking/src/tracking-status.ts:48
**Formatting follows system locale**

Reading the host locale makes duration formatting vary implicitly between machines despite Raycast’s US-English product surface; use a fixed supported locale or an explicit preference instead.

```suggestion
const locale = "en-US";
```

### Issue 5
extensions/taxmaro-tracking/package.json:1
**Extension omits required changelog**

This new extension package does not include the required `CHANGELOG.md`, leaving its initial release without the repository’s expected version-history entry.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Update taxmaro-tracking extension" | Re-trigger Greptile

encode: (value) => JSON.stringify(value),
});

export const readCachedStatus = (): TrackingStatus | undefined => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Stale cache crosses day boundaries

When the menu bar starts after midnight with a previous-day cache entry, readCachedStatus returns yesterday’s closed duration and running timestamp as initial data, causing the UI to report yesterday’s time—and potentially overnight elapsed time—as today’s total until a refresh succeeds.

Knowledge Base Used: Extension command implementation patterns

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/taxmaro-tracking/src/status-cache.ts
Line: 12

Comment:
**Stale cache crosses day boundaries**

When the menu bar starts after midnight with a previous-day cache entry, `readCachedStatus` returns yesterday’s closed duration and running timestamp as initial data, causing the UI to report yesterday’s time—and potentially overnight elapsed time—as today’s total until a refresh succeeds.

**Knowledge Base Used:** [Extension command implementation patterns](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-command-implementation.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +15 to +19
const previous = readCachedStatus() ?? (await fetchTrackingStatus());
const desiredRunning = !previous.running;
const optimistic = optimisticallySetRunning(previous, desiredRunning);

writeCachedStatus(optimistic);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Shared toggle state can race

If the no-view and menu-bar commands overlap, each independently inverts shared optimistic state and performs a non-atomic status-check-then-POST sequence, causing conflicting start/stop requests whose final server state can contradict the user’s action and displayed feedback.

Knowledge Base Used: Extension command implementation patterns

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/taxmaro-tracking/src/toggle-tracking.ts
Line: 15-19

Comment:
**Shared toggle state can race**

If the no-view and menu-bar commands overlap, each independently inverts shared optimistic state and performs a non-atomic status-check-then-POST sequence, causing conflicting start/stop requests whose final server state can contradict the user’s action and displayed feedback.

**Knowledge Base Used:** [Extension command implementation patterns](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-command-implementation.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +9 to +13
interface TaxmaroPreferences {
apiToken: string;
}

const preferences = getPreferenceValues<TaxmaroPreferences>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Preference type duplicates manifest

The manually maintained TaxmaroPreferences interface duplicates Raycast’s generated preference type, allowing the manifest and source definitions to drift and bypassing the generated compile-time contract.

Suggested change
interface TaxmaroPreferences {
apiToken: string;
}
const preferences = getPreferenceValues<TaxmaroPreferences>();
const preferences = getPreferenceValues<Preferences>();

Rule Used: What: Don't manually define Preferences for `get... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/taxmaro-tracking/src/taxmaro.ts
Line: 9-13

Comment:
**Preference type duplicates manifest**

The manually maintained `TaxmaroPreferences` interface duplicates Raycast’s generated preference type, allowing the manifest and source definitions to drift and bypassing the generated compile-time contract.

```suggestion
const preferences = getPreferenceValues<Preferences>();
```

**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/raycast/-/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

};
};

const locale = Intl.DateTimeFormat().resolvedOptions().locale;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Formatting follows system locale

Reading the host locale makes duration formatting vary implicitly between machines despite Raycast’s US-English product surface; use a fixed supported locale or an explicit preference instead.

Suggested change
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
const locale = "en-US";

Rule Used: What: Do not implement custom localization logic i... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/taxmaro-tracking/src/tracking-status.ts
Line: 48

Comment:
**Formatting follows system locale**

Reading the host locale makes duration formatting vary implicitly between machines despite Raycast’s US-English product surface; use a fixed supported locale or an explicit preference instead.

```suggestion
const locale = "en-US";
```

**Rule Used:** What: Do not implement custom localization logic i... ([source](https://app.greptile.com/raycast/-/custom-context?memory=78677f74-64f7-483b-b90d-9c33e2e049da))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@@ -0,0 +1,64 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Extension omits required changelog

This new extension package does not include the required CHANGELOG.md, leaving its initial release without the repository’s expected version-history entry.

Rule Used: What: Ensure that CHANGELOG.md is created or updat... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/taxmaro-tracking/package.json
Line: 1

Comment:
**Extension omits required changelog**

This new extension package does not include the required `CHANGELOG.md`, leaving its initial release without the repository’s expected version-history entry.

**Rule Used:** What: Ensure that CHANGELOG.md is created or updat... ([source](https://app.greptile.com/raycast/github/raycast/extensions/-/custom-context?memory=97cd51bc-963b-43f5-acc3-9ba85fe7bb2d))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Extension new extension Label for PRs with new extensions platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants