jenkinsci / code-coverage-api-plugin

Deprecated Jenkins Code Coverage Plugin
https://plugins.jenkins.io/code-coverage-api/
MIT License
111 stars 77 forks source link

Coverage report does not remember latest tabs when going to previous page #724

Closed stefan6419846 closed 1 year ago

stefan6419846 commented 1 year ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.412 OS: Linux - 5.14.21-150400.24.46-default Java: 11.0.18 - Oracle Corporation (OpenJDK 64-Bit Server VM) --- PrioritySorter:5.0.0 URLSCM:1.6 analysis-model-api:11.3.0 android-emulator:3.1.3 ansicolor:1.0.2 ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:159.v25b_c67cd35fb_ apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5 authentication-tokens:1.53.v1c90fd9191a_b_ bootstrap5-api:5.3.0-1 bouncycastle-api:2.28 branch-api:2.1122.v09cb_8ea_8a_724 build-name-setter:2.2.1 build-user-vars-plugin:1.9 built-on-column:1.4 caffeine-api:3.1.6-115.vb_8b_b_328e59d8 checks-api:2.0.0 cloudbees-folder:6.815.v0dd5a_cb_40e0e code-coverage-api:4.7.0 command-launcher:100.v2f6722292ee8 commons-lang3-api:3.12.0-36.vd97de6465d5b_ commons-text-api:1.10.0-36.vc008c8fcda_7b_ compact-columns:1.185.vf3851b_4d31fe conditional-buildstep:1.4.2 credentials:1254.vb_96f366e7b_a_d credentials-binding:604.vb_64480b_c56ca_ dark-theme:336.v02165cd8c2ee data-tables-api:1.13.4-3 description-setter:1.10 display-url-api:2.3.7 docker-commons:422.v9d1a_89cede51 dtkit-api:3.0.2 durable-task:507.v050055d0cb_dd echarts-api:5.4.0-5 email-ext:2.99 envinject:2.901.v0038b_6471582 envinject-api:1.199.v3ce31253ed13 external-monitor-job:206.v9a_94ff0b_4a_10 extra-columns:1.25 fail-the-build-plugin:5.v153b_2c826ef0 favorite:2.4.2 font-awesome-api:6.4.0-1 forensics-api:2.3.0 git:5.1.0 git-client:4.4.0 git-forensics:2.0.0 git-server:99.va_0826a_b_cdfa_d github:1.37.1 github-api:1.314-431.v78d72a_3fe4c3 github-branch-source:1728.v859147241f49 google-oauth-plugin:1.0.9 google-play-android-publisher:4.2 gradle:2.8.1 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.31 http_request:1.17 instance-identity:173.va_37c494ec4e5 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.15.2-350.v0c2f3f8fc595 jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javadoc:233.vdc1a_ec702cff javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.8-1 jdk-tool:66.vd8fa_64ee91b_d jenkins-design-language:1.27.4 jjwt-api:0.11.5-77.v646c772fddb_0 jnr-posix-api:3.1.17-1 jquery:1.12.4-1 jquery3-api:3.7.0-1 jsch:0.2.8-65.v052c39de79b_2 junit:1214.va_2f9db_3e6de0 ldap:682.v7b_544c9d1512 locale:314.v22ce953dfe9e lockable-resources:1172.v4b_8fc8eed570 mailer:457.v3f72cb_e015e5 mapdb-api:1.0.9-28.vf251ce40855d matrix-auth:3.1.8 matrix-project:789.v57a_725b_63c79 maven-plugin:3.22 mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_ mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_ monitoring:1.94.1 oauth-credentials:0.645.ve666a_c332668 okhttp-api:4.11.0-145.vcb_8de402ef81 pam-auth:1.10 parameterized-trigger:2.45 pipeline-build-step:496.v2449a_9a_221f2 pipeline-github-lib:42.v0739460cda_c4 pipeline-graph-analysis:202.va_d268e64deb_3 pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7 pipeline-input-step:468.va_5db_051498a_4 pipeline-milestone-step:111.v449306f708b_7 pipeline-model-api:2.2141.v5402e818a_779 pipeline-model-definition:2.2141.v5402e818a_779 pipeline-model-extensions:2.2141.v5402e818a_779 pipeline-rest-api:2.33 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2141.v5402e818a_779 pipeline-stage-view:2.33 pipeline-utility-steps:2.15.4 plain-credentials:143.v1b_df8b_d3b_e48 plugin-usage-plugin:4.0 plugin-util-api:3.3.0 port-allocator:1.10 postbuildscript:3.2.0-460.va_fda_0fa_26720 prism-api:1.29.0-7 pubsub-light:1.17 run-condition:1.5 scm-api:676.v886669a_199a_a_ script-security:1251.vfe552ed55f8d scriptler:321.v74a_851a_e7ed6 simple-theme-plugin:160.vb_76454b_67900 slave-setup:1.16 snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4 sse-gateway:1.26 ssh-credentials:305.v8f4381501156 ssh-slaves:2.877.v365f5eb_a_b_eec sshd:3.303.vefc7119b_ec23 structs:324.va_f5d6774f3a_d theme-manager:193.vcef22f6c5f2b_ timestamper:1.25 token-macro:359.vb_cde11682e0c trilead-api:2.84.v72119de229b_7 variant:59.vf075fe829ccb view-job-filters:364.v48a_33389553d warnings-ng:10.2.0 workflow-aggregator:596.v8c21c963d92d workflow-api:1219.v05cd837ea_249 workflow-basic-steps:1017.vb_45b_302f0cea_ workflow-cps:3697.vb_470e454c232 workflow-durable-task-step:1247.v7f9dfea_b_4fd0 workflow-job:1316.vd2290d3341a_f workflow-multibranch:756.v891d88f2cd46 workflow-scm-step:415.v434365564324 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:839.v35e2736cfd5c ```

What Operating System are you using (both controller, and any agents involved in the problem)?

OpenSUSE Leap 15.4

Reproduction steps

  1. Open the rendered coverage report in Firefox 102.8.0.
  2. Go to the Files tab.
  3. Click on a filename to see the source code.
  4. Go back to the previous page by clicking the browser button or the corresponding mouse button.

Expected Results

The previous tab, id est the Files tab, is being displayed.

Actual Results

The Overview tab is being displayed.

Anything else?

Clicking on the Coverage Report menu entry for the job in the left pane open the Files tab again, so apparently the state already is being saved somehow.

uhafner commented 1 year ago

Can you check if this is also a problem here: https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1611/coverage/

I cannot reproduce it so can you please have a look at the developer tools of firefox to see if there are some error messages in the console log?

Which value is stored in your browser local storage (jenkins-coverage-activeTab)?

Can you step in the debugger to see what is going on in https://github.com/jenkinsci/code-coverage-api-plugin/blob/3911e15a9846daba88f06a7a6fd2b874dc8bfc51/plugin/src/main/webapp/js/view-model.js#L318C36-L318C62?

stefan6419846 commented 1 year ago

Can you check if this is also a problem here: https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/1611/coverage/

I cannot click on the filenames inside the Files tab here, even after logging in with my Jenkins bugtracker account.

I cannot reproduce it so can you please have a look at the developer tools of firefox to see if there are some error messages in the console log?

There only is a rather common message:

Diese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden.

Which value is stored in your browser local storage (jenkins-coverage-activeTab)?

There is #fileCoverage inside this. Nevertheless, I just could not reproduce this issue any more, so I am going to close this for now.