Q:

When did the idea of Coruscant being a planet wide city develop?

Inspired by this question and the one it’s marked a duplicate of.
I distinctly remember a passage in the Timothy Zahn Heir to the Empire trilogy where a character looks out across to mountains on Coruscant, which makes me think those books pre-date the idea that it is a planet-wide urban sprawl.
What is the earliest reference to Coruscant being a planet-wide city?

A:

Timothy Zahn's "Heir to the Empire" trilogy is the first ever mentioning of Coruscant, in 1991.  George Lucas later made the name official.
According to The Making of Star Wars, J.W. Rinzler, the idea of the Capital planet of the Galactic Empire being a single planet-wide city existed by the 1974 drafts of "The Star Wars", but at this points in time it was called Alderaan.  In the the 1975 draft "Adventures of the Starkiller as taken from the Journal of the Whills, Saga I: The Star Wars", this had changed to a floating city in the clouds (which later became Cloud City, on the planet Bespin)
In early drafts of "Return of the Jedi", the city-planet cropped up again - this time, as the Emperor's homeworld, "Had Abaddon" (a name almost as ominous as "the Death Star"...) - but, was dropped due to a realisation that it would be too hard to show on screen.  Scenes set on Coruscant would, however, later be added to the 1997 Special Edition release - but without a name being given.
The first official mention in what is considered current-canon of Coruscant is then 1999's "Star Wars Episode 1: The Phantom Menace", where it is indeed a single city engulfing the planet.  This also changed the Emperor's homeworld from Coruscant to Naboo.
So, the idea of the Galactic Capital being a planet-sprawling city existed since before the first film, but was not canon until 8 years after "Heir to the Empire".  And, it certainly wasn't called "Coruscant" until Timothy Zahn named it.

A:

In the annotated 20th anniversary edition of Heir to the Empire, Timothy Zahn (actually, in the annotations for the very scene you recall) describes the situation thusly:

Before Heir, the Empire's capital was referred to as Imperial Center. My take on it was that the planet must have had a history previous to the Republic and Empire, and would have therefore had some other name.... I gave the planet the name Coruscant, which means "glittering".

-- annotation #5, page 17

At the time, I knew that Coruscant was a planet-wide city, but I assumed that there would still be a few areas of wilderness (maybe called parks by the inhabitants)... Mountains, for one thing, would probably not be cost-effective to knock down.

-- annotation #7, page 18
So going into the writing of Heir, although the Imperial capital didn't have a "proper" name, it had been mentioned (as "Imperial Center") and established as a planet-wide city - a fact that, to Zahn at least, wasn't incompatible with the idea of a few sizeable areas of wilderness, particularly mountains that would be difficult to build over. What Zahn doesn't disclose here is what source actually described Imperial Center in this way.
According to the fan wiki, at Celebration III, Zahn attributed that description to one of the West End Games RPG sourcebooks, and said that the idea itself went back to Lucas (presumably to the early draft version of Alderaan, as mentioned in @Chronocidal's answer).

Just to make it clear, I did not invent the planet... George Lucas had invented the planetwide city a long time ago. When I was starting the Thrawn Trilogy, they told me to coordinate with the West End Games source material, and they had it listed as the Imperial Planet

Zahn did certainly use the WEG books for background material (especially starships), which he points out many times in his annotations (first in #14 on page 10). And the mentioned-but-previously-unseen Imperial capital would be a prime place to set an RPG adventure or open up for groups who wanted to play their own. The books in question - I can't pin down which one specifically the description of Imperial Center first appeared in - were published beginning in 1987. So, unless the RPG books themselves took that detail from an earlier work, they would be the first published reference to the Imperial capital as a planet-wide city.

