Page MenuHomePhabricator

Activity pane on front page no longer shows New Tasks by default after Phorge migration
Closed, ResolvedPublicBUG REPORT

Description

From IRC:

<Dreamy_Jazz> 	One thing that might be different is the Activity pane doesn't seem expanded by default. I can't remember 100% whether it was expanded by default before, but the empty space looks odd.
<marostegui> 	Dreamy_Jazz: It was expanded by default before, yeah
<marostegui> 	At least it'd show stuff
<Dreamy_Jazz> 	It does still show stuff if you click on one of the tabs
<marostegui> 	yeah
<jynus> 	I expect minor inconveniences to show up, it always happens on upgrade
<Dreamy_Jazz> 	^
<jynus> 	but as long as it is that, it is not a big issue
<Dreamy_Jazz> 	No problem with it being like this. Just wanted to report it.
<brennen> 	thanks, noted. we think this is an upstream issue that should be fixed with future updates.

Just creating this task since I couldn’t find an existing one (no upstream issue either), and I also use the New Tasks pane regularly and am looking forward to it coming back. (But it’s probably not the top priority 🙂)

Related file(s):

Recent related changes:

Problematic Panels

https://phabricator.wikimedia.org/W6

Activity


Upstream Task in Phorge:

https://we.phorge.it/T15651

Details

Other Assignee
brennen
TitleReferenceAuthorSource BranchDest Branch
Revert " Add temporary debug output for T344835"repos/phabricator/phabricator!20aklappert344835revertwmf/stable
Add temporary debug output for T344835repos/phabricator/phabricator!19aklapperT344835wmf/stable
Customize query in GitLab

Event Timeline

Uhm. I see. At the moment I cannot reproduce with the upstream code of Phorge so I wonder if this is just something related to Wikimedia Phorge.

I see that downstream is not completely up to date with the stable branch of Phorge. For example this patch is missing at least AFAIK: https://we.phorge.it/D25308 but that seems to me an un-relevant change.

I'm not able to reproduce this problem locally with upstream Phorge at https://we.phorge.it/source/phorge

But, even more interestingly, I've done a checkout of the branch wmf/stable from https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/tree/wmf/stable

And I get the same result. It seems to work in both cases. Same screenshot:

Test Dashboard.png (916×1 px, 225 KB)

Maybe @Dylsss would like to give an eye on this

Don't tell anyone that I would like to put this in production and collect its logs when visiting with ?asd=1

diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
index 831229bab1..0598057419 100644
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
@@ -112,6 +112,11 @@ final class PhabricatorDashboardTabsPanelType
       }

       $is_selected = (string)$idx === (string)$selected;
+      if(isset($_GET['asd'])) {
+        phlog("Tab view $name");
+        phlog($idx);
+        phlog($selected);
+      }

       $tab_view = id(new PHUIListItemView())
         ->setHref('#')
@@ -283,6 +288,11 @@ final class PhabricatorDashboardTabsPanelType
       }

       $is_selected = (string)$idx === (string)$selected;
+      if(isset($_GET['asd'])) {
+        phlog("Panel entry $panel_id");
+        phlog($idx);
+        phlog($selected);
+      }

       $content_id = celerity_generate_unique_node_id();

Unsure if this should be a Sub-task of the migration (even if the parent is resolved) or just a mention. Feel free to disconnect.

valerio.bozzolan changed the subtype of this task from "Task" to "Bug Report".Aug 29 2023, 3:47 PM

I've examined 100+ Wikimedia Dashboards and... I also cannot reproduce here in production ._.

For example, this super-nice Dashboard from the SRE team has so many tab panels and it works perfectly:

https://phabricator.wikimedia.org/dashboard/view/653/

complex Dashboard that still works.png (920×1 px, 268 KB)

I wouldn't be surprised if the workaround is: re-create the Dashboard.

OK interesting, I've limited the scope to just W6

Since I'm totally not a virus but I'm a dolphin, maybe a lovely person may want to bless the user @valerio.bozzolan to be allowed to edit W6 (I say edit, but I mean inspect with my big eyes, without saving anything)

