[PR #27] [MERGED] fix(projects): persist Dockerfile path in project settings #27

Closed
opened 2026-03-02 05:12:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gotempsh/temps/pull/27
Author: @dviejokfs
Created: 2/28/2026
Status: Merged
Merged: 2/28/2026
Merged by: @dviejokfs

Base: mainHead: feat/dockerfile-path-settings


📝 Commits (6)

  • 2e2c9ea fix(projects): persist Dockerfile path in project settings
  • 5f8bfaf docs(changelog): add entry for Dockerfile path fix (#26)
  • f6cab56 chore: merge remote-tracking branch 'origin/main' into feat/dockerfile-path-settings
  • bc5c4f3 fix(deployments): use Dockerfile preset in container logs WebSocket tests
  • fca3321 Revert "fix(deployments): use Dockerfile preset in container logs WebSocket tests"
  • acbdcf6 fix(deployments): use Dockerfile preset in container logs WebSocket tests

📊 Changes

10 files changed (+232 additions, -27 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 crates/temps-deployments/src/handlers/deployments.rs (+6 -4)
📝 crates/temps-entities/src/preset.rs (+76 -0)
📝 crates/temps-projects/src/handlers/handlers.rs (+2 -0)
📝 crates/temps-projects/src/handlers/types.rs (+28 -0)
📝 crates/temps-projects/src/services/project.rs (+54 -0)
📝 crates/temps-projects/src/services/types.rs (+2 -0)
📝 web/src/api/client/types.gen.ts (+12 -0)
📝 web/src/components/project/settings/GeneralSettings.tsx (+1 -23)
📝 web/src/components/project/settings/GitSettings.tsx (+50 -0)

📄 Description

Summary

Fixes #26 — The Dockerfile path field was not being saved when updated in project settings. The field value was collected in the form but never included in the API request body.

Changes

Backend (Rust)

  • temps-entities/preset.rs: Add PresetConfig::parse_for_preset() method to safely parse preset-specific config from a JSON value, injecting the correct tagged discriminator. Includes 4 unit tests.
  • temps-projects/handlers/types.rs: Add preset_config field to UpdateProjectSettingsRequest, UpdateGitSettingsRequest, and ProjectResponse DTOs.
  • temps-projects/handlers/handlers.rs: Pass preset_config through to service methods in both update_project_settings and update_git_settings handlers.
  • temps-projects/services/project.rs: Accept preset_config in update_project_settings and update_git_settings, parse and persist it to the database. Map preset_config from DB model in map_db_project_to_project.
  • temps-projects/services/types.rs: Add preset_config to the Project service type.

Frontend (TypeScript/React)

  • GeneralSettings.tsx: Remove the misplaced Dockerfile path input (it belonged in Git settings, not General settings).
  • GitSettings.tsx: Add Dockerfile path field that appears only when the dockerfile preset is selected. Reads current value from project.preset_config.dockerfilePath. Sends preset_config in the git settings update API call. Shows the path in both edit and read-only views.
  • types.gen.ts: Add preset_config field to ProjectResponse, UpdateProjectSettingsRequest, and UpdateGitSettingsRequest generated types.

Testing

  • All 36 existing tests in temps-projects pass
  • All 35 existing tests in temps-entities pass
  • 4 new unit tests for PresetConfig::parse_for_preset() (dockerfile, empty, non-object rejection, nextjs)
  • Full workspace cargo check --lib passes with no warnings

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gotempsh/temps/pull/27 **Author:** [@dviejokfs](https://github.com/dviejokfs) **Created:** 2/28/2026 **Status:** ✅ Merged **Merged:** 2/28/2026 **Merged by:** [@dviejokfs](https://github.com/dviejokfs) **Base:** `main` ← **Head:** `feat/dockerfile-path-settings` --- ### 📝 Commits (6) - [`2e2c9ea`](https://github.com/gotempsh/temps/commit/2e2c9eaefd33f85de7edcae94ddf0e7c9381bcce) fix(projects): persist Dockerfile path in project settings - [`5f8bfaf`](https://github.com/gotempsh/temps/commit/5f8bfaf019c9b147c28687be09b47033285f51b9) docs(changelog): add entry for Dockerfile path fix (#26) - [`f6cab56`](https://github.com/gotempsh/temps/commit/f6cab5627c97d0f12a8732d9baca48223a03e395) chore: merge remote-tracking branch 'origin/main' into feat/dockerfile-path-settings - [`bc5c4f3`](https://github.com/gotempsh/temps/commit/bc5c4f373f4cc51ae181ead1487d1ac878e29b1a) fix(deployments): use Dockerfile preset in container logs WebSocket tests - [`fca3321`](https://github.com/gotempsh/temps/commit/fca33216961c34bdefd2aa1850a15ff9490bf957) Revert "fix(deployments): use Dockerfile preset in container logs WebSocket tests" - [`acbdcf6`](https://github.com/gotempsh/temps/commit/acbdcf646330cb95c2b13e838fe9f6c13ce6cb24) fix(deployments): use Dockerfile preset in container logs WebSocket tests ### 📊 Changes **10 files changed** (+232 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `crates/temps-deployments/src/handlers/deployments.rs` (+6 -4) 📝 `crates/temps-entities/src/preset.rs` (+76 -0) 📝 `crates/temps-projects/src/handlers/handlers.rs` (+2 -0) 📝 `crates/temps-projects/src/handlers/types.rs` (+28 -0) 📝 `crates/temps-projects/src/services/project.rs` (+54 -0) 📝 `crates/temps-projects/src/services/types.rs` (+2 -0) 📝 `web/src/api/client/types.gen.ts` (+12 -0) 📝 `web/src/components/project/settings/GeneralSettings.tsx` (+1 -23) 📝 `web/src/components/project/settings/GitSettings.tsx` (+50 -0) </details> ### 📄 Description ## Summary Fixes #26 — The Dockerfile path field was not being saved when updated in project settings. The field value was collected in the form but never included in the API request body. ## Changes ### Backend (Rust) - **`temps-entities/preset.rs`**: Add `PresetConfig::parse_for_preset()` method to safely parse preset-specific config from a JSON value, injecting the correct tagged discriminator. Includes 4 unit tests. - **`temps-projects/handlers/types.rs`**: Add `preset_config` field to `UpdateProjectSettingsRequest`, `UpdateGitSettingsRequest`, and `ProjectResponse` DTOs. - **`temps-projects/handlers/handlers.rs`**: Pass `preset_config` through to service methods in both `update_project_settings` and `update_git_settings` handlers. - **`temps-projects/services/project.rs`**: Accept `preset_config` in `update_project_settings` and `update_git_settings`, parse and persist it to the database. Map `preset_config` from DB model in `map_db_project_to_project`. - **`temps-projects/services/types.rs`**: Add `preset_config` to the `Project` service type. ### Frontend (TypeScript/React) - **`GeneralSettings.tsx`**: Remove the misplaced Dockerfile path input (it belonged in Git settings, not General settings). - **`GitSettings.tsx`**: Add Dockerfile path field that appears only when the `dockerfile` preset is selected. Reads current value from `project.preset_config.dockerfilePath`. Sends `preset_config` in the git settings update API call. Shows the path in both edit and read-only views. - **`types.gen.ts`**: Add `preset_config` field to `ProjectResponse`, `UpdateProjectSettingsRequest`, and `UpdateGitSettingsRequest` generated types. ## Testing - All 36 existing tests in `temps-projects` pass - All 35 existing tests in `temps-entities` pass - 4 new unit tests for `PresetConfig::parse_for_preset()` (dockerfile, empty, non-object rejection, nextjs) - Full workspace `cargo check --lib` passes with no warnings --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:12:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/temps#27
No description provided.