Repository navigation
Unsere Änderungen aus dem Woped-web Team - #119
Open
ledbrainlet wants to merge 29 commits into
Open
ledbrainlet wants to merge 29 commits into
ledbrainlet wants to merge 29 commits into
Conversation
Schritt 2 und 3 in der Reihenfolge getauscht
Schritt 2 und 3 zurücktauschen Zuerst Auswahl der LLM, dann Eingabe APIKey
Funktioniert jetzt bei P2t und T2P. Und gibt fehlermeldungb bei drag and drop von falschen Dateien
RAG Toggle entfernt LLM Checkbox entfernt
…ckends gesetzt. Bisher kann wegen dem fehlenden backend nichtmal das passende ki modell ausgewählt werden, und dann auch keine p2t texte erstellt werden. Diese Änderung ermöglicht es uns, das Front end für p2t zu testen, wenn man es mit npm start startet
KanBen86
self-requested a review
June 22, 2026 18:39
KanBen86
approved these changes
Jun 22, 2026
There was a problem hiding this comment.
Pull request overview
This PR consolidates the former T2P and P2T UIs into a single stepper-based “CombinedComponent”, introduces Transloco-based i18n (DE/EN) for the new flow, and adds BPMN layout normalization before rendering to improve diagram display.
Changes:
- Replaced the separate T2P/P2T pages with a unified
CombinedComponentrendered fromHomeComponent. - Added Transloco setup and initial DE/EN translation files for the new UI.
- Enhanced BPMN rendering by importing required
bpmn-jsstyles globally and normalizing BPMN DI layout inModelDisplayer.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles.css | Imports bpmn-js CSS assets globally. |
| src/environments/environment.ts | Changes dev P2T API base URL default. |
| src/assets/i18n/en.json | Adds English translations for new stepper UI. |
| src/assets/i18n/de.json | Adds German translations for new stepper UI. |
| src/app/utilities/modelDisplayer.ts | Adds BPMN relayout logic + tighter typing. |
| src/app/transloco-root.module.ts | Migrates Transloco config to provideTransloco + sets default lang. |
| src/app/t2p/t2p.module.ts | Removes old T2P module. |
| src/app/t2p/t2p.component.ts | Removes old T2P component. |
| src/app/t2p/t2p.component.html | Removes old T2P template. |
| src/app/t2p/t2p.component.css | Removes old T2P styles. |
| src/app/Services/p2tHttpService.ts | Adjusts LM Studio detection + error message formatting. |
| src/app/p2t/p2t.component.ts | Removes old P2T component. |
| src/app/p2t/p2t.component.spec.ts | Removes old P2T unit tests. |
| src/app/p2t/p2t.component.html | Removes old P2T template. |
| src/app/p2t/p2t.component.css | Removes old P2T styles. |
| src/app/home/home.module.ts | Simplifies Home module definition. |
| src/app/home/home.component.html | Replaces old tabs with <app-components>. |
| src/app/home/home.component.css | Updates selectors/styles to match new component. |
| src/app/components/components.ts | Adds the unified stepper component logic (T2P + P2T + i18n + key validation). |
| src/app/components/components.spec.ts | Adds tests for the unified component. |
| src/app/components/components.html | Adds the unified stepper UI and translation bindings. |
| src/app/components/components.css | Adds styles for the unified UI. |
| src/app/app.module.ts | Registers CombinedComponent + TranslocoRootModule; removes old routes/components. |
| README.md | Adds local dev prerequisites/start instructions. |
| .claude/launch.json | Adds a dev launch configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+88
to
+92
| if (this.selectedLLMProvider === 'openai') { | ||
| const response = await fetch('https://api.openai.com/v1/models', { | ||
| headers: { Authorization: `Bearer ${this.apiKey}` }, | ||
| }); | ||
| this.apiKeyValid = response.ok; |
Comment on lines
+93
to
+98
| } else if (this.selectedLLMProvider === 'gemini') { | ||
| const response = await fetch( | ||
| `https://generativelanguage.googleapis.com/v1beta/models?key=${this.apiKey}` | ||
| ); | ||
| this.apiKeyValid = response.ok; | ||
| } |
Comment on lines
+60
to
+65
| // ─── ViewChild refs ─────────────────────────────────────────────────────── | ||
| @ViewChild('stepper') stepper!: MatStepper; | ||
| @ViewChild('t2pFileInputRef') t2pFileInputRef!: ElementRef<HTMLInputElement>; | ||
| @ViewChild('apiKeyInput') apiKeyInput!: ElementRef; | ||
| @ViewChild('fileInputRef') p2tFileInputRef!: ElementRef<HTMLInputElement>; | ||
| @ViewChild('llmToggle') llmToggle!: MatSlideToggle; |
Comment on lines
+260
to
+262
| // onRagToggleChange(event: MatSlideToggleChange): void { | ||
| // this.useRag = event.checked; | ||
| // } |
Comment on lines
+54
to
+57
| it('should start with LLM disabled', () => { | ||
| expect(component.isLLMEnabled).toBeFalsy(); | ||
| expect(component.apiKeyValid).toBeNull(); | ||
| }); |
Comment on lines
+137
to
+145
| it('should fetch models for openai', () => { | ||
| const mockModels = ['gpt-3.5-turbo', 'gpt-4']; | ||
| jest.spyOn(component['p2tHttpService'], 'getModels').mockReturnValue(of(mockModels)); | ||
| component.apiKey = 'sk-proj-123456'; | ||
| component.selectedLLMProvider = 'openai'; | ||
| component.fetchModelsForProvider('openai'); | ||
| expect(component.models).toEqual(mockModels); | ||
| expect(component.selectedModel).toEqual('gpt-3.5-turbo'); | ||
| }); |
Comment on lines
6
to
9
| production: false, | ||
| /** P2T API base URL (e.g. https://woped.dhbw-karlsruhe.de/p2t). Empty = use relative /p2t with dev proxy. */ | ||
| p2tApiUrl: '' | ||
| p2tApiUrl: 'https://woped.dhbw-karlsruhe.de/p2t' | ||
| }; |
Comment on lines
+12
to
+16
| ### Prerequisites | ||
| 1. npm installed on your system | ||
| 2. npm install husky | ||
| 3. npm run prepare | ||
|
|
Comment on lines
1
to
+11
| import { NgModule } from '@angular/core'; | ||
| import { BrowserModule } from '@angular/platform-browser'; | ||
|
|
||
| import { HttpClientModule } from '@angular/common/http'; | ||
| import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
|
|
||
| import { MatInputModule } from '@angular/material/input'; | ||
| import { MatSlideToggleModule } from '@angular/material/slide-toggle'; | ||
|
|
||
| import { TextFieldModule } from '@angular/cdk/text-field'; | ||
| import { | ||
| MAT_FORM_FIELD_DEFAULT_OPTIONS, | ||
| MatFormFieldModule, | ||
| } from '@angular/material/form-field'; | ||
| import { MatStepperModule } from '@angular/material/stepper'; | ||
| import { MatTabsModule } from '@angular/material/tabs'; | ||
| import { P2tComponent } from '../p2t/p2t.component'; | ||
| import { T2PComponent } from '../t2p/t2p.component'; | ||
| import { T2PModule } from '../t2p/t2p.module'; | ||
| import { HomeComponent } from './home.component'; | ||
|
|
||
| @NgModule({ | ||
| declarations: [HomeComponent], | ||
|
|
||
| imports: [ | ||
| BrowserModule, | ||
| BrowserAnimationsModule, | ||
| HttpClientModule, | ||
| MatSlideToggleModule, | ||
| MatFormFieldModule, | ||
| MatInputModule, | ||
| MatTabsModule, | ||
| MatStepperModule, | ||
| TextFieldModule, | ||
| T2PComponent, | ||
| T2PModule, | ||
| P2tComponent, | ||
| ], | ||
| providers: [ | ||
| { | ||
| provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, | ||
| useValue: { appearance: 'outline' }, | ||
| }, | ||
| ], | ||
|
|
||
| exports: [HomeComponent], | ||
| imports: [BrowserModule], | ||
| bootstrap: [HomeComponent], | ||
| }) | ||
| export class HomeModule {} | ||
| export class HomeModule {} No newline at end of file |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
|
Hallo Studies, könnt ihr euch bitte nochmal die Probleme die hier vom Copilot reported werden anschauen? Wenn nötig, dann resolved die Anmerkungen vom Copilot. |
Nicht benötigt für die App
Textoutput war vorher immer auf Englisch, ist nun auf Deutsch falls Deutsch gewählt wird und auf Englisch falls Englisch gewählt wird.
Letzte Rückstände von der entfernten RAG Funktion aus dem Code nehmen um Übersicht zu verbessern.
Generierte BPMN können jetzt auch live in Web editiert werden vor dem Download.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please describe the changes you made.
Checklist
Additional Notes
Is there anything the reviewers should pay attention to?