Don't tell anyone that I would like to put this in production and collect its logs when visiting with ?asd=1

@valerio.bozzolan: After going to https://phabricator.wikimedia.org/W6?T344835 :

'Tab view name: New Tasks' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:117]
'idx: dlvotftew3ju' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:118]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:119]

'Tab view name: Closed Tasks' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:117]
'idx: 1' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:118]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:119]

'Tab view name: Latest Projects' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:117]
'idx: 3' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:118]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:119]

'Tab view name: Good first newcomer tasks' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:117]
'idx: 6eyn2xscrxdr' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:118]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:119]

'Panel entry id: 2475' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:294]
'idx: dlvotftew3ju' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:295]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:296]

'Panel entry id: 5' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:294]
'idx: 1' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:295]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:296]

'Panel entry id: 8' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:294]
'idx: 3' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:295]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:296]

'Panel entry id: 2917' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:294]
'idx: 6eyn2xscrxdr' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:295]
'selected: 0' at [/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php:296]
valerio.bozzolan moved this task from Backlog to Reported Upstream on the Upstream board.

Thanks! Very interesting legacy heritage. Sometime the Tab Panels had 2+ tabs opened. Now you have zero tabs opened. That is the very same bug.

Filed upstream in Phorge. Editing the description.

I'm quite sure that this will do the thing:

commit a90b3b78db8122355b9dc6529e6da3a76fb6bb8c
Author: Valerio Bozzolan <nsa+gitspam@succhia.cz>
Date:   Thu Oct 12 15:06:40 2023 +0200

    Dashboard Panel: fix first tab sometime not opened by default
    
    This change assures that - as default - the first ID is selected.
    
    Note that sometime these IDs are numerics, sometime they are strings,
    so we rely on NULL as "no value".

diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
index 3cf73b539e..dc72fc818d 100644
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
@@ -85,10 +85,12 @@ final class PhabricatorDashboardTabsPanelType
     $rename_uri = id(new PhutilURI($rename_uri))
       ->replaceQueryParam('contextPHID', $context_phid);
 
-    $selected = 0;
-
     $key_list = array_keys($config);
 
+    // In the future we may persist which panel was selected.
+    // At the moment we have always selected the first one.
+    $selected = (string)head($key_list);
+
     $next_keys = array();
     $prev_keys = array();
     for ($ii = 0; $ii < count($key_list); $ii++) {
@@ -111,7 +113,7 @@ final class PhabricatorDashboardTabsPanelType
         $name = pht('Unnamed Tab');
       }
 
-      $is_selected = (string)$idx === (string)$selected;
+      $is_selected = (string)$idx === $selected;
 
       $tab_view = id(new PHUIListItemView())
         ->setHref('#')
@@ -282,7 +284,7 @@ final class PhabricatorDashboardTabsPanelType
         $panel_content = pht('(Invalid Panel)');
       }
 
-      $is_selected = (string)$idx === (string)$selected;
+      $is_selected = (string)$idx === $selected;
 
       $content_id = celerity_generate_unique_node_id();

I'm blindly proposing that upstream

Just to report that we received review upstream and they landed the change (indeed not already promoted in the release candidate).

Feel free to cherry-pick this one to give useful feedback, before the release candidate:

https://we.phorge.it/rP2d635fb76e9b20cce53ed68fe1dfd4daa79aa8c2

(You may really want a trigger on the "Phabricator (upstream)" column to automatically set the "Solved upstream" Tag)

Are we expecting the upstream fix to be deployed at WMF (in the next window? later?).

In general at some point when we pull and deploy a new upstream version

This change is now in branch stable and under tag 2023.49:

https://we.phorge.it/D25447

Maybe time to try an update soon

valerio.bozzolan claimed this task.
valerio.bozzolan updated Other Assignee, added: brennen.

Uh! Nice homepage! This means the patch is online and worked \o/ https://we.phorge.it/D25447

Thanks @brennen for the upgrade