vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

2nd page of results opens in wrong editor group

Open RuggMatt opened this issue 10 months ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

When clicking on the pagination bar to go to the next page of results, a new tab is opened in a different editor group rather than reusing the existing tab in the current editor group

DEBUG sent => NOTIFY:VIEW_READY  true 
commons.js:1 DEBUG ACTION SET_STATE  {loading: true} 
commons.js:1 DEBUG sent => REQUEST:SYNC_CONSOLE_MESSAGES  [] 
commons.js:1 INFO STATE => Prev {loading: true, showConsole: false, resultTabs: Array(0), activeTab: 0} Curr {loading: true, showConsole: false, resultTabs: Array(0), activeTab: 0} 
commons.js:1 DEBUG sent => REQUEST:SYNC_CONSOLE_MESSAGES  [] 
commons.js:1 INFO Message received: RESPONSE:RESULTS_RECEIVED  {resultTabs: Array(1), showConsole: false} 
commons.js:1 DEBUG ACTION RESPONSE:RESULTS_RECEIVED  {resultTabs: Array(1), showConsole: false} 
commons.js:1 INFO STATE => Prev {loading: true, showConsole: false, resultTabs: Array(0), activeTab: 0} Curr {loading: false, showConsole: false, resultTabs: Array(1), activeTab: 0} 
commons.js:1 DEBUG sent => REQUEST:SYNC_CONSOLE_MESSAGES  [] 
commons.js:1 DEBUG ACTION SET_STATE  {loading: true} 
commons.js:1 DEBUG sent => call  {command: 'sqltools.showRecords', args: Array(2)} 
commons.js:1 INFO STATE => Prev {loading: false, showConsole: false, resultTabs: Array(1), activeTab: 0} Curr {loading: true, showConsole: false, resultTabs: Array(1), activeTab: 0} 
commons.js:1 DEBUG sent => REQUEST:SYNC_CONSOLE_MESSAGES  [] 
commons.js:1 INFO Message received: REQUEST:STATE  NO_PAYLOAD 
commons.js:1 DEBUG ACTION REQUEST:STATE  
commons.js:1 DEBUG sent => RESPONSE:STATE  {loading: true, showConsole: false, resultTabs: Array(1), activeTab: 0} 
commons.js:1 INFO Message received: RESPONSE:RESULTS_RECEIVED  {resultTabs: Array(1), showConsole: false}resultTabs: Array(1)0: {connId: 'abcs|MariaDB|mysql|lms', requestId: 'abcs|MariaDB|mysql|lms', resultId: '9c20db4d-3d6b-4ddc-984e-438f0375800b', cols: Array(33), messages: Array(0), …}length: 1[[Prototype]]: Array(0)showConsole: false[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__() 
commons.js:1 DEBUG ACTION RESPONSE:RESULTS_RECEIVED  {resultTabs: Array(1), showConsole: false} 
commons.js:1 INFO STATE => Prev {loading: true, showConsole: false, resultTabs: Array(1), activeTab: 0} Curr {loading: false, showConsole: false, resultTabs: Array(1), activeTab: 0} 
commons.js:1 DEBUG sent => REQUEST:SYNC_CONSOLE_MESSAGES  [] 

To Reproduce Steps to reproduce the behavior:

  1. Connect
  2. Click on any table in the SQLTools panel and select "Show Table Records"
  3. A new editor group opens with a single tab with the table results displayed
  4. Click on the "2" in the pagination control to open a 2nd page
  5. A new tab is created in the first editor group with the 2nd page of results, leaving the original tab in a loading state

Expected behavior The original tab should continue to be used instead of opening a new tab

Screenshots https://github.com/user-attachments/assets/d672983a-1ac1-4058-809b-c81c1237471c

Desktop (please complete the following information):

  • SQLTools Version 0.28.4
  • VS Code Version 1.100.2
  • OS: Client Windows 11. Remote: Docker Container (Alpine based) in WSL 2 (Ubuntu 24.04) over SSH (Remote Containers)
  • Driver:
    • [ ] PostgreSQL/Redshift
    • [x] MySQL/MariaDB
    • [ ] MSSQL/Azure
    • [ ] SQLite
    • [ ] Other? Which...
  • Database version: MariaDB 10.11

Additional context Add any other context about the problem here.

RuggMatt avatar Jun 04 '25 16:06 RuggMatt