Sitelet https://github.com/Mindfeast/feastdocs/commit/d773f418fc2e4bdc475d1d14486ec0d921b7870d
Skip to content

Commit d773f41

Browse files
committed
fix: a repository-less status no longer lights up controls that then throw
`/api/git/status` answers `{ git: false }` for two different situations: the folder is not a repository, and git could not be run at all. That is a truthy object, so storing it satisfied every `@if (git())` in the template — the Source control button appeared, the panel rendered, and reading `changed.length` on a payload with no `changed` threw on every change-detection pass. The panel silently did not open and the console filled with the same TypeError. There is nothing to show in that state, so nothing is stored: the button hides and the panel stays closed, which is what "no repository here" should look like. `status()` now also returns the reason it failed, because the two cases need different answers from whoever is debugging and "false" told them apart from nothing. Found by driving the editor against a dev server whose parent process had been killed — the orphan could no longer spawn git, which is exactly the second case and is not reachable by reading the code. Verified in a browser against a live dev server, after a clean restart: the panel lists 7 changed files split 1 staged / 6 unstaged, a row's diff renders with per-line colouring, and + / − move a file between the groups and back.
1 parent f3ea175 commit d773f41

16 files changed

Lines changed: 86 additions & 79 deletions

File tree

‎docs/api/bookings/availability/check-availability.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Check availability"
3-
description: "Rooms bookable for a date range, with nightly rates."
4-
sidebar_label: "Check availability"
5-
sidebar_badge: "GET"
2+
title: 'Check availability'
3+
description: 'Rooms bookable for a date range, with nightly rates.'
4+
sidebar_label: 'Check availability'
5+
sidebar_badge: 'GET'
66
sidebar_position: 1
77
---
88

@@ -23,9 +23,9 @@ Rooms bookable for a date range, with nightly rates.
2323

2424
## Responses
2525

26-
| Status | Description |
27-
| --- | --- |
28-
| `200` | Available rooms. |
26+
| Status | Description |
27+
| ------ | ---------------- |
28+
| `200` | Available rooms. |
2929

3030
### Example response
3131

‎docs/api/bookings/availability/list-rates.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "List rate plans"
3-
description: "Superseded by `/availability`, which returns rates inline."
4-
sidebar_label: "List rate plans"
5-
sidebar_badge: "GET"
2+
title: 'List rate plans'
3+
description: 'Superseded by `/availability`, which returns rates inline.'
4+
sidebar_label: 'List rate plans'
5+
sidebar_badge: 'GET'
66
sidebar_position: 2
77
---
88

@@ -19,8 +19,8 @@ Superseded by `/availability`, which returns rates inline.
1919
## Responses
2020

2121
| Status | Description |
22-
| --- | --- |
23-
| `200` | Rate plans. |
22+
| ------ | ----------- |
23+
| `200` | Rate plans. |
2424

2525
## Try it
2626

‎docs/api/bookings/index.md‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
title: "Bookings API"
3-
description: "A small, invented API used to demonstrate generated endpoint pages. Nothing here is real — it exists so the documentation has something to show."
4-
sidebar_label: "Overview"
2+
title: 'Bookings API'
3+
description: 'A small, invented API used to demonstrate generated endpoint pages. Nothing here is real — it exists so the documentation has something to show.'
4+
sidebar_label: 'Overview'
55
---
66

77
<!-- AUTO-GENERATED from an OpenAPI document — edits are overwritten. -->
88

99
A small, invented API used to demonstrate generated endpoint pages.
1010
Nothing here is real — it exists so the documentation has something to show.
1111

12-
1312
**Version 1.4**
1413

1514
## Servers
@@ -19,11 +18,11 @@ Nothing here is real — it exists so the documentation has something to show.
1918

2019
## Endpoints
2120

22-
| | Endpoint | |
23-
| --- | --- | --- |
24-
| `GET` | `/reservations` | List reservations |
25-
| `POST` | `/reservations` | Create a reservation |
26-
| `GET` | `/reservations/{id}` | Get a reservation |
27-
| `DELETE` | `/reservations/{id}` | Cancel a reservation |
28-
| `GET` | `/availability` | Check availability |
29-
| `GET` | `/rates` | List rate plans _(deprecated)_ |
21+
| | Endpoint | |
22+
| -------- | -------------------- | ------------------------------ |
23+
| `GET` | `/reservations` | List reservations |
24+
| `POST` | `/reservations` | Create a reservation |
25+
| `GET` | `/reservations/{id}` | Get a reservation |
26+
| `DELETE` | `/reservations/{id}` | Cancel a reservation |
27+
| `GET` | `/availability` | Check availability |
28+
| `GET` | `/rates` | List rate plans _(deprecated)_ |

‎docs/api/bookings/reservations/cancel-reservation.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Cancel a reservation"
3-
description: "Cancellation is permanent. A cancelled reservation stays readable."
4-
sidebar_label: "Cancel a reservation"
5-
sidebar_badge: "DELETE"
2+
title: 'Cancel a reservation'
3+
description: 'Cancellation is permanent. A cancelled reservation stays readable.'
4+
sidebar_label: 'Cancel a reservation'
5+
sidebar_badge: 'DELETE'
66
sidebar_position: 4
77
---
88

