Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
5287323
Update Button component css
riccio82 Dec 23, 2025
bdc75d8
Dashboard: update design
riccio82 Dec 23, 2025
e135ea3
Dashboard: update tests
riccio82 Dec 23, 2025
04f7090
Analyze: update design - wip
riccio82 Dec 23, 2025
d0c6126
Analyze page: update design - wip
riccio82 Dec 24, 2025
10924a6
Update design: home page
riccio82 Jan 7, 2026
3a496dc
Update design: cattool page buttons
riccio82 Jan 8, 2026
c15b447
Update design: buttons
riccio82 Jan 12, 2026
c9d5ce2
Update design: modals buttos
riccio82 Jan 14, 2026
45f34b4
Update design: modals buttos
riccio82 Jan 14, 2026
f3cc136
Update design: modals buttons
riccio82 Jan 14, 2026
bb94562
Settings panel wip
piedicianni Jan 19, 2026
e4cbc75
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Jan 26, 2026
e6acf58
Update design: manage
riccio82 Jan 26, 2026
2ba148a
Design update: manage
riccio82 Jan 26, 2026
024f855
Design update: manage
riccio82 Jan 27, 2026
9ea5370
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Jan 27, 2026
5c5644d
Header: Files menu
riccio82 Jan 27, 2026
cd05f46
Header: Files menu
riccio82 Jan 27, 2026
027146f
Header: mark as complete
riccio82 Jan 28, 2026
5968b0e
Dropdown menu hover
riccio82 Jan 28, 2026
1a5af69
Merge branch 'dropdown-menu-hover' into update-design
riccio82 Jan 28, 2026
fb2513e
Dropdown menu hover
riccio82 Jan 28, 2026
dda7800
Merge branch 'dropdown-menu-hover' into update-design
riccio82 Jan 28, 2026
15ae866
Dropdown menu hover
riccio82 Jan 28, 2026
b00b46c
Dropdown menu hover
riccio82 Jan 28, 2026
9be10d7
Dropdown menu hover
riccio82 Jan 28, 2026
d98ca4d
Merge remote-tracking branch 'origin/dropdown-menu-hover' into update…
riccio82 Jan 28, 2026
1ba940d
Dropdown menu hover
riccio82 Jan 28, 2026
6ff8358
Merge branch 'dropdown-menu-hover' into update-design
riccio82 Jan 28, 2026
3cee6de
Dropdown menu hover
riccio82 Jan 28, 2026
80be0e3
Merge branch 'dropdown-menu-hover' into update-design
riccio82 Jan 28, 2026
ae11494
Download Menu
riccio82 Jan 28, 2026
902db34
Download Menu
riccio82 Jan 28, 2026
7805649
Header: quality report button
riccio82 Jan 28, 2026
9f79a07
Header: quality report button
riccio82 Jan 28, 2026
9c37002
Fix dropdown popver mouse leave
piedicianni Jan 28, 2026
68677cd
Fix dropdown popver mouse leave
piedicianni Jan 28, 2026
6cc1b70
Merge branch 'dropdown-menu-hover' into update-design
riccio82 Jan 28, 2026
093fc97
Header: qa component - wip
riccio82 Jan 28, 2026
484a775
Update design: fix
riccio82 Jan 29, 2026
a76e7fc
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Jan 29, 2026
03300df
Design update: header search
riccio82 Jan 29, 2026
101e045
Update design: comments - wip
riccio82 Jan 29, 2026
24cfe9b
Update design: comments - wip
riccio82 Jan 29, 2026
569c409
Design update: Header filter
riccio82 Jan 30, 2026
475ec98
Design update: Header filter
riccio82 Jan 30, 2026
d426180
Design update: Header filter
riccio82 Jan 30, 2026
1a9f577
Design update: fix dashboard
riccio82 Jan 30, 2026
8899576
Design update: fix dashboard
riccio82 Jan 30, 2026
405af81
Update design: cattool header fix
riccio82 Feb 10, 2026
7afacfd
Update header icons
riccio82 Feb 10, 2026
6fb0228
Header icons
riccio82 Feb 11, 2026
9607cea
Header icons
riccio82 Feb 11, 2026
c027af9
Header icons
riccio82 Feb 11, 2026
9be24b7
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Feb 11, 2026
1dfc4bd
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Feb 12, 2026
37e600e
New Quality Framework filter
mauretto78 Feb 12, 2026
19bc398
QR: header wip
riccio82 Feb 13, 2026
e17eb27
QR: table wip
riccio82 Feb 13, 2026
f73b9ad
QR: table wip
riccio82 Feb 16, 2026
53d25b2
QR: new design
riccio82 Feb 17, 2026
1d52968
Merge remote-tracking branch 'origin/qr-filter-issue-r1' into update-…
riccio82 Feb 18, 2026
04deb7e
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Feb 18, 2026
31a89ba
QR: new design
riccio82 Feb 18, 2026
419d9eb
QR: new design
riccio82 Feb 18, 2026
e0ab73e
Update submodule
riccio82 Feb 18, 2026
cb379ec
Update QA Icon
riccio82 Feb 19, 2026
1f62222
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Feb 20, 2026
bdcb1ad
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Feb 20, 2026
ea575d2
Update plural rules
riccio82 Feb 20, 2026
6af7166
Icu: update css
riccio82 Feb 20, 2026
02c91da
Update icons
riccio82 Feb 23, 2026
aa681d3
Update icons
riccio82 Feb 23, 2026
eb7cdd8
Update comments icon
riccio82 Feb 24, 2026
b8ce809
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Feb 25, 2026
d73d918
Update plural rules
riccio82 Feb 25, 2026
a9d180a
Refactoring: chenge replace hardcoded colors with variables
riccio82 Feb 26, 2026
99e4bfe
Tab translation memory and Machine translation
piedicianni Feb 26, 2026
ee2a0aa
Update js tests
riccio82 Feb 26, 2026
8b1cbf3
Css: refactor colors variables
riccio82 Feb 27, 2026
44e289c
CSS: restore old variables name
riccio82 Feb 27, 2026
76f79a9
Settings panel
piedicianni Mar 2, 2026
8076165
Removed component MenuButton
piedicianni Mar 2, 2026
7ec8715
Update button css
riccio82 Mar 2, 2026
d29be24
Some fix
piedicianni Mar 3, 2026
95acec1
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Mar 3, 2026
c561aed
Update submodule
riccio82 Mar 3, 2026
13322e8
Update submodules
riccio82 Mar 3, 2026
8cfd1a5
Settings panel done
piedicianni Mar 3, 2026
fed2ff3
Some improvements
piedicianni Mar 3, 2026
452c1ae
Improvements
piedicianni Mar 4, 2026
ed879a8
New layout
riccio82 Mar 4, 2026
cc58aea
AnalizeHeader refactoring
riccio82 Mar 4, 2026
2acc606
Analyze page: project header
riccio82 Mar 5, 2026
ea92e2f
Analysis page: update design - wip
riccio82 Mar 5, 2026
216f1ac
AI Assistant refactoring
mauretto78 Jan 22, 2026
f944a2f
Added ai-assistant routes
mauretto78 Jan 23, 2026
afec518
Fix code
mauretto78 Jan 26, 2026
434e4f6
missing 'id_client'
mauretto78 Jan 27, 2026
6e50a1b
FE integration wip
piedicianni Feb 10, 2026
ec80b4d
Wip
piedicianni Feb 11, 2026
f47fc75
Wip
piedicianni Feb 12, 2026
ac34df1
Workers
mauretto78 Feb 12, 2026
6736c04
Fix css box alignment
piedicianni Feb 12, 2026
686b8cd
Feedback integration
piedicianni Feb 13, 2026
0f41afe
Ai alternatives request
piedicianni Feb 16, 2026
0a49724
Fix
piedicianni Feb 16, 2026
2b616c6
Fix
piedicianni Feb 16, 2026
d45fb94
controller
mauretto78 Feb 16, 2026
51edea1
Worker improvement
mauretto78 Feb 16, 2026
7061ad0
Fix worker
mauretto78 Feb 16, 2026
134dfff
altTrans improvement
mauretto78 Feb 16, 2026
614714f
wrong error message
mauretto78 Feb 17, 2026
cf54d70
Alternatives request added job lara styleù
piedicianni Feb 17, 2026
3ea8e73
prompt
mauretto78 Feb 17, 2026
d591480
Parameter renamed
mauretto78 Feb 17, 2026
8ce16f2
Enrich alternative translations
mauretto78 Feb 17, 2026
845a99d
Fixed manageAlternativeTranslations
mauretto78 Feb 18, 2026
320b245
fixed enrichAlternatives
mauretto78 Feb 18, 2026
9b1fb7d
Removed enrichResponse from Back-edn
mauretto78 Feb 19, 2026
33f2850
Fix
piedicianni Feb 18, 2026
df698ab
Fix
piedicianni Feb 18, 2026
7da661d
Fix
piedicianni Feb 18, 2026
ee49db4
Enrich ai alternatives
piedicianni Feb 19, 2026
9b2ac3d
Fix
piedicianni Feb 19, 2026
e6cb52f
Improved prompt
mauretto78 Feb 19, 2026
72fb6d5
Invoke tag projection
mauretto78 Feb 19, 2026
5765dc5
fix
mauretto78 Feb 19, 2026
5d1df79
Prompt improvements
mauretto78 Feb 20, 2026
e8fc436
Avoid split tags
piedicianni Feb 19, 2026
456f39a
prompt improvements
mauretto78 Feb 20, 2026
dd8d2ee
improved prompt
mauretto78 Feb 20, 2026
9e9ec13
feedback improvement
mauretto78 Feb 20, 2026
37fbf6e
refactorign
mauretto78 Feb 20, 2026
81de77f
prompt
mauretto78 Feb 20, 2026
000397b
Updated submodule
Ostico Feb 23, 2026
949418f
Fix
piedicianni Feb 20, 2026
70a91d7
Ai feedback request
piedicianni Feb 23, 2026
808de77
More improvements
piedicianni Feb 24, 2026
c9efc01
Editor page improvements
piedicianni Mar 9, 2026
c212c98
Fix
piedicianni Mar 9, 2026
71e927a
Editor buttons resolution rules
piedicianni Mar 9, 2026
c3dce0f
v3.5.27
riccio82 Feb 20, 2026
3820238
Update plural rules
riccio82 Mar 3, 2026
e68e42c
Update ICU tab
riccio82 Mar 3, 2026
89f402b
Update test
riccio82 Mar 3, 2026
9d9fadf
Refactor updload components and add tests
riccio82 Mar 3, 2026
a4cf2db
Refactor updload components and add tests
riccio82 Mar 3, 2026
9806e8d
Fixed languages (#4406)
mauretto78 Mar 4, 2026
a0b7bd4
Analyze page changed color help icon (#4407)
piedicianni Mar 4, 2026
eaec914
Updated dependency
Ostico Mar 4, 2026
1ce6a96
Improved icu management on filters call
Ostico Mar 5, 2026
f6495d4
Update dependency immutable to v5.1.5 [SECURITY] (#4410)
renovate[bot] Mar 5, 2026
ba923be
Update dependency eslint-plugin-jest to v29.14.0 (#4401)
renovate[bot] Mar 5, 2026
8294cfa
Update dependency msw to v2.12.10 (#4402)
renovate[bot] Mar 5, 2026
d5f8ff3
v3.5.28
mauretto78 Mar 5, 2026
75d3469
Fixed submodule
Ostico Mar 5, 2026
fe96e59
v3.5.29
Ostico Mar 5, 2026
0ff6726
Fixed unmarshalling as string
Ostico Mar 5, 2026
6ee8edf
v3.5.30
Ostico Mar 5, 2026
debcb82
Updated submodule
Ostico Mar 5, 2026
dd80cd1
v3.5.31
Ostico Mar 5, 2026
a1b02b1
Updated dependencies
Ostico Mar 5, 2026
46100b9
Updated submodule
Ostico Mar 6, 2026
0abc1ab
v3.5.32
Ostico Mar 6, 2026
8bec629
v3.5.33
Ostico Mar 6, 2026
659ae21
fix: deduplicate language codes by locale before checking allowed pairs
Ostico Mar 6, 2026
04f1707
v3.5.34
Ostico Mar 6, 2026
3df8a66
Updated submodule
Ostico Mar 6, 2026
d662e55
v3.5.35
Ostico Mar 6, 2026
9d69dc6
Update dependency @sentry/webpack-plugin to v4.9.1 (#4413)
renovate[bot] Mar 9, 2026
6429b32
Update dependency sass-loader to v16.0.7 (#4414)
renovate[bot] Mar 9, 2026
d4655c0
Update yarn.lock
riccio82 Mar 9, 2026
4de50e3
Analysis page: wip
riccio82 Mar 9, 2026
6701297
Analysis page: wip
riccio82 Mar 11, 2026
8d41ae7
Analysis page: wip
riccio82 Mar 11, 2026
493ab6f
Page my projects 2.0 - wip
piedicianni Mar 11, 2026
774d4e5
Analysis page: wip
riccio82 Mar 11, 2026
db43af1
Analysis page: wip
riccio82 Mar 11, 2026
a853eab
Outsource refactoring: wip
riccio82 Mar 12, 2026
0e28b3d
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Mar 12, 2026
95d9e77
Project page manage teams and members
piedicianni Mar 12, 2026
1e71608
fix merge
riccio82 Mar 12, 2026
c25622d
Fix css colors variables
piedicianni Mar 12, 2026
b894513
Outsource refactoring: wip
riccio82 Mar 12, 2026
160a719
Analysis page: wip
riccio82 Mar 13, 2026
2584450
Analysis page: wip
riccio82 Mar 13, 2026
e1e4bb5
Analysis page: wip
riccio82 Mar 13, 2026
7791a09
Analysis page: wip
riccio82 Mar 13, 2026
53994f4
Analysis page: wip
riccio82 Mar 16, 2026
c2dfb6c
My projects chunks and other stuff
piedicianni Mar 16, 2026
1bde4dd
Removed comment
piedicianni Mar 16, 2026
5361281
Job container and chunks
piedicianni Mar 17, 2026
497b02f
getSegmentsIdForQR refactoring
mauretto78 Mar 19, 2026
dab80e8
Segment history
mauretto78 Mar 23, 2026
5b10673
Segment history
mauretto78 Mar 24, 2026
72aca9d
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Mar 25, 2026
9b47e2e
QR: add segment history
riccio82 Mar 25, 2026
25bf443
feat: add file-type icon components
riccio82 Mar 26, 2026
ef55af7
🐛 fix(icons): remove no-op clipPath with hardcoded id from FileTypeFo…
riccio82 Mar 26, 2026
b07d0eb
Update files icons
riccio82 Mar 26, 2026
f9d5c37
Merge remote-tracking branch 'origin/develop' into update-design
riccio82 Mar 26, 2026
0b36c3d
Remove old files image
riccio82 Mar 26, 2026
355d0d6
Fix tests
riccio82 Mar 26, 2026
279f2fa
Job table and job menu
piedicianni Mar 20, 2026
6d082e9
Job progress bar improvements
piedicianni Mar 27, 2026
73f48c5
Fix
piedicianni Mar 27, 2026
572c342
Merge branch 'develop' into update-design
piedicianni Mar 27, 2026
8ba3551
Some test fix
piedicianni Mar 27, 2026
246ef9b
Update QR
riccio82 Mar 27, 2026
cdee7a8
My projects css and so on
piedicianni Mar 31, 2026
4231e74
Header members filter, search project and status filter
piedicianni Apr 1, 2026
35e1a7a
Fix
piedicianni Apr 1, 2026
67cb178
New header and other stuff
piedicianni Apr 2, 2026
ec82ea7
Merge remote-tracking branch 'origin' into update-design
riccio82 Apr 7, 2026
913984a
New files icon
riccio82 Apr 7, 2026
a358731
Filters improvements and empty state
piedicianni Apr 7, 2026
d537960
Some tests fix
piedicianni Apr 13, 2026
b472c7b
Outsource info
piedicianni Apr 13, 2026
b199032
Outsource translator
piedicianni Apr 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ version:
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.
3. Object Code Incorporating Material from Library Header GoToIcon.
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

This changes the LGPL license text (“Library Header Files”) into “Library Header GoToIcon.”, which appears unintended and alters the legal terms text. Licenses should typically remain verbatim. Please revert this line to the original license wording unless there is a deliberate, legally-reviewed reason to modify it.

Suggested change
3. Object Code Incorporating Material from Library Header GoToIcon.
3. Object Code Incorporating Material from Library Header Files.

Copilot uses AI. Check for mistakes.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
Expand Down
1 change: 1 addition & 0 deletions lib/Controller/API/V3/QualityReportControllerAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ private function _formatSegments(array $segments, array $ttlArray, array $filesI
$seg['ice_modified'] = $segment->ice_modified;
$seg['is_pre_translated'] = $segment->is_pre_translated;
$seg['issues'] = $segment->issues;
$seg['history'] = $segment->history;
$seg['last_revisions'] = $segment->last_revisions;
$seg['last_translation'] = $segment->last_translation;
$seg['locked'] = $segment->locked;
Expand Down
23 changes: 23 additions & 0 deletions lib/Model/QualityReport/HistoryElementStruct.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Model\QualityReport;

use Model\DataAccess\AbstractDaoObjectStruct;
use Model\DataAccess\IDaoStruct;

/**
* @property int $id_segment
* @property string $translation
* @property int $version_number
* @property int $source_page
*/
class HistoryElementStruct extends AbstractDaoObjectStruct implements IDaoStruct
{
public int $id_segment;
public string $translation;
public int $version_number;
public ?int $source_page = null;
public ?string $status = null;
public ?string $create_date = null;
public ?string $creation_date = null;
}
1 change: 1 addition & 0 deletions lib/Model/QualityReport/QualityReportDao.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public static function getIssuesBySegments(array $segments_id, int $job_id): arr

$sql = "SELECT

issues.translation_version as translation_version,
issues.id_segment as segment_id,
issues.id as issue_id,
issues.create_date as issue_create_date,
Expand Down
101 changes: 87 additions & 14 deletions lib/Model/QualityReport/QualityReportSegmentModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,8 @@ public function __construct(JobStruct $chunk)
*/
public function getSegmentsIdForQR($step, int $ref_segment, $where = "after", $options = [])
{
if (isset($options['filter']['issue_category']) && $options['filter']['issue_category'] != 'all') {
$subCategories = (new CategoryDao())->findByIdModelAndIdParent(
$this->chunk->getProject()->id_qa_model,
$options['filter']['issue_category']
);

if (!empty($subCategories) > 0) {
$options['filter']['issue_category'] = array_map(function (CategoryStruct $subcat) {
return $subcat->id;
}, $subCategories);
}
if (isset($options['filter']['issue_category'])) {
$options['filter']['issue_category'] = $this->issueCategoryIds($options['filter']['issue_category']);
}

/**
Expand Down Expand Up @@ -90,6 +81,39 @@ public function getSegmentsIdForQR($step, int $ref_segment, $where = "after", $o
return $segments_id;
}

/**
* Processes a string of issue category IDs, converting them into an array of integers,
* and expands the list by including IDs of subcategories if applicable.
*
* @param string $issue_category A comma-separated string of issue category IDs.
* If it contains 'all', the method returns null.
*
* @return array|null Returns an array of category IDs, including subcategory IDs, or null if 'all' is present.
*/
private function issueCategoryIds(string $issue_category): ?array
{
if (str_contains($issue_category, 'all')){
return null;
}

$issue_category = array_map('intval', explode(',', $issue_category));

foreach ($issue_category as $issue_category_id) {
$subCategories = (new CategoryDao())->findByIdModelAndIdParent(
$this->chunk->getProject()->id_qa_model,
$issue_category_id
);

if (!empty($subCategories)) {
foreach ($subCategories as $subcat) {
$issue_category[] = (int)$subcat->id;
}
}
}

return $issue_category;
}

/**
* @param QualityReportSegmentStruct $seg
* @param MateCatFilter $Filter
Expand Down Expand Up @@ -180,10 +204,9 @@ public function getSegmentsForQR(array $segment_ids, $isForUI = false)
$commentsDao = new CommentDao;
$comments = $commentsDao->getThreadsBySegments($segment_ids, $this->chunk->id);

$all_events = [];

$translationVersionDao = new TranslationVersionDao;
$all_events = $translationVersionDao->getAllRelevantEvents($segment_ids, $this->chunk->id);
$history_events = $translationVersionDao->historyEvents($segment_ids, $this->chunk->id);

$segments = [];

Expand All @@ -205,7 +228,8 @@ public function getSegmentsForQR(array $segment_ids, $isForUI = false)
$this->_commonSegmentAssignments($seg, $Filter, $featureSet, $this->chunk, $isForUI);
$this->_assignIssues($seg, $issues ?? [], $issue_comments);
$this->_assignComments($seg, $comments);
$this->_populateLastTranslationAndRevision($seg, $Filter, $all_events, $isForUI);
$this->_populateLastTranslationAndRevision($seg, $Filter, $all_events, $isForUI);
$this->_populateHistory($seg, $Filter, $history_events,$issues ?? [], $isForUI);

$seg->pee_translation_revise = $seg->getPEEBwtTranslationRevise();
$seg->pee_translation_suggestion = $seg->getPEEBwtTranslationSuggestion();
Expand All @@ -216,6 +240,55 @@ public function getSegmentsForQR(array $segment_ids, $isForUI = false)
return $segments;
}

/**
* Populates the history for a given quality report segment by organizing events and associated issues.
*
* @param QualityReportSegmentStruct $seg The segment structure where the history will be populated.
* @param MateCatFilter $Filter The filter used to process translations for UI rendering.
* @param array $events An array of SegmentEventsStruct objects representing the events related to the segment.
* @param array $issues An array of issue objects to associate with the events, filtered by segment and version.
* @param bool $isForUI Indicates whether the translation should be processed for UI display purposes.
*
* @return void
*/
protected function _populateHistory(
QualityReportSegmentStruct $seg,
MateCatFilter $Filter,
array $events = [],
array $issues = [],
bool $isForUI = false
)
{
$elements = [];

$eventsForThisSegment = array_filter($events, function (HistoryElementStruct $event) use ($seg) {
return $event->id_segment == $seg->sid;
});

/** @var HistoryElementStruct $event */
foreach ($eventsForThisSegment as $event) {
$translation = ($isForUI) ? $Filter->fromLayer0ToLayer2($event->translation) : $event->translation;

$elements[] = [
'status' => $event->status,
'date' => $event->creation_date ?? $event->create_date,
'revision_number' => ReviewUtils::sourcePageToRevisionNumber($event->source_page),
'source_page' => $event->source_page,
'version_number' => $event->version_number,
'translation' => $translation,
'issues' => array_filter($issues, function ($issue) use ($event) {
return
$issue->deleted_at === null &&
$event->id_segment == $issue->segment_id &&
$event->version_number == $issue->translation_version
;
})
];
}

$seg->history = $elements;
}

/**
* @return ChunkReviewStruct[]
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/Model/QualityReport/QualityReportSegmentStruct.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class QualityReportSegmentStruct extends AbstractDaoObjectStruct implements IDao

protected string $tm_analysis_status;

public array $history = [];

/**
* @return string
*/
Expand Down
2 changes: 0 additions & 2 deletions lib/Model/QualityReport/SegmentEventsStruct.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class SegmentEventsStruct extends AbstractDaoObjectStruct implements IDaoStruct
{

/**
* @var int
*/
Expand All @@ -37,5 +36,4 @@ class SegmentEventsStruct extends AbstractDaoObjectStruct implements IDaoStruct
* @var int
*/
protected int $source_page;

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Model\DataAccess\Database;
use Model\DataAccess\ShapelessConcreteStruct;
use Model\Jobs\JobStruct;
use Model\QualityReport\HistoryElementStruct;
use Model\QualityReport\SegmentEventsStruct;
use Model\Translations\SegmentTranslationStruct;
use PDO;
Expand Down Expand Up @@ -249,6 +250,56 @@ public function getVersionsForRevision($id_job, $id_segment)
);
}

/**
* @param $id_job
* @param $id_segment
*
* @return TranslationVersionStruct[]
*/
public function getVersionsForTranslationBySegment($id_job, $id_segment)
{
$sql = "SELECT * FROM segment_translation_versions " .
" WHERE id_job = :id_job AND id_segment = :id_segment " .
" ORDER BY creation_date DESC ";
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

getVersionsForTranslationBySegment() is incomplete: it builds $sql but never prepares/executes the query or returns results. Also, as written it immediately continues with the next method, which indicates the intended implementation is missing. Please complete the DAO method (prepare, bind, fetch into the expected struct, and return), or remove it until it’s ready.

Suggested change
" ORDER BY creation_date DESC ";
" ORDER BY creation_date DESC ";
$db = Database::obtain()->getConnection();
$stmt = $db->prepare($sql);
$stmt->setFetchMode(PDO::FETCH_CLASS, TranslationVersionStruct::class);
$stmt->execute(['id_job' => $id_job, 'id_segment' => $id_segment]);
return $stmt->fetchAll();

Copilot uses AI. Check for mistakes.
}
public function historyEvents(array $segments_id, int $job_id)
{
$db = Database::obtain()->getConnection();

$prepare_str_segments_id = implode(', ', array_fill(0, count($segments_id), '?'));

$query = "SELECT
id_segment,
first_sv.version_number,
null as source_page,
null as status,
null as create_date,
first_sv.creation_date,
first_sv.translation
FROM segment_translation_versions first_sv WHERE id_segment IN ( $prepare_str_segments_id ) AND id_job = ? AND version_number = 0
UNION
SELECT ste.id_segment, ste.version_number, ste.source_page, ste.status, ste.create_date, stv.creation_date, stv.translation FROM segment_translation_events ste
INNER JOIN (
SELECT creation_date, id_segment, translation, version_number, id_job
FROM segment_translation_versions
WHERE id_segment IN ( $prepare_str_segments_id )
AND id_job = ?
UNION
SELECT null as creation_date, id_segment, translation, version_number, id_job
FROM segment_translations
WHERE id_segment IN ( $prepare_str_segments_id )
AND id_job = ?
) AS stv ON stv.version_number = ste.version_number AND stv.id_segment = ste.id_segment

WHERE ste.id_segment IN ( $prepare_str_segments_id ) GROUP BY version_number, source_page;";

$stmt = $db->prepare($query);
$stmt->setFetchMode(PDO::FETCH_CLASS, HistoryElementStruct::class);
$stmt->execute(array_merge($segments_id, [$job_id], $segments_id, [$job_id], $segments_id, [$job_id], $segments_id));
Comment on lines +292 to +298
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

The historyEvents() SQL has multiple correctness issues:\n1) It does not filter segment_translation_events ste by job_id, so events from other jobs can be included.\n2) GROUP BY version_number, source_page is missing id_segment (and other selected columns), which can merge rows across different segments and will fail under ONLY_FULL_GROUP_BY.\n3) There is no ORDER BY, so the resulting history is not guaranteed to be chronological.\nSuggested fix: add ste.id_job = ? and include ste.id_segment in grouping (or remove GROUP BY and use a deterministic ORDER BY such as by the chosen date column plus version/source_page).

Suggested change
) AS stv ON stv.version_number = ste.version_number AND stv.id_segment = ste.id_segment
WHERE ste.id_segment IN ( $prepare_str_segments_id ) GROUP BY version_number, source_page;";
$stmt = $db->prepare($query);
$stmt->setFetchMode(PDO::FETCH_CLASS, HistoryElementStruct::class);
$stmt->execute(array_merge($segments_id, [$job_id], $segments_id, [$job_id], $segments_id, [$job_id], $segments_id));
) AS stv ON stv.version_number = ste.version_number AND stv.id_segment = ste.id_segment AND stv.id_job = ste.id_job
WHERE ste.id_segment IN ( $prepare_str_segments_id ) AND ste.id_job = ?
ORDER BY id_segment, COALESCE(create_date, creation_date), version_number, source_page;";
$stmt = $db->prepare($query);
$stmt->setFetchMode(PDO::FETCH_CLASS, HistoryElementStruct::class);
$stmt->execute(array_merge($segments_id, [$job_id], $segments_id, [$job_id], $segments_id, [$job_id], $segments_id, [$job_id]));

Copilot uses AI. Check for mistakes.

return $stmt->fetchAll();
}

/**
* @param array $segments_id
* @param int $job_id
Expand Down Expand Up @@ -279,7 +330,7 @@ public function getAllRelevantEvents(array $segments_id, int $job_id): array
AND id_job = ?
) AS stv
JOIN (
SELECT MAX(version_number) AS version_number, ste.id_segment, ste.source_page
SELECT MAX(version_number) AS version_number, ste.id, ste.id_segment, ste.source_page
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

This SELECT mixes an aggregate (MAX(version_number)) with non-aggregated columns (ste.id, ste.id_segment, ste.source_page). If the query groups by segment/page, ste.id will be nondeterministic (or rejected with ONLY_FULL_GROUP_BY). Consider either removing ste.id from the projection or selecting an aggregate like MAX(ste.id) AS id that matches the grouping semantics.

Suggested change
SELECT MAX(version_number) AS version_number, ste.id, ste.id_segment, ste.source_page
SELECT MAX(version_number) AS version_number, ste.id_segment, ste.source_page

Copilot uses AI. Check for mistakes.
FROM segment_translation_events ste
WHERE id_segment IN ( $prepare_str_segments_id )
AND ste.id_job = ?
Expand Down
4 changes: 1 addition & 3 deletions lib/View/templates/_manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
</header>

<div id="manage-container" class="new-container">
<div class="ui active inverted dimmer">
<div class="ui massive text loader">Loading Projects</div>
</div>

</div>


Expand Down
2 changes: 1 addition & 1 deletion plugins/aligner
16 changes: 8 additions & 8 deletions public/css/sass/activity-log-main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.activity-log-table {
height: 100%;
overflow-y: auto;
border: 1px solid colors.$grey8;
border: 1px solid colors.$grey200;

.activity-log-table-columns-name,
.activity-log-table-columns-content {
Expand Down Expand Up @@ -47,7 +47,7 @@
.activity-log-table-columns-content {
> * {
height: 40px;
border: 1px solid colors.$grey8;
border: 1px solid colors.$grey200;
border-top: unset;
padding: 10px;
border-left: unset;
Expand All @@ -58,13 +58,13 @@
}

&:nth-child(odd) {
background-color: colors.$grey5;
background-color: colors.$grey50;
}
}

.activity-table-column-order {
background-color: colors.$grey9;
border: 1px solid colors.$grey8;
background-color: colors.$grey75;
border: 1px solid colors.$grey200;
padding: 5px;
justify-content: space-between;
cursor: pointer;
Expand Down Expand Up @@ -97,15 +97,15 @@
width: 160px;

label {
color: colors.$grey6;
color: colors.$grey700;
}

.select {
font-size: 14px;
padding: 5px;

&:hover {
border-color: rgba(colors.$grey8, 0.8);
border-color: rgba(colors.$grey200, 0.8);
box-shadow: none;
}
}
Expand All @@ -115,7 +115,7 @@
width: 250px;
font-size: 14px;
border-radius: 2px;
border: 1px solid colors.$grey2;
border: 1px solid colors.$grey300;
padding: 7px;
}
}
Expand Down
Loading