@@ -21,8 +21,8 @@ Cancellation is permanent. A cancelled reservation stays readable.
2121
## Responses
2222

2323
| Status | Description |
24-
| --- | --- |
25-
| `204` | Cancelled. |
24+
| ------ | ----------- |
25+
| `204` | Cancelled. |
2626

2727
## Try it
2828

‎docs/api/bookings/reservations/create-reservation.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Create a reservation"
3-
description: "Books a room for a date range. The range is half-open — checkout is not counted."
4-
sidebar_label: "Create a reservation"
5-
sidebar_badge: "POST"
2+
title: 'Create a reservation'
3+
description: 'Books a room for a date range. The range is half-open — checkout is not counted.'
4+
sidebar_label: 'Create a reservation'
5+
sidebar_badge: 'POST'
66
sidebar_position: 2
77
---
88

@@ -27,10 +27,10 @@ Books a room for a date range. The range is half-open — checkout is not counte
2727

2828
## Responses
2929

30-
| Status | Description |
31-
| --- | --- |
32-
| `201` | Created. |
33-
| `409` | No availability for that range. |
30+
| Status | Description |
31+
| ------ | ------------------------------- |
32+
| `201` | Created. |
33+
| `409` | No availability for that range. |
3434

3535
### Example response
3636

‎docs/api/bookings/reservations/get-reservation.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Get a reservation"
3-
description: "GET /reservations/{id}"
4-
sidebar_label: "Get a reservation"
5-
sidebar_badge: "GET"
2+
title: 'Get a reservation'
3+
description: 'GET /reservations/{id}'
4+
sidebar_label: 'Get a reservation'
5+
sidebar_badge: 'GET'
66
sidebar_position: 3
77
---
88

@@ -18,10 +18,10 @@ sidebar_position: 3
1818

1919
## Responses
2020

21-
| Status | Description |
22-
| --- | --- |
23-
| `200` | The reservation. |
24-
| `404` | No such reservation. |
21+
| Status | Description |
22+
| ------ | -------------------- |
23+
| `200` | The reservation. |
24+
| `404` | No such reservation. |
2525

2626
### Example response
2727

‎docs/api/bookings/reservations/list-reservations.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "List reservations"
3-
description: "Returns reservations for the authenticated property, newest first."
4-
sidebar_label: "List reservations"
5-
sidebar_badge: "GET"
2+
title: 'List reservations'
3+
description: 'Returns reservations for the authenticated property, newest first.'
4+
sidebar_label: 'List reservations'
5+
sidebar_badge: 'GET'
66
sidebar_position: 1
77
---
88

@@ -23,10 +23,10 @@ Returns reservations for the authenticated property, newest first.
2323

2424
## Responses
2525

26-
| Status | Description |
27-
| --- | --- |
28-
| `200` | A page of reservations. |
29-
| `401` | Missing or invalid token. |
26+
| Status | Description |
27+
| ------ | ------------------------- |
28+
| `200` | A page of reservations. |
29+
| `401` | Missing or invalid token. |
3030

3131
### Example response
3232

‎docs/api/rates/index.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: "Rates API"
3-
description: "A Swagger 2.0 document."
4-
sidebar_label: "Overview"
2+
title: 'Rates API'
3+
description: 'A Swagger 2.0 document.'
4+
sidebar_label: 'Overview'
55
---
66

77
<!-- AUTO-GENERATED from an OpenAPI document — edits are overwritten. -->
@@ -16,7 +16,7 @@ A Swagger 2.0 document.
1616

1717
## Endpoints
1818

19-
| | Endpoint | |
20-
| --- | --- | --- |
21-
| `GET` | `/rates` | List rate plans |
19+
| | Endpoint | |
20+
| ------ | -------- | ------------------ |
21+
| `GET` | `/rates` | List rate plans |
2222
| `POST` | `/rates` | Create a rate plan |

‎docs/api/rates/rates/create-rate.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Create a rate plan"
3-
description: "POST /rates"
4-
sidebar_label: "Create a rate plan"
5-
sidebar_badge: "POST"
2+
title: 'Create a rate plan'
3+
description: 'POST /rates'
4+
sidebar_label: 'Create a rate plan'
5+
sidebar_badge: 'POST'
66
sidebar_position: 2
77
---
88

@@ -26,8 +26,8 @@ sidebar_position: 2
2626
## Responses
2727

2828
| Status | Description |
29-
| --- | --- |
30-
| `201` | Created. |
29+
| ------ | ----------- |
30+
| `201` | Created. |
3131

3232
### Example response
3333

‎docs/api/rates/rates/list-rates.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "List rate plans"
3-
description: "GET /rates"
4-
sidebar_label: "List rate plans"
5-
sidebar_badge: "GET"
2+
title: 'List rate plans'
3+
description: 'GET /rates'
4+
sidebar_label: 'List rate plans'
5+
sidebar_badge: 'GET'
66
sidebar_position: 1
77
---
88

@@ -19,8 +19,8 @@ sidebar_position: 1
1919
## Responses
2020

2121
| Status | Description |
22-
| --- | --- |
23-
| `200` | Rate plans. |
22+
| ------ | ----------- |
23+
| `200` | Rate plans. |
2424

2525
### Example response
2626

0 commit comments

Comments
 (0)